Class LlmClassifier.Builder
java.lang.Object
com.google.adk.classifiers.LlmClassifier.Builder
- Enclosing class:
LlmClassifier
Builder for
LlmClassifier. Only the model is required.-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the classifier.generateContentConfig(@Nullable com.google.genai.types.GenerateContentConfig generateContentConfig) Sets generation settings such as the temperature.Sets the model that answers the questions, replacing any model name set before.Sets the name of the model that answers the questions, whichLlmRegistryresolves on each call, replacing any model set before.
-
Method Details
-
model
Sets the model that answers the questions, replacing any model name set before. -
model
Sets the name of the model that answers the questions, whichLlmRegistryresolves on each call, replacing any model set before. -
generateContentConfig
@CanIgnoreReturnValue public LlmClassifier.Builder generateContentConfig(@Nullable com.google.genai.types.GenerateContentConfig generateContentConfig) Sets generation settings such as the temperature. They must not set the system instruction or a response schema, which the classifier builds from the questions, and the response MIME type is replaced with JSON. -
build
Builds the classifier.- Throws:
IllegalStateException- if no model is setIllegalArgumentException- if the generation settings set a system instruction or a response schema
-