Skip to content

Commit 3f86760

Browse files
seanzhougooglecopybara-github
authored andcommitted
chore: Remove unnecessary check tool type and tool attribute
tool in config.tools cann't be ToolDict and must have computer_use attr PiperOrigin-RevId: 816368064
1 parent 5ac446d commit 3f86760

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

src/google/adk/tools/computer_use/computer_use_toolset.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -190,11 +190,7 @@ async def process_llm_request(
190190

191191
# Check if computer use is already configured
192192
for tool in llm_request.config.tools:
193-
if (
194-
isinstance(tool, (types.Tool, types.ToolDict))
195-
and hasattr(tool, "computer_use")
196-
and tool.computer_use
197-
):
193+
if isinstance(tool, types.Tool) and tool.computer_use:
198194
logger.debug("Computer use already configured in LLM request")
199195
return
200196

0 commit comments

Comments
 (0)