Code from tutorial "Generating Structured Output with Loop-Based Auto-Correction" doesn't work #7554
-
I'm downloaded full code as .ipynb file from tutorial page (https://haystack.deepset.ai/tutorials/28_structured_output_with_loop), passed API-Key and ran it on my machine. But code fell in infinity loop in cell: passage = "Berlin is the capital of Germany. It has a population of 3,850,809. Paris, France's capital, has 2.161 million residents. Lisbon is the capital and the largest city of Portugal with the population of 504,718."
result = pipeline.run({"prompt_builder": {"passage": passage, "schema": str(json_schema)}}) With debugger I'm found out that problem in this cycle I'm also checked code without output validator - in this case it's works correct. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
@bilgeyucel Could you please have a look and check if this is an issue with the tutorial or with Haystack's implementation of the output validator? If it's the latter we should create an issue from this discussion. |
Beta Was this translation helpful? Give feedback.
-
Hi, i also tried the same code and it got stuck in the loop |
Beta Was this translation helpful? Give feedback.
-
@mikhail-moro @joaomiguelol We debugged the code and it seems like a problem on Haystack's side. Please bear with us as we fix it 🙌 |
Beta Was this translation helpful? Give feedback.
@mikhail-moro @joaomiguelol We debugged the code and it seems like a problem on Haystack's side. Please bear with us as we fix it 🙌
Here's the relevant issue: #7561