Package com.tnsai.llm.routing
Class TaskClassifier.Builder
java.lang.Object
com.tnsai.llm.routing.TaskClassifier.Builder
- Enclosing class:
TaskClassifier
Builder for TaskClassifier.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddKeywords(TaskType type, Set<String> keywords) Adds custom keywords for a task type.addPattern(TaskType type, Pattern pattern) Adds a custom pattern for a task type.build()setDefaultType(TaskType defaultType) Sets the default task type when classification confidence is too low.setMinConfidenceThreshold(double threshold) Sets the minimum confidence threshold.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
addKeywords
Adds custom keywords for a task type. -
addPattern
Adds a custom pattern for a task type. -
setDefaultType
Sets the default task type when classification confidence is too low. -
setMinConfidenceThreshold
Sets the minimum confidence threshold. Below this threshold, default type is used. -
build
-