diff --git a/src/libs/Cohere/Generated/Cohere.Models.ImageContent.g.cs b/src/libs/Cohere/Generated/Cohere.Models.ImageContent.g.cs
index 2965440d..e44ac31d 100644
--- a/src/libs/Cohere/Generated/Cohere.Models.ImageContent.g.cs
+++ b/src/libs/Cohere/Generated/Cohere.Models.ImageContent.g.cs
@@ -9,7 +9,7 @@ namespace Cohere
public sealed partial class ImageContent
{
///
- /// Base64 url of image.
+ ///
///
[global::System.Text.Json.Serialization.JsonPropertyName("image_url")]
[global::System.Text.Json.Serialization.JsonRequired]
@@ -32,9 +32,7 @@ public sealed partial class ImageContent
///
/// Initializes a new instance of the class.
///
- ///
- /// Base64 url of image.
- ///
+ ///
///
/// Type of message content
///
diff --git a/src/libs/Cohere/Generated/Cohere.Models.ImageUrl.g.cs b/src/libs/Cohere/Generated/Cohere.Models.ImageUrl.g.cs
index 4a1a5690..c99cd82d 100644
--- a/src/libs/Cohere/Generated/Cohere.Models.ImageUrl.g.cs
+++ b/src/libs/Cohere/Generated/Cohere.Models.ImageUrl.g.cs
@@ -4,12 +4,19 @@
namespace Cohere
{
///
- /// Base64 url of image.
+ ///
///
public sealed partial class ImageUrl
{
///
- ///
+ /// Controls the level of detail in image processing. `"auto"` is the default and lets the system choose, `"low"` is faster but less detailed, and `"high"` preserves maximum detail. You can save tokens and speed up responses by using detail: `"low"`.
+ ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("detail")]
+ [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Cohere.JsonConverters.ImageUrlDetailJsonConverter))]
+ public global::Cohere.ImageUrlDetail? Detail { get; set; }
+
+ ///
+ /// URL of an image. Can be either a base64 data URI or a web URL.
///
[global::System.Text.Json.Serialization.JsonPropertyName("url")]
[global::System.Text.Json.Serialization.JsonRequired]
@@ -24,14 +31,21 @@ public sealed partial class ImageUrl
///
/// Initializes a new instance of the class.
///
- ///
+ ///
+ /// Controls the level of detail in image processing. `"auto"` is the default and lets the system choose, `"low"` is faster but less detailed, and `"high"` preserves maximum detail. You can save tokens and speed up responses by using detail: `"low"`.
+ ///
+ ///
+ /// URL of an image. Can be either a base64 data URI or a web URL.
+ ///
#if NET7_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
#endif
public ImageUrl(
- string url)
+ string url,
+ global::Cohere.ImageUrlDetail? detail)
{
this.Url = url ?? throw new global::System.ArgumentNullException(nameof(url));
+ this.Detail = detail;
}
///
diff --git a/src/libs/Cohere/Generated/Cohere.Models.ImageUrlDetail.g.cs b/src/libs/Cohere/Generated/Cohere.Models.ImageUrlDetail.g.cs
new file mode 100644
index 00000000..84c07b14
--- /dev/null
+++ b/src/libs/Cohere/Generated/Cohere.Models.ImageUrlDetail.g.cs
@@ -0,0 +1,57 @@
+
+#nullable enable
+
+namespace Cohere
+{
+ ///
+ /// Controls the level of detail in image processing. `"auto"` is the default and lets the system choose, `"low"` is faster but less detailed, and `"high"` preserves maximum detail. You can save tokens and speed up responses by using detail: `"low"`.
+ ///
+ public enum ImageUrlDetail
+ {
+ ///
+ /// `"low"`.
+ ///
+ Auto,
+ ///
+ /// `"low"`.
+ ///
+ Low,
+ ///
+ /// `"low"`.
+ ///
+ High,
+ }
+
+ ///
+ /// Enum extensions to do fast conversions without the reflection.
+ ///
+ public static class ImageUrlDetailExtensions
+ {
+ ///
+ /// Converts an enum to a string.
+ ///
+ public static string ToValueString(this ImageUrlDetail value)
+ {
+ return value switch
+ {
+ ImageUrlDetail.Auto => "auto",
+ ImageUrlDetail.Low => "low",
+ ImageUrlDetail.High => "high",
+ _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null),
+ };
+ }
+ ///
+ /// Converts an string to a enum.
+ ///
+ public static ImageUrlDetail? ToEnum(string value)
+ {
+ return value switch
+ {
+ "auto" => ImageUrlDetail.Auto,
+ "low" => ImageUrlDetail.Low,
+ "high" => ImageUrlDetail.High,
+ _ => null,
+ };
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Cohere/Generated/JsonConverters.ImageUrlDetail.g.cs b/src/libs/Cohere/Generated/JsonConverters.ImageUrlDetail.g.cs
new file mode 100644
index 00000000..c83662ea
--- /dev/null
+++ b/src/libs/Cohere/Generated/JsonConverters.ImageUrlDetail.g.cs
@@ -0,0 +1,49 @@
+#nullable enable
+
+namespace Cohere.JsonConverters
+{
+ ///
+ public sealed class ImageUrlDetailJsonConverter : global::System.Text.Json.Serialization.JsonConverter
+ {
+ ///
+ public override global::Cohere.ImageUrlDetail Read(
+ ref global::System.Text.Json.Utf8JsonReader reader,
+ global::System.Type typeToConvert,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ switch (reader.TokenType)
+ {
+ case global::System.Text.Json.JsonTokenType.String:
+ {
+ var stringValue = reader.GetString();
+ if (stringValue != null)
+ {
+ return global::Cohere.ImageUrlDetailExtensions.ToEnum(stringValue) ?? default;
+ }
+
+ break;
+ }
+ case global::System.Text.Json.JsonTokenType.Number:
+ {
+ var numValue = reader.GetInt32();
+ return (global::Cohere.ImageUrlDetail)numValue;
+ }
+ default:
+ throw new global::System.ArgumentOutOfRangeException(nameof(reader));
+ }
+
+ return default;
+ }
+
+ ///
+ public override void Write(
+ global::System.Text.Json.Utf8JsonWriter writer,
+ global::Cohere.ImageUrlDetail value,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));
+
+ writer.WriteStringValue(global::Cohere.ImageUrlDetailExtensions.ToValueString(value));
+ }
+ }
+}
diff --git a/src/libs/Cohere/Generated/JsonConverters.ImageUrlDetailNullable.g.cs b/src/libs/Cohere/Generated/JsonConverters.ImageUrlDetailNullable.g.cs
new file mode 100644
index 00000000..58e0279b
--- /dev/null
+++ b/src/libs/Cohere/Generated/JsonConverters.ImageUrlDetailNullable.g.cs
@@ -0,0 +1,56 @@
+#nullable enable
+
+namespace Cohere.JsonConverters
+{
+ ///
+ public sealed class ImageUrlDetailNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter
+ {
+ ///
+ public override global::Cohere.ImageUrlDetail? Read(
+ ref global::System.Text.Json.Utf8JsonReader reader,
+ global::System.Type typeToConvert,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ switch (reader.TokenType)
+ {
+ case global::System.Text.Json.JsonTokenType.String:
+ {
+ var stringValue = reader.GetString();
+ if (stringValue != null)
+ {
+ return global::Cohere.ImageUrlDetailExtensions.ToEnum(stringValue);
+ }
+
+ break;
+ }
+ case global::System.Text.Json.JsonTokenType.Number:
+ {
+ var numValue = reader.GetInt32();
+ return (global::Cohere.ImageUrlDetail)numValue;
+ }
+ default:
+ throw new global::System.ArgumentOutOfRangeException(nameof(reader));
+ }
+
+ return default;
+ }
+
+ ///
+ public override void Write(
+ global::System.Text.Json.Utf8JsonWriter writer,
+ global::Cohere.ImageUrlDetail? value,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));
+
+ if (value == null)
+ {
+ writer.WriteNullValue();
+ }
+ else
+ {
+ writer.WriteStringValue(global::Cohere.ImageUrlDetailExtensions.ToValueString(value.Value));
+ }
+ }
+ }
+}
diff --git a/src/libs/Cohere/Generated/JsonSerializerContext.g.cs b/src/libs/Cohere/Generated/JsonSerializerContext.g.cs
index 1c37ba4a..5fc62027 100644
--- a/src/libs/Cohere/Generated/JsonSerializerContext.g.cs
+++ b/src/libs/Cohere/Generated/JsonSerializerContext.g.cs
@@ -47,6 +47,8 @@ namespace Cohere
typeof(global::Cohere.JsonConverters.ChatRoleNullableJsonConverter),
typeof(global::Cohere.JsonConverters.ChatMessageStartEventVariant2DeltaMessageRoleJsonConverter),
typeof(global::Cohere.JsonConverters.ChatMessageStartEventVariant2DeltaMessageRoleNullableJsonConverter),
+ typeof(global::Cohere.JsonConverters.ImageUrlDetailJsonConverter),
+ typeof(global::Cohere.JsonConverters.ImageUrlDetailNullableJsonConverter),
typeof(global::Cohere.JsonConverters.ContentTypeJsonConverter),
typeof(global::Cohere.JsonConverters.ContentTypeNullableJsonConverter),
typeof(global::Cohere.JsonConverters.ContentDiscriminatorTypeJsonConverter),
diff --git a/src/libs/Cohere/Generated/JsonSerializerContextTypes.g.cs b/src/libs/Cohere/Generated/JsonSerializerContextTypes.g.cs
index 57b465ee..97dec1d9 100644
--- a/src/libs/Cohere/Generated/JsonSerializerContextTypes.g.cs
+++ b/src/libs/Cohere/Generated/JsonSerializerContextTypes.g.cs
@@ -402,2554 +402,2558 @@ public sealed partial class JsonSerializerContextTypes
///
///
///
- public global::Cohere.ContentType? Type94 { get; set; }
+ public global::Cohere.ImageUrlDetail? Type94 { get; set; }
///
///
///
- public global::Cohere.ContentDiscriminator? Type95 { get; set; }
+ public global::Cohere.ContentType? Type95 { get; set; }
///
///
///
- public global::Cohere.ContentDiscriminatorType? Type96 { get; set; }
+ public global::Cohere.ContentDiscriminator? Type96 { get; set; }
///
///
///
- public global::Cohere.UserMessageRole? Type97 { get; set; }
+ public global::Cohere.ContentDiscriminatorType? Type97 { get; set; }
///
///
///
- public global::Cohere.SystemMessage? Type98 { get; set; }
+ public global::Cohere.UserMessageRole? Type98 { get; set; }
///
///
///
- public global::Cohere.OneOf>? Type99 { get; set; }
+ public global::Cohere.SystemMessage? Type99 { get; set; }
///
///
///
- public global::System.Collections.Generic.IList? Type100 { get; set; }
+ public global::Cohere.OneOf>? Type100 { get; set; }
///
///
///
- public global::Cohere.ContentVariant2Item2? Type101 { get; set; }
+ public global::System.Collections.Generic.IList? Type101 { get; set; }
///
///
///
- public global::Cohere.SystemMessageContentVariant2ItemDiscriminator? Type102 { get; set; }
+ public global::Cohere.ContentVariant2Item2? Type102 { get; set; }
///
///
///
- public global::Cohere.SystemMessageContentVariant2ItemDiscriminatorType? Type103 { get; set; }
+ public global::Cohere.SystemMessageContentVariant2ItemDiscriminator? Type103 { get; set; }
///
///
///
- public global::Cohere.SystemMessageRole? Type104 { get; set; }
+ public global::Cohere.SystemMessageContentVariant2ItemDiscriminatorType? Type104 { get; set; }
///
///
///
- public global::Cohere.ToolMessageV2? Type105 { get; set; }
+ public global::Cohere.SystemMessageRole? Type105 { get; set; }
///
///
///
- public global::Cohere.OneOf>? Type106 { get; set; }
+ public global::Cohere.ToolMessageV2? Type106 { get; set; }
///
///
///
- public global::System.Collections.Generic.IList? Type107 { get; set; }
+ public global::Cohere.OneOf>? Type107 { get; set; }
///
///
///
- public global::Cohere.ToolContent? Type108 { get; set; }
+ public global::System.Collections.Generic.IList? Type108 { get; set; }
///
///
///
- public global::Cohere.DocumentContent? Type109 { get; set; }
+ public global::Cohere.ToolContent? Type109 { get; set; }
///
///
///
- public global::Cohere.Document? Type110 { get; set; }
+ public global::Cohere.DocumentContent? Type110 { get; set; }
///
///
///
- public global::Cohere.DocumentContentType? Type111 { get; set; }
+ public global::Cohere.Document? Type111 { get; set; }
///
///
///
- public global::Cohere.ToolContentDiscriminator? Type112 { get; set; }
+ public global::Cohere.DocumentContentType? Type112 { get; set; }
///
///
///
- public global::Cohere.ToolContentDiscriminatorType? Type113 { get; set; }
+ public global::Cohere.ToolContentDiscriminator? Type113 { get; set; }
///
///
///
- public global::Cohere.ToolMessageV2Role? Type114 { get; set; }
+ public global::Cohere.ToolContentDiscriminatorType? Type114 { get; set; }
///
///
///
- public global::Cohere.ChatMessageV2Discriminator? Type115 { get; set; }
+ public global::Cohere.ToolMessageV2Role? Type115 { get; set; }
///
///
///
- public global::Cohere.ChatMessageV2DiscriminatorRole? Type116 { get; set; }
+ public global::Cohere.ChatMessageV2Discriminator? Type116 { get; set; }
///
///
///
- public global::System.Collections.Generic.IList? Type117 { get; set; }
+ public global::Cohere.ChatMessageV2DiscriminatorRole? Type117 { get; set; }
///
///
///
- public global::Cohere.ChatResponse? Type118 { get; set; }
+ public global::System.Collections.Generic.IList? Type118 { get; set; }
///
///
///
- public global::System.Collections.Generic.IList? Type119 { get; set; }
+ public global::Cohere.ChatResponse? Type119 { get; set; }
///
///
///
- public global::Cohere.ChatSearchQueriesGenerationEvent? Type120 { get; set; }
+ public global::System.Collections.Generic.IList? Type120 { get; set; }
///
///
///
- public global::Cohere.ChatSearchQueriesGenerationEventVariant2? Type121 { get; set; }
+ public global::Cohere.ChatSearchQueriesGenerationEvent? Type121 { get; set; }
///
///
///
- public global::System.Collections.Generic.IList? Type122 { get; set; }
+ public global::Cohere.ChatSearchQueriesGenerationEventVariant2? Type122 { get; set; }
///
///
///
- public global::Cohere.ChatSearchQuery? Type123 { get; set; }
+ public global::System.Collections.Generic.IList? Type123 { get; set; }
///
///
///
- public global::System.Guid? Type124 { get; set; }
+ public global::Cohere.ChatSearchQuery? Type124 { get; set; }
///
///
///
- public global::Cohere.ChatSearchResult? Type125 { get; set; }
+ public global::System.Guid? Type125 { get; set; }
///
///
///
- public global::Cohere.ChatSearchResultConnector? Type126 { get; set; }
+ public global::Cohere.ChatSearchResult? Type126 { get; set; }
///
///
///
- public global::Cohere.ChatSearchResultsEvent? Type127 { get; set; }
+ public global::Cohere.ChatSearchResultConnector? Type127 { get; set; }
///
///
///
- public global::Cohere.ChatSearchResultsEventVariant2? Type128 { get; set; }
+ public global::Cohere.ChatSearchResultsEvent? Type128 { get; set; }
///
///
///
- public global::System.Collections.Generic.IList? Type129 { get; set; }
+ public global::Cohere.ChatSearchResultsEventVariant2? Type129 { get; set; }
///
///
///
- public global::System.Collections.Generic.IList? Type130 { get; set; }
+ public global::System.Collections.Generic.IList? Type130 { get; set; }
///
///
///
- public global::Cohere.ChatStreamEndEvent? Type131 { get; set; }
+ public global::System.Collections.Generic.IList? Type131 { get; set; }
///
///
///
- public global::Cohere.ChatStreamEndEventVariant2? Type132 { get; set; }
+ public global::Cohere.ChatStreamEndEvent? Type132 { get; set; }
///
///
///
- public global::Cohere.ChatStreamEndEventVariant2FinishReason? Type133 { get; set; }
+ public global::Cohere.ChatStreamEndEventVariant2? Type133 { get; set; }
///
///
///
- public global::Cohere.NonStreamedChatResponse? Type134 { get; set; }
+ public global::Cohere.ChatStreamEndEventVariant2FinishReason? Type134 { get; set; }
///
///
///
- public global::System.Collections.Generic.IList? Type135 { get; set; }
+ public global::Cohere.NonStreamedChatResponse? Type135 { get; set; }
///
///
///
- public global::Cohere.Message? Type136 { get; set; }
+ public global::System.Collections.Generic.IList? Type136 { get; set; }
///
///
///
- public global::Cohere.ToolMessage? Type137 { get; set; }
+ public global::Cohere.Message? Type137 { get; set; }
///
///
///
- public global::System.Collections.Generic.IList? Type138 { get; set; }
+ public global::Cohere.ToolMessage? Type138 { get; set; }
///
///
///
- public global::Cohere.ToolResult? Type139 { get; set; }
+ public global::System.Collections.Generic.IList? Type139 { get; set; }
///
///
///
- public global::System.Collections.Generic.IList