Skip to content

Commit

Permalink
Merge pull request #32 from tryAGI/bot/update-openapi_202408150107
Browse files Browse the repository at this point in the history
feat:Updated OpenAPI spec
  • Loading branch information
HavenDV authored Aug 15, 2024
2 parents eef365e + 0038da1 commit e4dc433
Show file tree
Hide file tree
Showing 14 changed files with 292 additions and 308 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace System
/// <summary>
///
/// </summary>
public readonly partial struct AnyOf<T1, T2, T3, T4, T5, T6> : global::System.IEquatable<AnyOf<T1, T2, T3, T4, T5, T6>>
public readonly partial struct AnyOf<T1, T2, T3, T4, T5, T6, T7> : global::System.IEquatable<AnyOf<T1, T2, T3, T4, T5, T6, T7>>
{
/// <summary>
///
Expand All @@ -29,12 +29,12 @@ namespace System
/// <summary>
///
/// </summary>
public static implicit operator AnyOf<T1, T2, T3, T4, T5, T6>(T1 value) => new AnyOf<T1, T2, T3, T4, T5, T6>(value);
public static implicit operator AnyOf<T1, T2, T3, T4, T5, T6, T7>(T1 value) => new AnyOf<T1, T2, T3, T4, T5, T6, T7>(value);

/// <summary>
///
/// </summary>
public static implicit operator T1?(AnyOf<T1, T2, T3, T4, T5, T6> @this) => @this.Value1;
public static implicit operator T1?(AnyOf<T1, T2, T3, T4, T5, T6, T7> @this) => @this.Value1;

/// <summary>
///
Expand Down Expand Up @@ -64,12 +64,12 @@ public AnyOf(T1? value)
/// <summary>
///
/// </summary>
public static implicit operator AnyOf<T1, T2, T3, T4, T5, T6>(T2 value) => new AnyOf<T1, T2, T3, T4, T5, T6>(value);
public static implicit operator AnyOf<T1, T2, T3, T4, T5, T6, T7>(T2 value) => new AnyOf<T1, T2, T3, T4, T5, T6, T7>(value);

/// <summary>
///
/// </summary>
public static implicit operator T2?(AnyOf<T1, T2, T3, T4, T5, T6> @this) => @this.Value2;
public static implicit operator T2?(AnyOf<T1, T2, T3, T4, T5, T6, T7> @this) => @this.Value2;

/// <summary>
///
Expand Down Expand Up @@ -99,12 +99,12 @@ public AnyOf(T2? value)
/// <summary>
///
/// </summary>
public static implicit operator AnyOf<T1, T2, T3, T4, T5, T6>(T3 value) => new AnyOf<T1, T2, T3, T4, T5, T6>(value);
public static implicit operator AnyOf<T1, T2, T3, T4, T5, T6, T7>(T3 value) => new AnyOf<T1, T2, T3, T4, T5, T6, T7>(value);

/// <summary>
///
/// </summary>
public static implicit operator T3?(AnyOf<T1, T2, T3, T4, T5, T6> @this) => @this.Value3;
public static implicit operator T3?(AnyOf<T1, T2, T3, T4, T5, T6, T7> @this) => @this.Value3;

/// <summary>
///
Expand Down Expand Up @@ -134,12 +134,12 @@ public AnyOf(T3? value)
/// <summary>
///
/// </summary>
public static implicit operator AnyOf<T1, T2, T3, T4, T5, T6>(T4 value) => new AnyOf<T1, T2, T3, T4, T5, T6>(value);
public static implicit operator AnyOf<T1, T2, T3, T4, T5, T6, T7>(T4 value) => new AnyOf<T1, T2, T3, T4, T5, T6, T7>(value);

/// <summary>
///
/// </summary>
public static implicit operator T4?(AnyOf<T1, T2, T3, T4, T5, T6> @this) => @this.Value4;
public static implicit operator T4?(AnyOf<T1, T2, T3, T4, T5, T6, T7> @this) => @this.Value4;

/// <summary>
///
Expand Down Expand Up @@ -169,12 +169,12 @@ public AnyOf(T4? value)
/// <summary>
///
/// </summary>
public static implicit operator AnyOf<T1, T2, T3, T4, T5, T6>(T5 value) => new AnyOf<T1, T2, T3, T4, T5, T6>(value);
public static implicit operator AnyOf<T1, T2, T3, T4, T5, T6, T7>(T5 value) => new AnyOf<T1, T2, T3, T4, T5, T6, T7>(value);

/// <summary>
///
/// </summary>
public static implicit operator T5?(AnyOf<T1, T2, T3, T4, T5, T6> @this) => @this.Value5;
public static implicit operator T5?(AnyOf<T1, T2, T3, T4, T5, T6, T7> @this) => @this.Value5;

/// <summary>
///
Expand Down Expand Up @@ -204,12 +204,12 @@ public AnyOf(T5? value)
/// <summary>
///
/// </summary>
public static implicit operator AnyOf<T1, T2, T3, T4, T5, T6>(T6 value) => new AnyOf<T1, T2, T3, T4, T5, T6>(value);
public static implicit operator AnyOf<T1, T2, T3, T4, T5, T6, T7>(T6 value) => new AnyOf<T1, T2, T3, T4, T5, T6, T7>(value);

/// <summary>
///
/// </summary>
public static implicit operator T6?(AnyOf<T1, T2, T3, T4, T5, T6> @this) => @this.Value6;
public static implicit operator T6?(AnyOf<T1, T2, T3, T4, T5, T6, T7> @this) => @this.Value6;

/// <summary>
///
Expand All @@ -219,6 +219,41 @@ public AnyOf(T6? value)
Value6 = value;
}

