You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// The identifier of the model to use, one of : `rerank-english-v3.0`, `rerank-multilingual-v3.0`, `rerank-english-v2.0`, `rerank-multilingual-v2.0`
511
+
/// The identifier of the model to use. <br/>
512
+
/// Supported models:<br/>
513
+
/// - `rerank-english-v3.0`<br/>
514
+
/// - `rerank-multilingual-v3.0`<br/>
515
+
/// - `rerank-english-v2.0`<br/>
516
+
/// - `rerank-multilingual-v2.0`
512
517
/// </param>
513
518
/// <param name="query">
514
519
/// The search query
515
520
/// </param>
516
521
/// <param name="documents">
517
-
/// A list of document objects or strings to rerank.<br/>
518
-
/// If a document is provided the text fields is required and all other fields will be preserved in the response.<br/>
519
-
/// The total max chunks (length of documents * max_chunks_per_doc) must be less than 10000.<br/>
520
-
/// We recommend a maximum of 1,000 documents for optimal endpoint performance.
522
+
/// A list of texts that will be compared to the `query`.<br/>
523
+
/// For optimal performance we recommend against sending more than 1,000 documents in a single request.<br/>
524
+
/// **Note**: long documents will automatically be truncated to the value of `max_tokens_per_doc`.<br/>
525
+
/// **Note**: structured data should be formatted as YAML strings for best performance.
521
526
/// </param>
522
527
/// <param name="topN">
523
-
/// The number of most relevant documents or indices to return, defaults to the length of the documents
524
-
/// </param>
525
-
/// <param name="rankFields">
526
-
/// If a JSON object is provided, you can specify which keys you would like to have considered for reranking. The model will rerank based on order of the fields passed in (i.e. rank_fields=['title','author','text'] will rerank using the values in title, author, text sequentially. If the length of title, author, and text exceeds the context length of the model, the chunking will not re-consider earlier fields). If not provided, the model will use the default text field for ranking.
528
+
/// Limits the returned number of rerank results to the specified value. If not passed, all the rerank results will be returned.
527
529
/// </param>
528
530
/// <param name="returnDocuments">
529
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/>
530
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/>
531
533
/// Default Value: false
532
534
/// </param>
533
-
/// <param name="maxChunksPerDoc">
534
-
/// The maximum number of chunks to produce internally from a document<br/>
535
-
/// Default Value: 10
535
+
/// <param name="maxTokensPerDoc">
536
+
/// Defaults to `4096`. Long documents will be automatically truncated to the specified number of tokens.
536
537
/// </param>
537
538
/// <param name="cancellationToken">The token to cancel the operation with</param>
Copy file name to clipboardExpand all lines: src/libs/Cohere/Generated/Cohere.ICohereApi.Rerankv2.g.cs
+14-14Lines changed: 14 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -23,31 +23,32 @@ public partial interface ICohereApi
23
23
/// </summary>
24
24
/// <param name="xClientName"></param>
25
25
/// <param name="model">
26
-
/// The identifier of the model to use, one of : `rerank-english-v3.0`, `rerank-multilingual-v3.0`, `rerank-english-v2.0`, `rerank-multilingual-v2.0`
26
+
/// The identifier of the model to use. <br/>
27
+
/// Supported models:<br/>
28
+
/// - `rerank-english-v3.0`<br/>
29
+
/// - `rerank-multilingual-v3.0`<br/>
30
+
/// - `rerank-english-v2.0`<br/>
31
+
/// - `rerank-multilingual-v2.0`
27
32
/// </param>
28
33
/// <param name="query">
29
34
/// The search query
30
35
/// </param>
31
36
/// <param name="documents">
32
-
/// A list of document objects or strings to rerank.<br/>
33
-
/// If a document is provided the text fields is required and all other fields will be preserved in the response.<br/>
34
-
/// The total max chunks (length of documents * max_chunks_per_doc) must be less than 10000.<br/>
35
-
/// We recommend a maximum of 1,000 documents for optimal endpoint performance.
37
+
/// A list of texts that will be compared to the `query`.<br/>
38
+
/// For optimal performance we recommend against sending more than 1,000 documents in a single request.<br/>
39
+
/// **Note**: long documents will automatically be truncated to the value of `max_tokens_per_doc`.<br/>
40
+
/// **Note**: structured data should be formatted as YAML strings for best performance.
36
41
/// </param>
37
42
/// <param name="topN">
38
-
/// The number of most relevant documents or indices to return, defaults to the length of the documents
39
-
/// </param>
40
-
/// <param name="rankFields">
41
-
/// If a JSON object is provided, you can specify which keys you would like to have considered for reranking. The model will rerank based on order of the fields passed in (i.e. rank_fields=['title','author','text'] will rerank using the values in title, author, text sequentially. If the length of title, author, and text exceeds the context length of the model, the chunking will not re-consider earlier fields). If not provided, the model will use the default text field for ranking.
43
+
/// Limits the returned number of rerank results to the specified value. If not passed, all the rerank results will be returned.
42
44
/// </param>
43
45
/// <param name="returnDocuments">
44
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/>
45
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/>
46
48
/// Default Value: false
47
49
/// </param>
48
-
/// <param name="maxChunksPerDoc">
49
-
/// The maximum number of chunks to produce internally from a document<br/>
50
-
/// Default Value: 10
50
+
/// <param name="maxTokensPerDoc">
51
+
/// Defaults to `4096`. Long documents will be automatically truncated to the specified number of tokens.
51
52
/// </param>
52
53
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// If a JSON object is provided, you can specify which keys you would like to have considered for reranking. The model will rerank based on order of the fields passed in (i.e. rank_fields=['title','author','text'] will rerank using the values in title, author, text sequentially. If the length of title, author, and text exceeds the context length of the model, the chunking will not re-consider earlier fields). If not provided, the model will use the default text field for ranking.
/// - 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/>
51
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/>
@@ -55,11 +54,10 @@ public sealed partial class Rerankv2Request
55
54
publicbool?ReturnDocuments{get;set;}
56
55
57
56
/// <summary>
58
-
/// The maximum number of chunks to produce internally from a document<br/>
59
-
/// Default Value: 10
57
+
/// Defaults to `4096`. Long documents will be automatically truncated to the specified number of tokens.
/// Additional properties that are not explicitly defined in the schema
@@ -71,49 +69,48 @@ public sealed partial class Rerankv2Request
71
69
/// Initializes a new instance of the <see cref="Rerankv2Request" /> class.
72
70
/// </summary>
73
71
/// <param name="model">
74
-
/// The identifier of the model to use, one of : `rerank-english-v3.0`, `rerank-multilingual-v3.0`, `rerank-english-v2.0`, `rerank-multilingual-v2.0`
72
+
/// The identifier of the model to use. <br/>
73
+
/// Supported models:<br/>
74
+
/// - `rerank-english-v3.0`<br/>
75
+
/// - `rerank-multilingual-v3.0`<br/>
76
+
/// - `rerank-english-v2.0`<br/>
77
+
/// - `rerank-multilingual-v2.0`
75
78
/// </param>
76
79
/// <param name="query">
77
80
/// The search query
78
81
/// </param>
79
82
/// <param name="documents">
80
-
/// A list of document objects or strings to rerank.<br/>
81
-
/// If a document is provided the text fields is required and all other fields will be preserved in the response.<br/>
82
-
/// The total max chunks (length of documents * max_chunks_per_doc) must be less than 10000.<br/>
83
-
/// We recommend a maximum of 1,000 documents for optimal endpoint performance.
83
+
/// A list of texts that will be compared to the `query`.<br/>
84
+
/// For optimal performance we recommend against sending more than 1,000 documents in a single request.<br/>
85
+
/// **Note**: long documents will automatically be truncated to the value of `max_tokens_per_doc`.<br/>
86
+
/// **Note**: structured data should be formatted as YAML strings for best performance.
84
87
/// </param>
85
88
/// <param name="topN">
86
-
/// The number of most relevant documents or indices to return, defaults to the length of the documents
87
-
/// </param>
88
-
/// <param name="rankFields">
89
-
/// If a JSON object is provided, you can specify which keys you would like to have considered for reranking. The model will rerank based on order of the fields passed in (i.e. rank_fields=['title','author','text'] will rerank using the values in title, author, text sequentially. If the length of title, author, and text exceeds the context length of the model, the chunking will not re-consider earlier fields). If not provided, the model will use the default text field for ranking.
89
+
/// Limits the returned number of rerank results to the specified value. If not passed, all the rerank results will be returned.
90
90
/// </param>
91
91
/// <param name="returnDocuments">
92
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
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
94
/// Default Value: false
95
95
/// </param>
96
-
/// <param name="maxChunksPerDoc">
97
-
/// The maximum number of chunks to produce internally from a document<br/>
98
-
/// Default Value: 10
96
+
/// <param name="maxTokensPerDoc">
97
+
/// Defaults to `4096`. Long documents will be automatically truncated to the specified number of tokens.
0 commit comments