VoyageProvider.VoyageRerankingModel
Namespace: Vercel.AI.Voyage
public sealed class VoyageProvider.VoyageRerankingModel : IRerankingModelVoyage reranking model.
Inheritance: object
Implements: IRerankingModel
Constructors
Section titled “Constructors”VoyageRerankingModel(VoyageProvider, string)
Section titled “VoyageRerankingModel(VoyageProvider, string)”public VoyageRerankingModel(VoyageProvider provider, string modelId)Creates a reranking model.
Parameters
| Name | Type | Description |
|---|---|---|
provider |
VoyageProvider | |
modelId |
string |
Properties
Section titled “Properties”ModelId
Section titled “ModelId”public string ModelId { get; }Model id.
Value: string
Provider
Section titled “Provider”public string Provider { get; }Provider id.
Value: string
Methods
Section titled “Methods”DoRerankAsync(string, IReadOnlyList<string>, int?, CancellationToken, IReadOnlyDictionary<string, string?>?)
Section titled “DoRerankAsync(string, IReadOnlyList<string>, int?, CancellationToken, IReadOnlyDictionary<string, string?>?)”public Task<RerankResult> DoRerankAsync(string query, IReadOnlyList<string> documents, int? topN, CancellationToken cancellationToken, IReadOnlyDictionary<string, string?>? headers = null)Reranks documents for a query. <code class=“paramref”>headers</code> are sent with this call and override the provider headers.
Parameters
| Name | Type | Description |
|---|---|---|
query |
string | |
documents |
IReadOnlyList<string> | |
topN |
int? | |
cancellationToken |
CancellationToken | |
headers |
IReadOnlyDictionary<string, string> |
Returns: Task<RerankResult>
RerankAsync(VoyageRerankRequest, CancellationToken)
Section titled “RerankAsync(VoyageRerankRequest, CancellationToken)”public Task<VoyageRerankResult> RerankAsync(VoyageRerankRequest request, CancellationToken cancellationToken)Reranks text or JSON documents.
Parameters
| Name | Type | Description |
|---|---|---|
request |
VoyageRerankRequest | |
cancellationToken |
CancellationToken |
Returns: Task<VoyageRerankResult>
Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product