Package com.google.adk.tools
Class SetModelResponseTool
java.lang.Object
com.google.adk.tools.BaseTool
com.google.adk.tools.SetModelResponseTool
Internal tool used for output schema workaround.
This tool allows the model to set its final response when output_schema is configured alongside other tools. The model should use this tool to provide its final structured response instead of outputting text directly.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.google.adk.tools.BaseTool
BaseTool.ToolArgsConfig, BaseTool.ToolConfig -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class com.google.adk.tools.BaseTool
customMetadata, description, fromConfig, longRunning, name, processLlmRequest, runAsync, runAsync, runAsync, runAsync, runAsync, runAsync, setCustomMetadata
-
Field Details
-
NAME
- See Also:
-
-
Constructor Details
-
SetModelResponseTool
public SetModelResponseTool(com.google.genai.types.Schema outputSchema)
-
-
Method Details
-
declaration
Description copied from class:BaseToolGets theFunctionDeclarationrepresentation of this tool.- Overrides:
declarationin classBaseTool
-
runAsync
public io.reactivex.rxjava3.core.Single<Map<String,Object>> runAsync(Map<String, Object> args, ToolContext toolContext) Description copied from class:BaseToolCalls a tool.
-