`Class Answer.ScoreAnswer.Builder`
java.lang.Object
com.google.adk.classifiers.Answer.ScoreAnswer.Builder
- Enclosing class:
Answer.ScoreAnswer
“Builder for”是一个用于描述某种构建工具或框架的术语。它通常表示该工具/框架用于帮助开发者或系统管理员快速、高效地创建或构建特定类型的应用程序、系统或组件。例如:“Builder for Web Applications”(用于构建Web应用程序的工具)或“Builder for Cloud Services”(用于构建云服务的工具)。
Answer.ScoreAnswer.-
构造函数概述
Constructors -
方法概述
Modifier and TypeMethodDescriptionfinal Answer.ScoreAnswerbuild()生成最终的答案。abstract Answer.ScoreAnswer.Builderconfidence(@Nullable Double confidence) abstract Answer.ScoreAnswer.Builderprobabilities(Map<Integer, Double> probabilities) abstract Answer.ScoreAnswer.Builderscore(double score)
-
构造函数详细信息
-
Builder
public Builder()
-
-
方法详细信息(Method Details)
-
score
-
probabilities
@CanIgnoreReturnValue public abstract Answer.ScoreAnswer.Builder probabilities(Map<Integer, Double> probabilities) -
confidence
@CanIgnoreReturnValue public abstract Answer.ScoreAnswer.Builder confidence(@Nullable Double confidence) -
build
生成最终的答案。- Throws:
IllegalStateException- if the score or the probabilities are not setIllegalArgumentException- if the score is not finite, or if a probability or the confidence is outside [0, 1]
-