Class ChoiceQuestion
java.lang.Object
org.springframework.ai.decision.question.ChoiceQuestion
- All Implemented Interfaces:
DecisionQuestion
A question answered by picking one of the offered options, as a
ChoiceAnswer.
Each option has a name and, optionally, a description that tells the model when the
option applies; a blank description counts as none.- Since:
- 2.1.0
- Author:
- Thomas Vitale
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic ChoiceQuestion.Builderbuilder()booleanThe option names, in the order they were declared.The options, name to description, in the order they were declared.getText()The question text, which tells the model what to decide.inthashCode()static ChoiceQuestionA question whose options have no description.toString()
-
Method Details
-
of
A question whose options have no description. -
builder
-
getText
Description copied from interface:DecisionQuestionThe question text, which tells the model what to decide.- Specified by:
getTextin interfaceDecisionQuestion
-
getOptions
The options, name to description, in the order they were declared. A description isnullwhen the option has none or a blank one. -
getOptionNames
The option names, in the order they were declared. -
equals
-
hashCode
public int hashCode() -
toString
-