Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions src/libs/Cohere/Generated/Cohere.Models.EmbedImage.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ namespace Cohere
public sealed partial class EmbedImage
{
/// <summary>
///
/// Base64 url of image.
/// </summary>
[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; }

/// <summary>
/// Included only in requests
Expand All @@ -30,18 +30,20 @@ public sealed partial class EmbedImage
/// <summary>
/// Initializes a new instance of the <see cref="EmbedImage" /> class.
/// </summary>
/// <param name="image"></param>
/// <param name="imageUrl">
/// Base64 url of image.
/// </param>
/// <param name="type">
/// Included only in requests
/// </param>
#if NET7_0_OR_GREATER
[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;
}

Expand Down
78 changes: 0 additions & 78 deletions src/libs/Cohere/Generated/Cohere.Models.EmbedImageProperties.g.cs

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Cohere
{
public sealed partial class EmbedImageProperties
public sealed partial class EmbedImageUrl
{
/// <summary>
/// Serializes the current instance to a JSON string using the provided JsonSerializerContext.
Expand Down Expand Up @@ -34,14 +34,14 @@ public string ToJson(
/// <summary>
/// Deserializes a JSON string using the provided JsonSerializerContext.
/// </summary>
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;
}

/// <summary>
Expand All @@ -51,26 +51,26 @@ 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<global::Cohere.EmbedImageProperties>(
return global::System.Text.Json.JsonSerializer.Deserialize<global::Cohere.EmbedImageUrl>(
json,
jsonSerializerOptions);
}

/// <summary>
/// Deserializes a JSON stream using the provided JsonSerializerContext.
/// </summary>
public static async global::System.Threading.Tasks.ValueTask<global::Cohere.EmbedImageProperties?> FromJsonStreamAsync(
public static async global::System.Threading.Tasks.ValueTask<global::Cohere.EmbedImageUrl?> 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;
}

/// <summary>
Expand All @@ -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<global::Cohere.EmbedImageProperties?> FromJsonStreamAsync(
public static global::System.Threading.Tasks.ValueTask<global::Cohere.EmbedImageUrl?> FromJsonStreamAsync(
global::System.IO.Stream jsonStream,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
return global::System.Text.Json.JsonSerializer.DeserializeAsync<global::Cohere.EmbedImageProperties?>(
return global::System.Text.Json.JsonSerializer.DeserializeAsync<global::Cohere.EmbedImageUrl?>(
jsonStream,
jsonSerializerOptions);
}
Expand Down
44 changes: 44 additions & 0 deletions src/libs/Cohere/Generated/Cohere.Models.EmbedImageUrl.g.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@

#nullable enable

namespace Cohere
{
/// <summary>
/// Base64 url of image.
/// </summary>
public sealed partial class EmbedImageUrl
{
/// <summary>
///
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("url")]
[global::System.Text.Json.Serialization.JsonRequired]
public required string Url { get; set; }

/// <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>();

/// <summary>
/// Initializes a new instance of the <see cref="EmbedImageUrl" /> class.
/// </summary>
/// <param name="url"></param>
#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));
}

/// <summary>
/// Initializes a new instance of the <see cref="EmbedImageUrl" /> class.
/// </summary>
public EmbedImageUrl()
{
}
}
}
2 changes: 1 addition & 1 deletion src/libs/Cohere/Generated/JsonSerializerContextTypes.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -930,7 +930,7 @@ public sealed partial class JsonSerializerContextTypes
/// <summary>
///
/// </summary>
public global::Cohere.EmbedImageProperties? Type226 { get; set; }
public global::Cohere.EmbedImageUrl? Type226 { get; set; }
/// <summary>
///
/// </summary>
Expand Down
34 changes: 7 additions & 27 deletions src/libs/Cohere/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading