Skip to content

Commit

Permalink
Merge pull request #6 from google-gemini/MarkDaoust-patch-4
Browse files Browse the repository at this point in the history
Fix error message, `google_search_grounding`, not the modes.
  • Loading branch information
meslubi2021 authored Jan 10, 2025
2 parents 739b89a + ea85233 commit 4654d7e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion google/generativeai/types/content_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -728,7 +728,7 @@ def _make_tool(tool: ToolType) -> Tool:
return Tool(google_search_retrieval=protos.GoogleSearchRetrieval())
else:
raise ValueError(
"The only string that can be passed as a tool is 'code_execution', or one of the specified values for the `mode` parameter for google_search_retrieval."
"The only strings that can be passed as a `tool` is 'code_execution' or 'google_search_retrieval'."
)
elif isinstance(tool, protos.CodeExecution):
return Tool(code_execution=tool)
Expand Down

0 comments on commit 4654d7e

Please sign in to comment.