diff --git a/src/libs/Cohere/Generated/Cohere.Models.EmbedImage.g.cs b/src/libs/Cohere/Generated/Cohere.Models.EmbedImage.g.cs index c8a8a7f6..49711647 100644 --- a/src/libs/Cohere/Generated/Cohere.Models.EmbedImage.g.cs +++ b/src/libs/Cohere/Generated/Cohere.Models.EmbedImage.g.cs @@ -9,10 +9,10 @@ namespace Cohere public sealed partial class EmbedImage { /// - /// + /// Base64 url of image. /// - [global::System.Text.Json.Serialization.JsonPropertyName("image")] - public global::Cohere.EmbedImageProperties? Image { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("image_url")] + public global::Cohere.EmbedImageUrl? ImageUrl { get; set; } /// /// Included only in requests @@ -30,7 +30,9 @@ public sealed partial class EmbedImage /// /// Initializes a new instance of the class. /// - /// + /// + /// Base64 url of image. + /// /// /// Included only in requests /// @@ -38,10 +40,10 @@ public sealed partial class EmbedImage [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public EmbedImage( - global::Cohere.EmbedImageProperties? image, + global::Cohere.EmbedImageUrl? imageUrl, global::Cohere.EmbedContentType? type) { - this.Image = image; + this.ImageUrl = imageUrl; this.Type = type; } diff --git a/src/libs/Cohere/Generated/Cohere.Models.EmbedImageProperties.g.cs b/src/libs/Cohere/Generated/Cohere.Models.EmbedImageProperties.g.cs deleted file mode 100644 index b61ef73a..00000000 --- a/src/libs/Cohere/Generated/Cohere.Models.EmbedImageProperties.g.cs +++ /dev/null @@ -1,78 +0,0 @@ - -#nullable enable - -namespace Cohere -{ - /// - /// - /// - public sealed partial class EmbedImageProperties - { - /// - /// Bit depth of the image - /// - [global::System.Text.Json.Serialization.JsonPropertyName("bit_depth")] - public double? BitDepth { get; set; } - - /// - /// Format of the image - /// - [global::System.Text.Json.Serialization.JsonPropertyName("format")] - public string? Format { get; set; } - - /// - /// Height of the image in pixels - /// - [global::System.Text.Json.Serialization.JsonPropertyName("height")] - public double? Height { get; set; } - - /// - /// Width of the image in pixels - /// - [global::System.Text.Json.Serialization.JsonPropertyName("width")] - public double? Width { get; set; } - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// Bit depth of the image - /// - /// - /// Format of the image - /// - /// - /// Height of the image in pixels - /// - /// - /// Width of the image in pixels - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public EmbedImageProperties( - double? bitDepth, - string? format, - double? height, - double? width) - { - this.BitDepth = bitDepth; - this.Format = format; - this.Height = height; - this.Width = width; - } - - /// - /// Initializes a new instance of the class. - /// - public EmbedImageProperties() - { - } - } -} \ No newline at end of file diff --git a/src/libs/Cohere/Generated/Cohere.Models.EmbedImageProperties.Json.g.cs b/src/libs/Cohere/Generated/Cohere.Models.EmbedImageUrl.Json.g.cs similarity index 88% rename from src/libs/Cohere/Generated/Cohere.Models.EmbedImageProperties.Json.g.cs rename to src/libs/Cohere/Generated/Cohere.Models.EmbedImageUrl.Json.g.cs index b1189880..1e010f3f 100644 --- a/src/libs/Cohere/Generated/Cohere.Models.EmbedImageProperties.Json.g.cs +++ b/src/libs/Cohere/Generated/Cohere.Models.EmbedImageUrl.Json.g.cs @@ -2,7 +2,7 @@ namespace Cohere { - public sealed partial class EmbedImageProperties + public sealed partial class EmbedImageUrl { /// /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. @@ -34,14 +34,14 @@ public string ToJson( /// /// Deserializes a JSON string using the provided JsonSerializerContext. /// - public static global::Cohere.EmbedImageProperties? FromJson( + public static global::Cohere.EmbedImageUrl? FromJson( string json, global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) { return global::System.Text.Json.JsonSerializer.Deserialize( json, - typeof(global::Cohere.EmbedImageProperties), - jsonSerializerContext) as global::Cohere.EmbedImageProperties; + typeof(global::Cohere.EmbedImageUrl), + jsonSerializerContext) as global::Cohere.EmbedImageUrl; } /// @@ -51,11 +51,11 @@ public string ToJson( [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] #endif - public static global::Cohere.EmbedImageProperties? FromJson( + public static global::Cohere.EmbedImageUrl? FromJson( string json, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { - return global::System.Text.Json.JsonSerializer.Deserialize( + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); } @@ -63,14 +63,14 @@ public string ToJson( /// /// Deserializes a JSON stream using the provided JsonSerializerContext. /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( global::System.IO.Stream jsonStream, global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) { return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, - typeof(global::Cohere.EmbedImageProperties), - jsonSerializerContext).ConfigureAwait(false)) as global::Cohere.EmbedImageProperties; + typeof(global::Cohere.EmbedImageUrl), + jsonSerializerContext).ConfigureAwait(false)) as global::Cohere.EmbedImageUrl; } /// @@ -80,11 +80,11 @@ public string ToJson( [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] #endif - public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( global::System.IO.Stream jsonStream, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( + return global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, jsonSerializerOptions); } diff --git a/src/libs/Cohere/Generated/Cohere.Models.EmbedImageUrl.g.cs b/src/libs/Cohere/Generated/Cohere.Models.EmbedImageUrl.g.cs new file mode 100644 index 00000000..64e4ab31 --- /dev/null +++ b/src/libs/Cohere/Generated/Cohere.Models.EmbedImageUrl.g.cs @@ -0,0 +1,44 @@ + +#nullable enable + +namespace Cohere +{ + /// + /// Base64 url of image. + /// + public sealed partial class EmbedImageUrl + { + /// + /// + /// + [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. + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public EmbedImageUrl( + string url) + { + this.Url = url ?? throw new global::System.ArgumentNullException(nameof(url)); + } + + /// + /// Initializes a new instance of the class. + /// + public EmbedImageUrl() + { + } + } +} \ No newline at end of file diff --git a/src/libs/Cohere/Generated/JsonSerializerContextTypes.g.cs b/src/libs/Cohere/Generated/JsonSerializerContextTypes.g.cs index 44cbc778..79e38553 100644 --- a/src/libs/Cohere/Generated/JsonSerializerContextTypes.g.cs +++ b/src/libs/Cohere/Generated/JsonSerializerContextTypes.g.cs @@ -930,7 +930,7 @@ public sealed partial class JsonSerializerContextTypes /// /// /// - public global::Cohere.EmbedImageProperties? Type226 { get; set; } + public global::Cohere.EmbedImageUrl? Type226 { get; set; } /// /// /// diff --git a/src/libs/Cohere/openapi.yaml b/src/libs/Cohere/openapi.yaml index e294e9f2..2dd74d18 100644 --- a/src/libs/Cohere/openapi.yaml +++ b/src/libs/Cohere/openapi.yaml @@ -15231,40 +15231,20 @@ components: EmbedImage: type: object properties: - image: - $ref: '#/components/schemas/EmbedImageProperties' + image_url: + $ref: '#/components/schemas/EmbedImageUrl' type: $ref: '#/components/schemas/EmbedContentType' x-fern-audiences: - public - EmbedImageProperties: + EmbedImageUrl: + required: + - url type: object properties: - bit_depth: - type: number - description: Bit depth of the image - format: int64 - x-fern-audiences: - - public - format: + url: type: string - description: Format of the image - x-fern-audiences: - - public - height: - type: number - description: Height of the image in pixels - format: int64 - x-fern-audiences: - - public - width: - type: number - description: Width of the image in pixels - format: int64 - x-fern-audiences: - - public - x-fern-audiences: - - public + description: Base64 url of image. EmbedInput: required: - content