You've already forked adk-python
mirror of
https://github.com/encounter/adk-python.git
synced 2026-07-09 18:19:28 -07:00
fix: Support project-based gemini model path to use enterprise_web_search_tool
PiperOrigin-RevId: 780692178
This commit is contained in:
committed by
Copybara-Service
parent
b5d9f8f3e3
commit
e33161b4f8
@@ -47,8 +47,8 @@ class EnterpriseWebSearchTool(BaseTool):
|
||||
tool_context: ToolContext,
|
||||
llm_request: LlmRequest,
|
||||
) -> None:
|
||||
if llm_request.model and llm_request.model.startswith('gemini-'):
|
||||
if llm_request.model.startswith('gemini-1') and llm_request.config.tools:
|
||||
if llm_request.model and 'gemini-' in llm_request.model:
|
||||
if 'gemini-1' in llm_request.model and llm_request.config.tools:
|
||||
raise ValueError(
|
||||
'Enterprise web search tool can not be used with other tools in'
|
||||
' Gemini 1.x.'
|
||||
|
||||
Reference in New Issue
Block a user