Skip to content

CohereRerankResult

Namespace: Vercel.AI.Cohere

public sealed class CohereRerankResult

Cohere rerank result. Provider metadata stays unset.

Inheritance: object

View source

CohereRerankResult(IReadOnlyList<RerankItem>, IReadOnlyList<CohereRerankWarning>, JsonElement?, CohereRerankResponse)

Section titled “CohereRerankResult(IReadOnlyList<RerankItem>, IReadOnlyList<CohereRerankWarning>, JsonElement?, CohereRerankResponse)”
public CohereRerankResult(IReadOnlyList<RerankItem> ranking, IReadOnlyList<CohereRerankWarning> warnings, JsonElement? providerMetadata, CohereRerankResponse response)

Creates a rerank result.

Parameters

Name Type Description
ranking IReadOnlyList<RerankItem>
warnings IReadOnlyList<CohereRerankWarning>
providerMetadata JsonElement?
response CohereRerankResponse

View source

public JsonElement? ProviderMetadata { get; }

Always null. The raw payload is Body.

Value: JsonElement?

View source

public IReadOnlyList<RerankItem> Ranking { get; }

Documents in provider order.

Value: IReadOnlyList<RerankItem>

View source

public CohereRerankResponse Response { get; }

Response id, headers, and body.

Value: CohereRerankResponse

View source

public IReadOnlyList<CohereRerankWarning> Warnings { get; }

Warnings. Object documents produce one compatibility warning.

Value: IReadOnlyList<CohereRerankWarning>

View source

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