From 4960f7885b4e71ba9160979f9ac68745bbadb925 Mon Sep 17 00:00:00 2001 From: Mark Daoust Date: Wed, 26 Jun 2024 17:44:05 -0700 Subject: [PATCH] Remove extra new line. (#400) * Remove extra new line. * blacken --------- Co-authored-by: Mark McDonald --- 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 e7b912678..d4bed8b86 100644 --- a/google/generativeai/types/generation_types.py +++ b/google/generativeai/types/generation_types.py @@ -449,7 +449,7 @@ def text(self): language = "" else: language = f" {language}" - texts.extend([f"```{language}", part.executable_code.code, "```"]) + texts.extend([f"```{language}", part.executable_code.code.lstrip("\n"), "```"]) continue if "code_execution_result" in part: outcome_result = part.code_execution_result.outcome.name.lower().replace(