From 51c0390f7198a03c31b6c83aa14688924b53aaab Mon Sep 17 00:00:00 2001 From: mohammadrezapourreza Date: Thu, 4 Apr 2024 14:33:13 -0400 Subject: [PATCH] Add newlines after the observations and final answer --- dataherald/sql_generator/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dataherald/sql_generator/__init__.py b/dataherald/sql_generator/__init__.py index 1c8255bb..b270d5a7 100644 --- a/dataherald/sql_generator/__init__.py +++ b/dataherald/sql_generator/__init__.py @@ -173,9 +173,9 @@ def stream_agent_steps( # noqa: C901 queue.put(message.content + "\n") elif "steps" in chunk: for step in chunk["steps"]: - queue.put(f"**Observation:**\n {step.observation}\n") + queue.put(f"\n**Observation:**\n {step.observation}\n") elif "output" in chunk: - queue.put(f'**Final Answer:**\n {chunk["output"]}') + queue.put(f'\n**Final Answer:**\n {chunk["output"]}') if "```sql" in chunk["output"]: response.sql = replace_unprocessable_characters( self.remove_markdown(chunk["output"])