From 2301d79ed2b08b4b76066ff0598236468ad656e7 Mon Sep 17 00:00:00 2001 From: A Vertex SDK engineer Date: Fri, 19 Jan 2024 10:17:10 -0800 Subject: [PATCH] fix: fix typo in raise exception when tool is unsupported PiperOrigin-RevId: 599869191 --- vertexai/generative_models/_generative_models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vertexai/generative_models/_generative_models.py b/vertexai/generative_models/_generative_models.py index 4656081971..aafdb3b3d2 100644 --- a/vertexai/generative_models/_generative_models.py +++ b/vertexai/generative_models/_generative_models.py @@ -294,7 +294,7 @@ def _prepare_request( elif isinstance(tool, Tool): gapic_tools.append(tool._raw_tool) else: - raise TypeError("Unexpected tool type: {tool}.") + raise TypeError(f"Unexpected tool type: {tool}.") return gapic_prediction_service_types.GenerateContentRequest( # The `model` parameter now needs to be set for the vision models.