(ctx: Context, node_input: str)
| 60 | |
| 61 | @node(rerun_on_resume=True) |
| 62 | async def orchestrate(ctx: Context, node_input: str) -> str: |
| 63 | yield Event(state={"topic": node_input}) |
| 64 | |
| 65 | while True: |
| 66 | headline = await ctx.run_node(generate_headline) |
| 67 | feedback = Feedback.model_validate( |
| 68 | await ctx.run_node(evaluate_headline, node_input=headline) |
| 69 | ) |
| 70 | if feedback.grade == "tech-related": |
| 71 | yield headline |
| 72 | break |
| 73 | |
| 74 | |
| 75 | root_agent = Workflow( |
nothing calls this directly
no test coverage detected