Skip to content

Commit 8329fec

Browse files
wuliang229copybara-github
authored andcommitted
chore: Add disambiguation message to enterprise_search_tool
Co-authored-by: Liang Wu <[email protected]> PiperOrigin-RevId: 852969034
1 parent 1ace8fc commit 8329fec

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/google/adk/tools/enterprise_search_tool.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,17 @@
3131
class EnterpriseWebSearchTool(BaseTool):
3232
"""A Gemini 2+ built-in tool using web grounding for Enterprise compliance.
3333
34+
NOTE: This tool is not the same as Vertex AI Search, which is used to be
35+
called "Enterprise Search".
36+
3437
See the documentation for more details:
3538
https://cloud.google.com/vertex-ai/generative-ai/docs/grounding/web-grounding-enterprise.
39+
40+
3641
"""
3742

3843
def __init__(self):
39-
"""Initializes the Vertex AI Search tool."""
44+
"""Initializes the Enterprise Web Search tool."""
4045
# Name and description are not used because this is a model built-in tool.
4146
super().__init__(
4247
name='enterprise_web_search', description='enterprise_web_search'
@@ -52,7 +57,7 @@ async def process_llm_request(
5257
if is_gemini_model(llm_request.model):
5358
if is_gemini_1_model(llm_request.model) and llm_request.config.tools:
5459
raise ValueError(
55-
'Enterprise web search tool cannot be used with other tools in'
60+
'Enterprise Web Search tool cannot be used with other tools in'
5661
' Gemini 1.x.'
5762
)
5863
llm_request.config = llm_request.config or types.GenerateContentConfig()
@@ -62,7 +67,7 @@ async def process_llm_request(
6267
)
6368
else:
6469
raise ValueError(
65-
'Enterprise web search tool is not supported for model'
70+
'Enterprise Web Search tool is not supported for model'
6671
f' {llm_request.model}'
6772
)
6873

0 commit comments

Comments
 (0)