Class CohereReranker
public class CohereReranker : IReranker
- Inheritance
-
CohereReranker
- Implements
- Inherited Members
Constructors
CohereReranker(string, HttpClient?, string, string)
public CohereReranker(string apiKey, HttpClient? httpClient = null, string model = "rerank-v3.5", string endpoint = "https://api.cohere.com/v2/rerank")
Parameters
apiKeystringhttpClientHttpClientmodelstringendpointstring
Methods
RerankAsync(string, IReadOnlyList<VectorSearchResult>, CancellationToken)
public Task<IReadOnlyList<VectorSearchResult>> RerankAsync(string query, IReadOnlyList<VectorSearchResult> results, CancellationToken cancellationToken = default)
Parameters
querystringresultsIReadOnlyList<VectorSearchResult>cancellationTokenCancellationToken