Class DecisionQuestion
java.lang.Object
com.alibaba.dashscope.types.decision.DecisionQuestion
One question for the decision model (TypeSafe System One). Use
choice(java.lang.String, java.util.Map<java.lang.String, java.lang.String>), noul(java.lang.String),
score(java.lang.String, java.util.List<java.lang.String>) for typed questions, or raw(Map) to pass a wire-shaped question through
untouched — the escape hatch that keeps future question fields usable before this SDK models them
(raw questions skip client-side validation).
criteria shape follows type: choice takes a Map<optionName,
description> (1–255 options; give the full set and add an other fallback); score
takes a List of level descriptions ordered low to high (2–255 levels; 3–7 clearly
distinguishable levels work best); noul takes an optional Map with "true"
/ "false" keys.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intDocumented bounds onchoiceoptions /scorelevels.static final intstatic final StringMultiple choice; the answer carries the selected option name.static final StringYes/no judgement; the answer is P(yes), 0 = no and 1 = yes.static final StringOrdinal scale; the answer is the probability-weighted level index. -
Method Summary
Modifier and TypeMethodDescriptionstatic DecisionQuestionA pick-one-of-N question.getRaw()getType()booleanisRaw()true when this question is a raw wire passthrough.static DecisionQuestionA yes/no judgement without explicit outcome descriptions.static DecisionQuestionA yes/no judgement; either description may be null to omit it.static DecisionQuestionA raw wire-shaped question ({type: ..., ...}), passed through unvalidated.static DecisionQuestionAn ordinal-scale rating, levels ordered low to high.
-
Field Details
-
TYPE_CHOICE
Multiple choice; the answer carries the selected option name.- See Also:
-
TYPE_NOUL
Yes/no judgement; the answer is P(yes), 0 = no and 1 = yes.- See Also:
-
TYPE_SCORE
Ordinal scale; the answer is the probability-weighted level index.- See Also:
-
MIN_CRITERIA_SIZE
public static final int MIN_CRITERIA_SIZEDocumented bounds onchoiceoptions /scorelevels.- See Also:
-
MAX_CHOICE_OPTIONS
public static final int MAX_CHOICE_OPTIONS- See Also:
-
MIN_SCORE_LEVELS
public static final int MIN_SCORE_LEVELS- See Also:
-
MAX_SCORE_LEVELS
public static final int MAX_SCORE_LEVELS- See Also:
-
-
Method Details
-
choice
A pick-one-of-N question. -
noul
A yes/no judgement without explicit outcome descriptions. -
noul
A yes/no judgement; either description may be null to omit it. -
score
An ordinal-scale rating, levels ordered low to high. -
raw
A raw wire-shaped question ({type: ..., ...}), passed through unvalidated. -
getType
-
getInstructions
-
getCriteria
-
isRaw
public boolean isRaw()true when this question is a raw wire passthrough. -
getRaw
-