DecisionQuestion
Namespace: Vercel.AI.Operations
public class DecisionQuestionOne decision question. Maps to DecisionModelV4Question.
Inheritance: object
Derived: EvaluationQuestion
Constructors
Section titled “Constructors”DecisionQuestion(string, DecisionInput?, DecisionCriteria?)
Section titled “DecisionQuestion(string, DecisionInput?, DecisionCriteria?)”public DecisionQuestion(string type, DecisionInput? instructions, DecisionCriteria? criteria = null)Creates a question.
Parameters
| Name | Type | Description |
|---|---|---|
type |
string | choice, score, boolean, or box. |
instructions |
DecisionInput | Instructions as a string, JSON object, or JSON array. A box question requires them. The other types may leave them null when the provider supports it and the criteria define the judgment. |
criteria |
DecisionCriteria | DecisionChoiceCriteria for a choice, DecisionScoreCriteria for a score, and an optional DecisionBooleanCriteria for a boolean. A box question has no criteria. |
Properties
Section titled “Properties”Criteria
Section titled “Criteria”public DecisionCriteria? Criteria { get; }Choice options, ordered score levels, or optional boolean descriptions. A box question has no criteria.
Value: DecisionCriteria
HasInstructions
Section titled “HasInstructions”public bool HasInstructions { get; init; }True when instructions is present. It is true whenever Instructions is set. Set it to true with null
instructions to send an explicit null, as upstream does for instructions: null. A question that leaves it false omits
the field, as upstream does for an absent or undefined value.
Value: bool
Instructions
Section titled “Instructions”public DecisionInput? Instructions { get; }Instructions. A string, JSON object, or JSON array. May be null for choice, score, and boolean questions.
Value: DecisionInput
public string Type { get; }choice, score, boolean, or box.
Value: string
Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product