Skip to content

Commit e8bc9b8

Browse files
author
github-actions[bot]
committed
feat: Updated OpenAPI spec
1 parent 7fe30a3 commit e8bc9b8

9 files changed

+273
-478
lines changed

src/libs/Cohere/Generated/Cohere.CohereApi.Rerankv2.g.cs

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -508,7 +508,7 @@ partial void ProcessRerankv2ResponseContent(
508508
/// </summary>
509509
/// <param name="xClientName"></param>
510510
/// <param name="model">
511-
/// The identifier of the model to use. <br/>
511+
/// The identifier of the model to use.<br/>
512512
/// Supported models:<br/>
513513
/// - `rerank-english-v3.0`<br/>
514514
/// - `rerank-multilingual-v3.0`<br/>
@@ -525,12 +525,7 @@ partial void ProcessRerankv2ResponseContent(
525525
/// **Note**: structured data should be formatted as YAML strings for best performance.
526526
/// </param>
527527
/// <param name="topN">
528-
/// Limits the returned number of rerank results to the specified value. If not passed, all the rerank results will be returned.
529-
/// </param>
530-
/// <param name="returnDocuments">
531-
/// - 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/>
532-
/// - 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/>
533-
/// Default Value: false
528+
/// Limits the number of returned rerank results to the specified value. If not passed, all the rerank results will be returned.
534529
/// </param>
535530
/// <param name="maxTokensPerDoc">
536531
/// Defaults to `4096`. Long documents will be automatically truncated to the specified number of tokens.
@@ -540,10 +535,9 @@ partial void ProcessRerankv2ResponseContent(
540535
public async global::System.Threading.Tasks.Task<global::Cohere.Rerankv2Response> Rerankv2Async(
541536
string model,
542537
string query,
543-
global::System.Collections.Generic.IList<global::Cohere.OneOf<string, global::Cohere.RerankDocument>> documents,
538+
global::System.Collections.Generic.IList<string> documents,
544539
string? xClientName = default,
545540
int? topN = default,
546-
bool? returnDocuments = default,
547541
int? maxTokensPerDoc = default,
548542
global::System.Threading.CancellationToken cancellationToken = default)
549543
{
@@ -553,7 +547,6 @@ partial void ProcessRerankv2ResponseContent(
553547
Query = query,
554548
Documents = documents,
555549
TopN = topN,
556-
ReturnDocuments = returnDocuments,
557550
MaxTokensPerDoc = maxTokensPerDoc,
558551
};
559552

src/libs/Cohere/Generated/Cohere.ICohereApi.Rerankv2.g.cs

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public partial interface ICohereApi
2323
/// </summary>
2424
/// <param name="xClientName"></param>
2525
/// <param name="model">
26-
/// The identifier of the model to use. <br/>
26+
/// The identifier of the model to use.<br/>
2727
/// Supported models:<br/>
2828
/// - `rerank-english-v3.0`<br/>
2929
/// - `rerank-multilingual-v3.0`<br/>
@@ -40,12 +40,7 @@ public partial interface ICohereApi
4040
/// **Note**: structured data should be formatted as YAML strings for best performance.
4141
/// </param>
4242
/// <param name="topN">
43-
/// Limits the returned number of rerank results to the specified value. If not passed, all the rerank results will be returned.
44-
/// </param>
45-
/// <param name="returnDocuments">
46-
/// - 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/>
47-
/// - 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/>
48-
/// Default Value: false
43+
/// Limits the number of returned rerank results to the specified value. If not passed, all the rerank results will be returned.
4944
/// </param>
5045
/// <param name="maxTokensPerDoc">
5146
/// Defaults to `4096`. Long documents will be automatically truncated to the specified number of tokens.
@@ -55,10 +50,9 @@ public partial interface ICohereApi
5550
global::System.Threading.Tasks.Task<global::Cohere.Rerankv2Response> Rerankv2Async(
5651
string model,
5752
string query,
58-
global::System.Collections.Generic.IList<global::Cohere.OneOf<string, global::Cohere.RerankDocument>> documents,
53+
global::System.Collections.Generic.IList<string> documents,
5954
string? xClientName = default,
6055
int? topN = default,
61-
bool? returnDocuments = default,
6256
int? maxTokensPerDoc = default,
6357
global::System.Threading.CancellationToken cancellationToken = default);
6458
}

src/libs/Cohere/Generated/Cohere.Models.Rerankv2Request.g.cs

Lines changed: 6 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11

2-
#pragma warning disable CS0618 // Type or member is obsolete
3-
42
#nullable enable
53

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

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

48-
/// <summary>
49-
/// - 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/>
50-
/// - 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/>
51-
/// Default Value: false
52-
/// </summary>
53-
[global::System.Text.Json.Serialization.JsonPropertyName("return_documents")]
54-
public bool? ReturnDocuments { get; set; }
55-
5646
/// <summary>
5747
/// Defaults to `4096`. Long documents will be automatically truncated to the specified number of tokens.
5848
/// </summary>
@@ -69,7 +59,7 @@ public sealed partial class Rerankv2Request
6959
/// Initializes a new instance of the <see cref="Rerankv2Request" /> class.
7060
/// </summary>
7161
/// <param name="model">
72-
/// The identifier of the model to use. <br/>
62+
/// The identifier of the model to use.<br/>
7363
/// Supported models:<br/>
7464
/// - `rerank-english-v3.0`<br/>
7565
/// - `rerank-multilingual-v3.0`<br/>
@@ -86,12 +76,7 @@ public sealed partial class Rerankv2Request
8676
/// **Note**: structured data should be formatted as YAML strings for best performance.
8777
/// </param>
8878
/// <param name="topN">
89-
/// Limits the returned number of rerank results to the specified value. If not passed, all the rerank results will be returned.
90-
/// </param>
91-
/// <param name="returnDocuments">
92-
/// - 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/>
93-
/// - 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/>
94-
/// Default Value: false
79+
/// Limits the number of returned rerank results to the specified value. If not passed, all the rerank results will be returned.
9580
/// </param>
9681
/// <param name="maxTokensPerDoc">
9782
/// Defaults to `4096`. Long documents will be automatically truncated to the specified number of tokens.
@@ -100,16 +85,14 @@ public sealed partial class Rerankv2Request
10085
public Rerankv2Request(
10186
string model,
10287
string query,
103-
global::System.Collections.Generic.IList<global::Cohere.OneOf<string, global::Cohere.RerankDocument>> documents,
88+
global::System.Collections.Generic.IList<string> documents,
10489
int? topN,
105-
bool? returnDocuments,
10690
int? maxTokensPerDoc)
10791
{
10892
this.Model = model ?? throw new global::System.ArgumentNullException(nameof(model));
10993
this.Query = query ?? throw new global::System.ArgumentNullException(nameof(query));
11094
this.Documents = documents ?? throw new global::System.ArgumentNullException(nameof(documents));
11195
this.TopN = topN;
112-
this.ReturnDocuments = returnDocuments;
11396
this.MaxTokensPerDoc = maxTokensPerDoc;
11497
}
11598

src/libs/Cohere/Generated/Cohere.Models.Rerankv2ResponseResult.g.cs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,6 @@ namespace Cohere
88
/// </summary>
99
public sealed partial class Rerankv2ResponseResult
1010
{
11-
/// <summary>
12-
/// If `return_documents` is set as `false` this will return none, if `true` it will return the documents passed in
13-
/// </summary>
14-
[global::System.Text.Json.Serialization.JsonPropertyName("document")]
15-
public global::Cohere.Rerankv2ResponseResultDocument? Document { get; set; }
16-
1711
/// <summary>
1812
/// 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)
1913
/// </summary>
@@ -38,9 +32,6 @@ public sealed partial class Rerankv2ResponseResult
3832
/// <summary>
3933
/// Initializes a new instance of the <see cref="Rerankv2ResponseResult" /> class.
4034
/// </summary>
41-
/// <param name="document">
42-
/// If `return_documents` is set as `false` this will return none, if `true` it will return the documents passed in
43-
/// </param>
4435
/// <param name="index">
4536
/// 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)
4637
/// </param>
@@ -51,11 +42,9 @@ public sealed partial class Rerankv2ResponseResult
5142
[global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
5243
public Rerankv2ResponseResult(
5344
int index,
54-
global::Cohere.Rerankv2ResponseResultDocument? document,
5545
float relevanceScore = default!)
5646
{
5747
this.Index = index;
58-
this.Document = document;
5948
this.RelevanceScore = relevanceScore;
6049
}
6150

src/libs/Cohere/Generated/Cohere.Models.Rerankv2ResponseResultDocument.Json.g.cs

Lines changed: 0 additions & 92 deletions
This file was deleted.

src/libs/Cohere/Generated/Cohere.Models.Rerankv2ResponseResultDocument.g.cs

Lines changed: 0 additions & 44 deletions
This file was deleted.

src/libs/Cohere/Generated/JsonSerializerContext.g.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,6 @@ namespace Cohere
171171
typeof(global::Cohere.JsonConverters.OneOfJsonConverter<string, global::System.Collections.Generic.IList<global::Cohere.ToolContent>>),
172172
typeof(global::Cohere.JsonConverters.OneOfJsonConverter<string, global::Cohere.Document>),
173173
typeof(global::Cohere.JsonConverters.OneOfJsonConverter<string, global::Cohere.RerankDocument>),
174-
typeof(global::Cohere.JsonConverters.OneOfJsonConverter<string, global::Cohere.RerankDocument>),
175174
typeof(global::Cohere.JsonConverters.OneOfJsonConverter<global::Cohere.NonStreamedChatResponse, global::Cohere.StreamedChatResponse?>),
176175
typeof(global::Cohere.JsonConverters.OneOfJsonConverter<global::Cohere.ChatResponse, global::Cohere.StreamedChatResponseV2?>),
177176
typeof(global::Cohere.JsonConverters.OneOfJsonConverter<global::Cohere.EmbedFloatsResponse, global::Cohere.EmbedByTypeResponse>),

0 commit comments

Comments
 (0)