Skip to content

DecisionChoiceCriteria

Namespace: Vercel.AI.Operations

public sealed class DecisionChoiceCriteria : DecisionCriteria

Criteria of a choice question: a nonempty map of option names to descriptions. A null description means none.

Inheritance: object → DecisionCriteria

View source

DecisionChoiceCriteria(IReadOnlyDictionary<string, DecisionInput?>)

Section titled “DecisionChoiceCriteria(IReadOnlyDictionary<string, DecisionInput?>)”
public DecisionChoiceCriteria(IReadOnlyDictionary<string, DecisionInput?> options)

Creates choice criteria.

Parameters

Name Type Description
options IReadOnlyDictionary<string, DecisionInput>

View source

public override int Count { get; }

Number of options or levels. A boolean has none.

Value: int

View source

public IReadOnlyDictionary<string, DecisionInput?> Options { get; }

Option names with their descriptions, in order.

Value: IReadOnlyDictionary<string, DecisionInput>

View source

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