Skip to content

DecisionResult

Namespace: Vercel.AI.Operations

public class DecisionResult

Decision result.

Inheritance: object

Derived: EvaluateResult

View source

DecisionResult(IReadOnlyDictionary<string, DecisionAnswer>, OperationUsage, IReadOnlyList<OperationWarning>, DecisionRounding?, JsonElement?, ProviderResponse)

Section titled “DecisionResult(IReadOnlyDictionary<string, DecisionAnswer>, OperationUsage, IReadOnlyList<OperationWarning>, DecisionRounding?, JsonElement?, ProviderResponse)”
public DecisionResult(IReadOnlyDictionary<string, DecisionAnswer> answers, OperationUsage usage, IReadOnlyList<OperationWarning> warnings, DecisionRounding? rounding, JsonElement? providerMetadata, ProviderResponse response)

Creates a result.

Parameters

Name Type Description
answers IReadOnlyDictionary<string, DecisionAnswer>
usage OperationUsage
warnings IReadOnlyList<OperationWarning>
rounding DecisionRounding
providerMetadata JsonElement?
response ProviderResponse

View source

public IReadOnlyDictionary<string, DecisionAnswer> Answers { get; }

Answers, with provider numbers unchanged.

Value: IReadOnlyDictionary<string, DecisionAnswer>

View source

public JsonElement? ProviderMetadata { get; }

Provider metadata.

Value: JsonElement?

View source

public ProviderResponse Response { get; }

Response. Timestamp and model id are filled when the provider omitted them.

Value: ProviderResponse

View source

public DecisionRounding? Rounding { get; }

Rounding declaration.

Value: DecisionRounding

View source

public OperationUsage Usage { get; }

Usage. TotalTokens is input plus output when both are set.

Value: OperationUsage

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