Skip to content

DecisionModelResult

Namespace: Vercel.AI.Operations

public class DecisionModelResult

Model response for doDecide.

Inheritance: object

Derived: EvaluationModelResult

View source

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

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

Creates a model result.

Parameters

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

View source

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

Answers keyed by question id.

Value: IReadOnlyDictionary<string, DecisionAnswer>

View source

public JsonElement? ProviderMetadata { get; }

Provider metadata.

Value: JsonElement?

View source

public ProviderResponse? Response { get; }

Response metadata. Timestamp and model id are filled when omitted.

Value: ProviderResponse

View source

public DecisionRounding? Rounding { get; }

Rounding declaration.

Value: DecisionRounding

View source

public OperationUsage? Usage { get; }

Token usage.

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