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
3 changes: 1 addition & 2 deletions src/libs/Cohere/Generated/Cohere.CohereClient.Chatv2.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -589,8 +589,7 @@ partial void ProcessChatv2ResponseContent(
/// <param name="stream">
/// Defaults to `false`.<br/>
/// When `true`, the response will be a SSE stream of events. The final event will contain the complete response, and will have an `event_type` of `"stream-end"`.<br/>
/// Streaming is beneficial for user interfaces that render the contents of the response piece by piece, as it gets generated.<br/>
/// Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments
/// Streaming is beneficial for user interfaces that render the contents of the response piece by piece, as it gets generated.
/// </param>
/// <param name="strictTools">
/// When set to `true`, tool calls in the Assistant message will be forced to follow the tool definition strictly. Learn more in the [Structured Outputs (Tools) guide](https://docs.cohere.com/docs/structured-outputs-json#structured-outputs-tools).<br/>
Expand Down
6 changes: 6 additions & 0 deletions src/libs/Cohere/Generated/Cohere.CohereClient.Embedv2.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -544,6 +544,7 @@ partial void ProcessEmbedv2ResponseContent(
/// - `"clustering"`: Used for the embeddings run through a clustering algorithm.<br/>
/// - `"image"`: Used for embeddings with image input.
/// </param>
/// <param name="inputs"></param>
/// <param name="model">
/// Defaults to embed-english-v2.0<br/>
/// The identifier of the model. Smaller "light" models are faster, while larger models will perform better. [Custom models](https://docs.cohere.com/docs/training-custom-models) can also be supplied with their full ID.<br/>
Expand All @@ -557,6 +558,7 @@ partial void ProcessEmbedv2ResponseContent(
/// * `embed-multilingual-v2.0` 768<br/>
/// Included only in requests
/// </param>
/// <param name="outputDimension"></param>
/// <param name="texts">
/// An array of strings for the model to embed. Maximum number of texts per call is `96`. We recommend reducing the length of each text to be under `512` tokens for optimal quality.<br/>
/// Included only in requests
Expand All @@ -578,14 +580,18 @@ partial void ProcessEmbedv2ResponseContent(
global::Cohere.Embedv2RequestTruncate truncate,
string? xClientName = default,
global::System.Collections.Generic.IList<string>? images = default,
global::System.Collections.Generic.IList<global::Cohere.EmbedInput>? inputs = default,
int? outputDimension = default,
global::System.Threading.CancellationToken cancellationToken = default)
{
var __request = new global::Cohere.Embedv2Request
{
EmbeddingTypes = embeddingTypes,
Images = images,
InputType = inputType,
Inputs = inputs,
Model = model,
OutputDimension = outputDimension,
Texts = texts,
Truncate = truncate,
};
Expand Down
3 changes: 1 addition & 2 deletions src/libs/Cohere/Generated/Cohere.ICohereClient.Chatv2.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,7 @@ public partial interface ICohereClient
/// <param name="stream">
/// Defaults to `false`.<br/>
/// When `true`, the response will be a SSE stream of events. The final event will contain the complete response, and will have an `event_type` of `"stream-end"`.<br/>
/// Streaming is beneficial for user interfaces that render the contents of the response piece by piece, as it gets generated.<br/>
/// Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments
/// Streaming is beneficial for user interfaces that render the contents of the response piece by piece, as it gets generated.
/// </param>
/// <param name="strictTools">
/// When set to `true`, tool calls in the Assistant message will be forced to follow the tool definition strictly. Learn more in the [Structured Outputs (Tools) guide](https://docs.cohere.com/docs/structured-outputs-json#structured-outputs-tools).<br/>
Expand Down
4 changes: 4 additions & 0 deletions src/libs/Cohere/Generated/Cohere.ICohereClient.Embedv2.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ public partial interface ICohereClient
/// - `"clustering"`: Used for the embeddings run through a clustering algorithm.<br/>
/// - `"image"`: Used for embeddings with image input.
/// </param>
/// <param name="inputs"></param>
/// <param name="model">
/// Defaults to embed-english-v2.0<br/>
/// The identifier of the model. Smaller "light" models are faster, while larger models will perform better. [Custom models](https://docs.cohere.com/docs/training-custom-models) can also be supplied with their full ID.<br/>
Expand All @@ -60,6 +61,7 @@ public partial interface ICohereClient
/// * `embed-multilingual-v2.0` 768<br/>
/// Included only in requests
/// </param>
/// <param name="outputDimension"></param>
/// <param name="texts">
/// An array of strings for the model to embed. Maximum number of texts per call is `96`. We recommend reducing the length of each text to be under `512` tokens for optimal quality.<br/>
/// Included only in requests
Expand All @@ -81,6 +83,8 @@ public partial interface ICohereClient
global::Cohere.Embedv2RequestTruncate truncate,
string? xClientName = default,
global::System.Collections.Generic.IList<string>? images = default,
global::System.Collections.Generic.IList<global::Cohere.EmbedInput>? inputs = default,
int? outputDimension = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
}
6 changes: 2 additions & 4 deletions src/libs/Cohere/Generated/Cohere.Models.Chatv2Request.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,7 @@ public sealed partial class Chatv2Request
/// <summary>
/// Defaults to `false`.<br/>
/// When `true`, the response will be a SSE stream of events. The final event will contain the complete response, and will have an `event_type` of `"stream-end"`.<br/>
/// Streaming is beneficial for user interfaces that render the contents of the response piece by piece, as it gets generated.<br/>
/// Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments
/// Streaming is beneficial for user interfaces that render the contents of the response piece by piece, as it gets generated.
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("stream")]
public bool? Stream { get; set; }
Expand Down Expand Up @@ -244,8 +243,7 @@ public sealed partial class Chatv2Request
/// <param name="stream">
/// Defaults to `false`.<br/>
/// When `true`, the response will be a SSE stream of events. The final event will contain the complete response, and will have an `event_type` of `"stream-end"`.<br/>
/// Streaming is beneficial for user interfaces that render the contents of the response piece by piece, as it gets generated.<br/>
/// Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments
/// Streaming is beneficial for user interfaces that render the contents of the response piece by piece, as it gets generated.
/// </param>
/// <param name="strictTools">
/// When set to `true`, tool calls in the Assistant message will be forced to follow the tool definition strictly. Learn more in the [Structured Outputs (Tools) guide](https://docs.cohere.com/docs/structured-outputs-json#structured-outputs-tools).<br/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@ public sealed partial class EmbedByTypeResponse
/// The text entries for which embeddings were returned.
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("texts")]
[global::System.Text.Json.Serialization.JsonRequired]
public required global::System.Collections.Generic.IList<string> Texts { get; set; }
public global::System.Collections.Generic.IList<string>? Texts { get; set; }

/// <summary>
/// Additional properties that are not explicitly defined in the schema
Expand Down Expand Up @@ -76,18 +75,18 @@ public sealed partial class EmbedByTypeResponse
#endif
public EmbedByTypeResponse(
string id,
global::System.Collections.Generic.IList<string> texts,
global::System.Collections.Generic.IList<global::Cohere.Image>? images,
global::Cohere.ApiMeta? meta,
global::Cohere.EmbedByTypeResponseResponseType? responseType,
global::System.Collections.Generic.IList<string>? texts,
global::Cohere.EmbedByTypeResponseEmbeddings embeddings = default!)
{
this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id));
this.Texts = texts ?? throw new global::System.ArgumentNullException(nameof(texts));
this.Embeddings = embeddings;
this.Images = images;
this.Meta = meta;
this.ResponseType = responseType;
this.Texts = texts;
}

