From 6a3df95237dc39f5895f1344b228a209e7037358 Mon Sep 17 00:00:00 2001 From: Mohammadreza Pourreza <71866535+MohammadrezaPourreza@users.noreply.github.com> Date: Thu, 18 Apr 2024 15:53:02 -0400 Subject: [PATCH] Dh-5738/fixing the few-shot samples format (#470) --- dataherald/sql_generator/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dataherald/sql_generator/__init__.py b/dataherald/sql_generator/__init__.py index 03597f70..16fc94d4 100644 --- a/dataherald/sql_generator/__init__.py +++ b/dataherald/sql_generator/__init__.py @@ -188,7 +188,9 @@ def stream_agent_steps( # noqa: C901 ) elif "steps" in chunk: for step in chunk["steps"]: - queue.put(f"\n**Observation:**\n {step.observation}\n") + queue.put( + f"\n**Observation:**\n {self.format_sql_query_intermediate_steps(step.observation)}\n" + ) elif "output" in chunk: queue.put( f'\n**Final Answer:**\n {self.format_sql_query_intermediate_steps(chunk["output"])}'