From a7d1f2f023f5793dcb9be85afaa2cfb0be587bb5 Mon Sep 17 00:00:00 2001 From: mohammadrezapourreza Date: Fri, 22 Mar 2024 12:18:30 -0400 Subject: [PATCH] Dh-5567/reformat --- dataherald/sql_generator/__init__.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dataherald/sql_generator/__init__.py b/dataherald/sql_generator/__init__.py index a197219e..2f86e37d 100644 --- a/dataherald/sql_generator/__init__.py +++ b/dataherald/sql_generator/__init__.py @@ -137,7 +137,11 @@ def construct_intermediate_steps( def truncate_observations(self, obervarion: str, max_length: int = 2000) -> str: """Truncate the tool input.""" - return obervarion[:max_length] + "... (truncated)" if len(obervarion) > max_length else obervarion + return ( + obervarion[:max_length] + "... (truncated)" + if len(obervarion) > max_length + else obervarion + ) @abstractmethod def generate_response(