/// <summary>
Expand Down
92 changes: 92 additions & 0 deletions src/libs/Cohere/Generated/Cohere.Models.EmbedContent.Json.g.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
#nullable enable

namespace Cohere
{
public readonly partial struct EmbedContent
{
/// <summary>
/// Serializes the current instance to a JSON string using the provided JsonSerializerContext.
/// </summary>
public string ToJson(
global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
{
return global::System.Text.Json.JsonSerializer.Serialize(
this,
this.GetType(),
jsonSerializerContext);
}

/// <summary>
/// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
/// </summary>
#if NET8_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
[global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
#endif
public string ToJson(
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
return global::System.Text.Json.JsonSerializer.Serialize(
this,
jsonSerializerOptions);
}

/// <summary>
/// Deserializes a JSON string using the provided JsonSerializerContext.
/// </summary>
public static global::Cohere.EmbedContent? FromJson(
string json,
global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
{
return global::System.Text.Json.JsonSerializer.Deserialize(
json,
typeof(global::Cohere.EmbedContent),
jsonSerializerContext) as global::Cohere.EmbedContent?;
}

/// <summary>
/// Deserializes a JSON string using the provided JsonSerializerOptions.
/// </summary>
#if NET8_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
[global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that 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.EmbedContent? FromJson(
string json,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
return global::System.Text.Json.JsonSerializer.Deserialize<global::Cohere.EmbedContent>(
json,
jsonSerializerOptions);
}

/// <summary>
/// Deserializes a JSON stream using the provided JsonSerializerContext.
/// </summary>
public static async global::System.Threading.Tasks.ValueTask<global::Cohere.EmbedContent?> 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.EmbedContent),
jsonSerializerContext).ConfigureAwait(false)) as global::Cohere.EmbedContent?;
}

/// <summary>
/// Deserializes a JSON stream using the provided JsonSerializerOptions.
/// </summary>
#if NET8_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
[global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed 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.EmbedContent?> FromJsonStreamAsync(
global::System.IO.Stream jsonStream,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
return global::System.Text.Json.JsonSerializer.DeserializeAsync<global::Cohere.EmbedContent?>(
jsonStream,
jsonSerializerOptions);
}
}
}
Loading