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
13 changes: 3 additions & 10 deletions src/libs/Cohere/Generated/Cohere.CohereApi.Rerankv2.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@ partial void ProcessRerankv2ResponseContent(
/// </summary>
/// <param name="xClientName"></param>
/// <param name="model">
/// The identifier of the model to use. <br/>
/// The identifier of the model to use.<br/>
/// Supported models:<br/>
/// - `rerank-english-v3.0`<br/>
/// - `rerank-multilingual-v3.0`<br/>
Expand All @@ -525,12 +525,7 @@ partial void ProcessRerankv2ResponseContent(
/// **Note**: structured data should be formatted as YAML strings for best performance.
/// </param>
/// <param name="topN">
/// Limits the returned number of rerank results to the specified value. If not passed, all the rerank results will be returned.
/// </param>
/// <param name="returnDocuments">
/// - If false, returns results without the doc text - the api will return a list of {index, relevance score} where index is inferred from the list passed into the request.<br/>
/// - If true, returns results with the doc text passed in - the api will return an ordered list of {index, text, relevance score} where index + text refers to the list passed into the request.<br/>
/// Default Value: false
/// Limits the number of returned rerank results to the specified value. If not passed, all the rerank results will be returned.
/// </param>
/// <param name="maxTokensPerDoc">
/// Defaults to `4096`. Long documents will be automatically truncated to the specified number of tokens.
Expand All @@ -540,10 +535,9 @@ partial void ProcessRerankv2ResponseContent(
public async global::System.Threading.Tasks.Task<global::Cohere.Rerankv2Response> Rerankv2Async(
string model,
string query,
global::System.Collections.Generic.IList<global::Cohere.OneOf<string, global::Cohere.RerankDocument>> documents,
global::System.Collections.Generic.IList<string> documents,
string? xClientName = default,
int? topN = default,
bool? returnDocuments = default,
int? maxTokensPerDoc = default,
global::System.Threading.CancellationToken cancellationToken = default)
{
Expand All @@ -553,7 +547,6 @@ partial void ProcessRerankv2ResponseContent(
Query = query,
Documents = documents,
TopN = topN,
ReturnDocuments = returnDocuments,
MaxTokensPerDoc = maxTokensPerDoc,
};

Expand Down
12 changes: 3 additions & 9 deletions src/libs/Cohere/Generated/Cohere.ICohereApi.Rerankv2.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public partial interface ICohereApi
/// </summary>
/// <param name="xClientName"></param>
/// <param name="model">
/// The identifier of the model to use. <br/>
/// The identifier of the model to use.<br/>
/// Supported models:<br/>
/// - `rerank-english-v3.0`<br/>
/// - `rerank-multilingual-v3.0`<br/>
Expand All @@ -40,12 +40,7 @@ public partial interface ICohereApi
/// **Note**: structured data should be formatted as YAML strings for best performance.
/// </param>
/// <param name="topN">
/// Limits the returned number of rerank results to the specified value. If not passed, all the rerank results will be returned.
/// </param>
/// <param name="returnDocuments">
/// - If false, returns results without the doc text - the api will return a list of {index, relevance score} where index is inferred from the list passed into the request.<br/>
/// - If true, returns results with the doc text passed in - the api will return an ordered list of {index, text, relevance score} where index + text refers to the list passed into the request.<br/>
/// Default Value: false
/// Limits the number of returned rerank results to the specified value. If not passed, all the rerank results will be returned.
/// </param>
/// <param name="maxTokensPerDoc">
/// Defaults to `4096`. Long documents will be automatically truncated to the specified number of tokens.
Expand All @@ -55,10 +50,9 @@ public partial interface ICohereApi
global::System.Threading.Tasks.Task<global::Cohere.Rerankv2Response> Rerankv2Async(
string model,
string query,
global::System.Collections.Generic.IList<global::Cohere.OneOf<string, global::Cohere.RerankDocument>> documents,
global::System.Collections.Generic.IList<string> documents,
string? xClientName = default,
int? topN = default,
bool? returnDocuments = default,
int? maxTokensPerDoc = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
Expand Down
29 changes: 6 additions & 23 deletions src/libs/Cohere/Generated/Cohere.Models.Rerankv2Request.g.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@

#pragma warning disable CS0618 // Type or member is obsolete

#nullable enable

namespace Cohere
Expand All @@ -11,7 +9,7 @@ namespace Cohere
public sealed partial class Rerankv2Request
{
/// <summary>
/// The identifier of the model to use. <br/>
/// The identifier of the model to use.<br/>
/// Supported models:<br/>
/// - `rerank-english-v3.0`<br/>
/// - `rerank-multilingual-v3.0`<br/>
Expand All @@ -37,22 +35,14 @@ public sealed partial class Rerankv2Request
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("documents")]
[global::System.Text.Json.Serialization.JsonRequired]
public required global::System.Collections.Generic.IList<global::Cohere.OneOf<string, global::Cohere.RerankDocument>> Documents { get; set; }
public required global::System.Collections.Generic.IList<string> Documents { get; set; }

/// <summary>
/// Limits the returned number of rerank results to the specified value. If not passed, all the rerank results will be returned.
/// Limits the number of returned rerank results to the specified value. If not passed, all the rerank results will be returned.
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("top_n")]
public int? TopN { get; set; }

/// <summary>
/// - If false, returns results without the doc text - the api will return a list of {index, relevance score} where index is inferred from the list passed into the request.<br/>
/// - If true, returns results with the doc text passed in - the api will return an ordered list of {index, text, relevance score} where index + text refers to the list passed into the request.<br/>
/// Default Value: false
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("return_documents")]
public bool? ReturnDocuments { get; set; }

/// <summary>
/// Defaults to `4096`. Long documents will be automatically truncated to the specified number of tokens.
/// </summary>
Expand All @@ -69,7 +59,7 @@ public sealed partial class Rerankv2Request
/// Initializes a new instance of the <see cref="Rerankv2Request" /> class.
/// </summary>
/// <param name="model">
/// The identifier of the model to use. <br/>
/// The identifier of the model to use.<br/>
/// Supported models:<br/>
/// - `rerank-english-v3.0`<br/>
/// - `rerank-multilingual-v3.0`<br/>
Expand All @@ -86,12 +76,7 @@ public sealed partial class Rerankv2Request
/// **Note**: structured data should be formatted as YAML strings for best performance.
/// </param>
/// <param name="topN">
/// Limits the returned number of rerank results to the specified value. If not passed, all the rerank results will be returned.
/// </param>
/// <param name="returnDocuments">
/// - If false, returns results without the doc text - the api will return a list of {index, relevance score} where index is inferred from the list passed into the request.<br/>
/// - If true, returns results with the doc text passed in - the api will return an ordered list of {index, text, relevance score} where index + text refers to the list passed into the request.<br/>
/// Default Value: false
/// Limits the number of returned rerank results to the specified value. If not passed, all the rerank results will be returned.
/// </param>
/// <param name="maxTokensPerDoc">
/// Defaults to `4096`. Long documents will be automatically truncated to the specified number of tokens.
Expand All @@ -100,16 +85,14 @@ public sealed partial class Rerankv2Request
public Rerankv2Request(
string model,
string query,
global::System.Collections.Generic.IList<global::Cohere.OneOf<string, global::Cohere.RerankDocument>> documents,
global::System.Collections.Generic.IList<string> documents,
int? topN,
bool? returnDocuments,
int? maxTokensPerDoc)
{
this.Model = model ?? throw new global::System.ArgumentNullException(nameof(model));
this.Query = query ?? throw new global::System.ArgumentNullException(nameof(query));
this.Documents = documents ?? throw new global::System.ArgumentNullException(nameof(documents));
this.TopN = topN;
this.ReturnDocuments = returnDocuments;
this.MaxTokensPerDoc = maxTokensPerDoc;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,6 @@ namespace Cohere
/// </summary>
public sealed partial class Rerankv2ResponseResult
{
/// <summary>
/// If `return_documents` is set as `false` this will return none, if `true` it will return the documents passed in
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("document")]
public global::Cohere.Rerankv2ResponseResultDocument? Document { get; set; }

/// <summary>
/// Corresponds to the index in the original list of documents to which the ranked document belongs. (i.e. if the first value in the `results` object has an `index` value of 3, it means in the list of documents passed in, the document at `index=3` had the highest relevance)
/// </summary>
Expand All @@ -38,9 +32,6 @@ public sealed partial class Rerankv2ResponseResult
/// <summary>
/// Initializes a new instance of the <see cref="Rerankv2ResponseResult" /> class.
/// </summary>
/// <param name="document">
/// If `return_documents` is set as `false` this will return none, if `true` it will return the documents passed in
/// </param>
/// <param name="index">
/// Corresponds to the index in the original list of documents to which the ranked document belongs. (i.e. if the first value in the `results` object has an `index` value of 3, it means in the list of documents passed in, the document at `index=3` had the highest relevance)
/// </param>
Expand All @@ -51,11 +42,9 @@ public sealed partial class Rerankv2ResponseResult
[global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
public Rerankv2ResponseResult(
int index,
global::Cohere.Rerankv2ResponseResultDocument? document,
float relevanceScore = default!)
{
this.Index = index;
this.Document = document;
this.RelevanceScore = relevanceScore;
}

Expand Down

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion src/libs/Cohere/Generated/JsonSerializerContext.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,6 @@ namespace Cohere
typeof(global::Cohere.JsonConverters.OneOfJsonConverter<string, global::System.Collections.Generic.IList<global::Cohere.ToolContent>>),
typeof(global::Cohere.JsonConverters.OneOfJsonConverter<string, global::Cohere.Document>),
typeof(global::Cohere.JsonConverters.OneOfJsonConverter<string, global::Cohere.RerankDocument>),
typeof(global::Cohere.JsonConverters.OneOfJsonConverter<string, global::Cohere.RerankDocument>),
typeof(global::Cohere.JsonConverters.OneOfJsonConverter<global::Cohere.NonStreamedChatResponse, global::Cohere.StreamedChatResponse?>),
typeof(global::Cohere.JsonConverters.OneOfJsonConverter<global::Cohere.ChatResponse, global::Cohere.StreamedChatResponseV2?>),
typeof(global::Cohere.JsonConverters.OneOfJsonConverter<global::Cohere.EmbedFloatsResponse, global::Cohere.EmbedByTypeResponse>),
Expand Down
Loading
Loading