Skip to content

Commit 0989d64

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: 816283438
1 parent 90d4c19 commit 0989d64

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

src/google/adk/models/google_llm.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -313,11 +313,7 @@ async def _preprocess_request(self, llm_request: LlmRequest) -> None:
313313
if llm_request.config and llm_request.config.tools:
314314
# Check if computer use is configured
315315
for tool in llm_request.config.tools:
316-
if (
317-
isinstance(tool, (types.Tool, types.ToolDict))
318-
and hasattr(tool, 'computer_use')
319-
and tool.computer_use
320-
):
316+
if isinstance(tool, types.Tool) and tool.computer_use:
321317
llm_request.config.system_instruction = None
322318
await self._adapt_computer_use_tool(llm_request)
323319

0 commit comments

Comments
 (0)