From 8fade5377694ae741e027e122b3ebbbf12094276 Mon Sep 17 00:00:00 2001 From: Yuchen Zhang Date: Fri, 30 May 2025 14:08:29 -0700 Subject: [PATCH] add import Signed-off-by: Yuchen Zhang --- docs/source/workflows/run-workflows.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/source/workflows/run-workflows.md b/docs/source/workflows/run-workflows.md index 1a72e0eac..0226a22a7 100644 --- a/docs/source/workflows/run-workflows.md +++ b/docs/source/workflows/run-workflows.md @@ -76,9 +76,11 @@ Refer to `aiq serve --help` for more information on how to customize the server. The toolkit offers a programmatic way to execute workflows through its Python API, allowing you to integrate workflow execution directly into your Python code. Here's how to use it: ```python - async with load_workflow(config_file) as workflow: - async with workflow.run(input_str) as runner: - result = await runner.result(to_type=str) +from aiq.runtime.loader import load_workflow + +async with load_workflow(config_file) as workflow: + async with workflow.run(input_str) as runner: + result = await runner.result(to_type=str) ``` In this example: