Skip to content

RerankModelCall

Namespace: Vercel.AI.Operations

public sealed class RerankModelCall

Arguments for doRerank.

Inheritance: object

View source

RerankModelCall(RerankModelDocuments, string, int?, JsonElement?, IReadOnlyDictionary<string, string>?, CancellationToken)

Section titled “RerankModelCall(RerankModelDocuments, string, int?, JsonElement?, IReadOnlyDictionary<string, string>?, CancellationToken)”
public RerankModelCall(RerankModelDocuments documents, string query, int? topN, JsonElement? providerOptions, IReadOnlyDictionary<string, string>? headers, CancellationToken cancellationToken)

Creates a model call.

Parameters

Name Type Description
documents RerankModelDocuments
query string
topN int?
providerOptions JsonElement?
headers IReadOnlyDictionary<string, string>
cancellationToken CancellationToken

View source

public CancellationToken CancellationToken { get; }

Cancellation token.

Value: CancellationToken

View source

public RerankModelDocuments Documents { get; }

Documents.

Value: RerankModelDocuments

View source

public IReadOnlyDictionary<string, string>? Headers { get; }

Request headers. Rerank does not append a user-agent.

Value: IReadOnlyDictionary<string, string>

View source

public JsonElement? ProviderOptions { get; }

Provider options.

Value: JsonElement?

View source

public string Query { get; }

Query.

Value: string

View source

public int? TopN { get; }

Maximum results.

Value: int?

View source

Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product