Class DecisionServices.Builder<T>
java.lang.Object
dev.langchain4j.service.decision.DecisionServices.Builder<T>
- Enclosing class:
DecisionServices
Builds decision services. Frameworks can extend it (see
DecisionServicesFactory) to build their own
implementations, for example at build time, using DecisionMethod for the analysis of each method.- Since:
- 1.21.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()protected DecisionModeldecisionModel(DecisionModel decisionModel) protected ThresholdProviderthresholdProvider(ThresholdProvider thresholdProvider) Provides the threshold forbooleananswers: the answer istruewhen the probability of "yes" is greater than or equal to the threshold.
-
Constructor Details
-
Builder
-
-
Method Details
-
decisionModel
-
thresholdProvider
Provides the threshold forbooleananswers: the answer istruewhen the probability of "yes" is greater than or equal to the threshold. The provider is called on every invocation, so thresholds can come from configuration that changes at runtime. When it returnsnull, or is not set, the threshold is 0.5. -
serviceInterface
-
decisionModel
-
thresholdProvider
-
build
-