Skip to content

Commit

Permalink
DH-5611 add newline on final answer from sql generation stream endpoi…
Browse files Browse the repository at this point in the history
…nt for correct parsing of SQL markdown -- added markdown bold text (#450)
  • Loading branch information
Juan Valacco authored Apr 2, 2024
1 parent 8efb00f commit 5f2c7a4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dataherald/sql_generator/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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: `{step.observation}`\n")
queue.put(f"**Observation:**\n `{step.observation}`\n")
elif "output" in chunk:
queue.put(f'Final Answer: {chunk["output"]}')
queue.put(f'**Final Answer:**\n {chunk["output"]}')
if "```sql" in chunk["output"]:
response.sql = replace_unprocessable_characters(
self.remove_markdown(chunk["output"])
Expand Down

0 comments on commit 5f2c7a4

Please sign in to comment.