Skip to content

RerankEndEvent

Namespace: Vercel.AI.Operations

public sealed class RerankEndEvent

End event for rerank.

Inheritance: object

View source

RerankEndEvent(string, string, IReadOnlyDictionary<string, object?>, string, string, IReadOnlyList<object?>, string, IReadOnlyList<RankedDocument>, IReadOnlyList<OperationWarning>, JsonElement?, RerankResponseInfo)

Section titled “RerankEndEvent(string, string, IReadOnlyDictionary<string, object?>, string, string, IReadOnlyList<object?>, string, IReadOnlyList<RankedDocument>, IReadOnlyList<OperationWarning>, JsonElement?, RerankResponseInfo)”
public RerankEndEvent(string callId, string operationId, IReadOnlyDictionary<string, object?> runtimeContext, string provider, string modelId, IReadOnlyList<object?> documents, string query, IReadOnlyList<RankedDocument> ranking, IReadOnlyList<OperationWarning> warnings, JsonElement? providerMetadata, RerankResponseInfo response)

Creates an end event.

Parameters

Name Type Description
callId string
operationId string
runtimeContext IReadOnlyDictionary<string, object>
provider string
modelId string
documents IReadOnlyList<object>
query string
ranking IReadOnlyList<RankedDocument>
warnings IReadOnlyList<OperationWarning>
providerMetadata JsonElement?
response RerankResponseInfo

View source

public string CallId { get; }

Call id.

Value: string

View source

public IReadOnlyList<object?> Documents { get; }

Submitted documents.

Value: IReadOnlyList<object>

View source

public string ModelId { get; }

Model id.

Value: string

View source

public string OperationId { get; }

ai.rerank.

Value: string

View source

public string Provider { get; }

Provider id.

Value: string

View source

public JsonElement? ProviderMetadata { get; }

Provider metadata.

Value: JsonElement?

View source

public string Query { get; }

Query.

Value: string

View source

public IReadOnlyList<RankedDocument> Ranking { get; }

Ranking visible to the callback. The result keeps its own copy.

Value: IReadOnlyList<RankedDocument>

View source

public RerankResponseInfo Response { get; }

Response metadata.

Value: RerankResponseInfo

View source

public IReadOnlyDictionary<string, object?> RuntimeContext { get; }

Runtime context.

Value: IReadOnlyDictionary<string, object>

View source

public IReadOnlyList<OperationWarning> Warnings { get; }

Warnings.

Value: IReadOnlyList<OperationWarning>

View source

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