diff --git a/cookbook/pocketflow-workflow/nodes.py b/cookbook/pocketflow-workflow/nodes.py index 3597e7a..24e8f1a 100644 --- a/cookbook/pocketflow-workflow/nodes.py +++ b/cookbook/pocketflow-workflow/nodes.py @@ -16,17 +16,15 @@ Output the sections in YAML format as shown below: ```yaml sections: - - First section - - Second section - - Third section + - | + First section + - | + Second section + - | + Third section ```""" response = call_llm(prompt) yaml_str = response.split("```yaml")[1].split("```")[0].strip() - yaml_str = re.sub( - r'(?m)^(\s*)-\s*([^"\n]+)', - r'\1- "\2"', - yaml_str - ) structured_result = yaml.safe_load(yaml_str) return structured_result