Class ModelNameUtils
java.lang.Object
com.google.adk.utils.ModelNameUtils
Utility class for model names.
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleancanUseOutputSchemaWithTools(String modelString) Returns true if the model supports using output schema together with tools.static booleanisGemini2Model(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
-
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
Returns true if the model supports using output schema together with tools.- Parameters:
modelString- The model name or path.- Returns:
- true if output schema with tools is supported, false otherwise.
-