Class ModelNameUtils
java.lang.Object
com.google.adk.utils.ModelNameUtils
Utility class for model names.
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleancanUseOutputSchemaWithTools(String modelString) Deprecated.static booleanisGemini2Model(String modelString) static booleanisGemini2OrAbove(@Nullable String modelString) static booleanisGeminiModel(String modelString) static booleanChecks whether an object is an instance ofGemini, by searching through its class hierarchy for a class whose name equals the hardcoded String name of Gemini class.
-
Method Details
-
isGeminiModel
-
isGemini2Model
-
isGemini2OrAbove
-
isInstanceOfGemini
Checks whether an object is an instance ofGemini, by searching through its class hierarchy for a class whose name equals the hardcoded String name of Gemini class.This method can be used where the "real" instanceof check is not possible because the Gemini type is not known at compile time.
- Parameters:
o- The object to check.- Returns:
- true if object's class is
Gemini, false otherwise.
-
canUseOutputSchemaWithTools
Deprecated.UseBaseLlm.capabilities()instead. ADK no longer calls this method.Returns false for agemini-2.*model name and true for any other name.- Parameters:
modelString- The model name or path.- Returns:
- false for a
gemini-2.*model name, true otherwise.
-
BaseLlm.capabilities()instead.