DecisionResult
Namespace: Vercel.AI.Operations
public class DecisionResultDecision result.
Inheritance: object
Derived: EvaluateResult
Constructors
Section titled “Constructors”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 |
Properties
Section titled “Properties”Answers
Section titled “Answers”public IReadOnlyDictionary<string, DecisionAnswer> Answers { get; }Answers, with provider numbers unchanged.
Value: IReadOnlyDictionary<string, DecisionAnswer>
ProviderMetadata
Section titled “ProviderMetadata”public JsonElement? ProviderMetadata { get; }Provider metadata.
Value: JsonElement?
Response
Section titled “Response”public ProviderResponse Response { get; }Response. Timestamp and model id are filled when the provider omitted them.
Value: ProviderResponse
Rounding
Section titled “Rounding”public DecisionRounding? Rounding { get; }Rounding declaration.
Value: DecisionRounding
public OperationUsage Usage { get; }Usage. TotalTokens is input plus output when both are set.
Value: OperationUsage
Warnings
Section titled “Warnings”public IReadOnlyList<OperationWarning> Warnings { get; }Warnings.
Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product