/// <summary>
///
/// </summary>
#if NET6_0_OR_GREATER
public T7? Value7 { get; init; }
#else
public T7? Value7 { get; }
#endif

/// <summary>
///
/// </summary>
#if NET6_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value7))]
#endif
public bool IsValue7 => Value7 != null;

/// <summary>
///
/// </summary>
public static implicit operator AnyOf<T1, T2, T3, T4, T5, T6, T7>(T7 value) => new AnyOf<T1, T2, T3, T4, T5, T6, T7>(value);

/// <summary>
///
/// </summary>
public static implicit operator T7?(AnyOf<T1, T2, T3, T4, T5, T6, T7> @this) => @this.Value7;

/// <summary>
///
/// </summary>
public AnyOf(T7? value)
{
Value7 = value;
}

/// <summary>
///
/// </summary>
Expand All @@ -228,7 +263,8 @@ public AnyOf(
T3? value3,
T4? value4,
T5? value5,
T6? value6
T6? value6,
T7? value7
)
{
Value1 = value1;
Expand All @@ -237,12 +273,14 @@ public AnyOf(
Value4 = value4;
Value5 = value5;
Value6 = value6;
Value7 = value7;
}

/// <summary>
///
/// </summary>
public object? Object =>
Value7 as object ??
Value6 as object ??
Value5 as object ??
Value4 as object ??
Expand All @@ -256,7 +294,7 @@ Value1 as object
/// </summary>
public bool Validate()
{
return IsValue1 || IsValue2 || IsValue3 || IsValue4 || IsValue5 || IsValue6;
return IsValue1 || IsValue2 || IsValue3 || IsValue4 || IsValue5 || IsValue6 || IsValue7;
}

/// <summary>
Expand All @@ -278,6 +316,8 @@ public override int GetHashCode()
typeof(T5),
Value6,
typeof(T6),
Value7,
typeof(T7),
};
const int offset = unchecked((int)2166136261);
const int prime = 16777619;
Expand All @@ -290,30 +330,31 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null
/// <summary>
///
/// </summary>
public bool Equals(AnyOf<T1, T2, T3, T4, T5, T6> other)
public bool Equals(AnyOf<T1, T2, T3, T4, T5, T6, T7> other)
{
return
global::System.Collections.Generic.EqualityComparer<T1?>.Default.Equals(Value1, other.Value1) &&
global::System.Collections.Generic.EqualityComparer<T2?>.Default.Equals(Value2, other.Value2) &&
global::System.Collections.Generic.EqualityComparer<T3?>.Default.Equals(Value3, other.Value3) &&
global::System.Collections.Generic.EqualityComparer<T4?>.Default.Equals(Value4, other.Value4) &&
global::System.Collections.Generic.EqualityComparer<T5?>.Default.Equals(Value5, other.Value5) &&
global::System.Collections.Generic.EqualityComparer<T6?>.Default.Equals(Value6, other.Value6)
global::System.Collections.Generic.EqualityComparer<T6?>.Default.Equals(Value6, other.Value6) &&
global::System.Collections.Generic.EqualityComparer<T7?>.Default.Equals(Value7, other.Value7)
;
}

/// <summary>
///
/// </summary>
public static bool operator ==(AnyOf<T1, T2, T3, T4, T5, T6> obj1, AnyOf<T1, T2, T3, T4, T5, T6> obj2)
public static bool operator ==(AnyOf<T1, T2, T3, T4, T5, T6, T7> obj1, AnyOf<T1, T2, T3, T4, T5, T6, T7> obj2)
{
return global::System.Collections.Generic.EqualityComparer<AnyOf<T1, T2, T3, T4, T5, T6>>.Default.Equals(obj1, obj2);
return global::System.Collections.Generic.EqualityComparer<AnyOf<T1, T2, T3, T4, T5, T6, T7>>.Default.Equals(obj1, obj2);
}

