Skip to content

Commit e1fe831

Browse files
tbeyer-googlegemini-code-assist[bot]holtskinnerglasnt
authored
chore(genai): Update tools_google_search_with_txt.py to include example for exclude… (#13600)
* Update tools_google_search_with_txt.py to include example for exclude_domains * Update genai/tools/tools_google_search_with_txt.py Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * Update genai/tools/tools_google_search_with_txt.py * Update requirements * Update genai/tools/requirements.txt Co-authored-by: Katie McLaughlin <katie@glasnt.com> --------- Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Co-authored-by: Holt Skinner <13262395+holtskinner@users.noreply.github.com> Co-authored-by: Katie McLaughlin <katie@glasnt.com>
1 parent 6cbd328 commit e1fe831

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

genai/tools/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
google-genai==1.42.0
1+
google-genai==1.45.0
22
# PIl is required for tools_code_execution_with_txt_img.py
33
pillow==11.1.0

genai/tools/tools_google_search_with_txt.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,12 @@ def generate_content() -> str:
3131
config=GenerateContentConfig(
3232
tools=[
3333
# Use Google Search Tool
34-
Tool(google_search=GoogleSearch())
34+
Tool(
35+
google_search=GoogleSearch(
36+
# Optional: Domains to exclude from results
37+
exclude_domains=["domain.com", "domain2.com"]
38+
)
39+
)
3540
],
3641
),
3742
)

0 commit comments

Comments
 (0)