From 162d2871578178dc090f77b0db8aac2c6c63e622 Mon Sep 17 00:00:00 2001 From: Mark Daoust Date: Tue, 12 Nov 2024 08:20:06 -0800 Subject: [PATCH] Fix Typo. Fixes: https://github.com/google-gemini/generative-ai-python/issues/626 --- google/generativeai/types/generation_types.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/google/generativeai/types/generation_types.py b/google/generativeai/types/generation_types.py index 45ca6b21b..5ad7ab73d 100644 --- a/google/generativeai/types/generation_types.py +++ b/google/generativeai/types/generation_types.py @@ -526,7 +526,7 @@ def text(self): texts.extend([f"```{outcome_result}", part.code_execution_result.output, "```"]) continue - part_type = protos.Part.pb(part).whichOneof("data") + part_type = protos.Part.pb(part).whichOneOf("data") raise ValueError(f"Could not convert `part.{part_type}` to text.") return "\n".join(texts)