From ea85233651405afb100c39a222130f38e3c49e52 Mon Sep 17 00:00:00 2001 From: Mark Daoust Date: Sun, 24 Nov 2024 06:38:05 -0800 Subject: [PATCH] Fix error message, `google_search_grounding`, not the modes. --- google/generativeai/types/content_types.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/google/generativeai/types/content_types.py b/google/generativeai/types/content_types.py index f3db610e1..9850a091d 100644 --- a/google/generativeai/types/content_types.py +++ b/google/generativeai/types/content_types.py @@ -815,7 +815,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)