/// <summary>
///
/// </summary>
public static bool operator !=(AnyOf<T1, T2, T3, T4, T5, T6> obj1, AnyOf<T1, T2, T3, T4, T5, T6> obj2)
public static bool operator !=(AnyOf<T1, T2, T3, T4, T5, T6, T7> obj1, AnyOf<T1, T2, T3, T4, T5, T6, T7> obj2)
{
return !(obj1 == obj2);
}
Expand All @@ -323,7 +364,7 @@ public bool Equals(AnyOf<T1, T2, T3, T4, T5, T6> other)
/// </summary>
public override bool Equals(object? obj)
{
return obj is AnyOf<T1, T2, T3, T4, T5, T6> o && Equals(o);
return obj is AnyOf<T1, T2, T3, T4, T5, T6, T7> o && Equals(o);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ partial void ProcessTextToSpeechV1ElevenlabsV1TextToSpeechVoiceIdPostResponseCon
string voiceId,
string text,
string? xDeepinfraSource = default,
global::System.AllOf<global::DeepInfra.TtsModel?>? modelId = default,
string? modelId = "deepinfra/tts",
global::System.AllOf<global::DeepInfra.TtsResponseFormat?>? outputFormat = default,
string? languageCode = default,
global::System.Threading.CancellationToken cancellationToken = default)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ public sealed partial class ElevenLabsTextToSpeechIn
/// Default Value: deepinfra/tts
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("model_id")]
[global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.AllOfJsonConverterFactory1))]
public global::System.AllOf<global::DeepInfra.TtsModel?>? ModelId { get; set; } = global::DeepInfra.TtsModel.DeepinfraTts;
public string? ModelId { get; set; } = "deepinfra/tts";

/// <summary>
/// Output format for the speech<br/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,9 @@ public sealed partial class ModelInfoOut
///
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("pricing")]
[global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.AnyOfJsonConverterFactory6))]
[global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.AnyOfJsonConverterFactory7))]
[global::System.Text.Json.Serialization.JsonRequired]
public required global::System.AnyOf<global::DeepInfra.ModelPricingTime, global::DeepInfra.ModelPricingUptime, global::DeepInfra.ModelPricingTokens, global::DeepInfra.ModelPricingInputLength, global::DeepInfra.ModelPricingInputTokens, global::DeepInfra.ModelPricingInputCharacterLength> Pricing { get; set; }
public required global::System.AnyOf<global::DeepInfra.ModelPricingTime, global::DeepInfra.ModelPricingUptime, global::DeepInfra.ModelPricingTokens, global::DeepInfra.ModelPricingInputLength, global::DeepInfra.ModelPricingInputTokens, global::DeepInfra.ModelPricingInputCharacterLength, global::DeepInfra.ModelPricingImageUnits> Pricing { get; set; }

/// <summary>
///
Expand Down
4 changes: 2 additions & 2 deletions src/libs/DeepInfra/Generated/DeepInfra.Models.ModelOut.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ public sealed partial class ModelOut
/// The pricing type and cost for this model
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("pricing")]
[global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.AnyOfJsonConverterFactory6))]
[global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.AnyOfJsonConverterFactory7))]
[global::System.Text.Json.Serialization.JsonRequired]
public required global::System.AnyOf<global::DeepInfra.ModelPricingTime, global::DeepInfra.ModelPricingTokens, global::DeepInfra.ModelPricingInputLength, global::DeepInfra.ModelPricingInputTokens, global::DeepInfra.ModelPricingUptime, global::DeepInfra.ModelPricingInputCharacterLength> Pricing { get; set; }
public required global::System.AnyOf<global::DeepInfra.ModelPricingTime, global::DeepInfra.ModelPricingTokens, global::DeepInfra.ModelPricingInputLength, global::DeepInfra.ModelPricingInputTokens, global::DeepInfra.ModelPricingUptime, global::DeepInfra.ModelPricingInputCharacterLength, global::DeepInfra.ModelPricingImageUnits> Pricing { get; set; }

/// <summary>
/// The maximum context size of this model, if applicable
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@

#nullable enable

namespace DeepInfra
{
/// <summary>
///
/// </summary>
public sealed partial class ModelPricingImageUnits
{
/// <summary>
///
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("cents_per_image_unit")]
[global::System.Text.Json.Serialization.JsonRequired]
public required double CentsPerImageUnit { get; set; }

/// <summary>
///
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("default_width")]
[global::System.Text.Json.Serialization.JsonRequired]
public required int DefaultWidth { get; set; }

/// <summary>
///
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("default_height")]
[global::System.Text.Json.Serialization.JsonRequired]
public required int DefaultHeight { get; set; }

/// <summary>
///
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("default_iterations")]
[global::System.Text.Json.Serialization.JsonRequired]
public required int DefaultIterations { get; set; }

/// <summary>
/// Default Value: image_units
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("type")]
public string? Type { get; set; } = "image_units";

/// <summary>
/// Additional properties that are not explicitly defined in the schema
/// </summary>
[global::System.Text.Json.Serialization.JsonExtensionData]
public global::System.Collections.Generic.IDictionary<string, object> AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary<string, object>();
}
}
45 changes: 0 additions & 45 deletions src/libs/DeepInfra/Generated/DeepInfra.Models.TtsModel.g.cs

This file was deleted.

Loading

0 comments on commit e4dc433

Please sign in to comment.