You've already forked adk-python
mirror of
https://github.com/encounter/adk-python.git
synced 2026-03-30 10:57:20 -07:00
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
This commit is contained in:
committed by
Copybara-Service
parent
90d4c19c51
commit
0989d64688
@@ -313,11 +313,7 @@ class Gemini(BaseLlm):
|
||||
if llm_request.config and llm_request.config.tools:
|
||||
# Check if computer use is configured
|
||||
for tool in llm_request.config.tools:
|
||||
if (
|
||||
isinstance(tool, (types.Tool, types.ToolDict))
|
||||
and hasattr(tool, 'computer_use')
|
||||
and tool.computer_use
|
||||
):
|
||||
if isinstance(tool, types.Tool) and tool.computer_use:
|
||||
llm_request.config.system_instruction = None
|
||||
await self._adapt_computer_use_tool(llm_request)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user