Skip to content

Commit 213b161

Browse files
authored
Merge pull request #28 from GitHubSecurityLab/fix_reusable_prompt
fix reusable prompt example
2 parents 2c588c8 + d3e55b9 commit 213b161

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

main.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -419,6 +419,10 @@ async def on_handoff_hook(
419419

420420
taskflow = available_tools.taskflows.get(t)
421421
if taskflow is None:
422+
taskflow_list = '\n'.join(available_tools.taskflows.keys())
423+
await render_model_output(
424+
f"** 🤖❗ Input Error: No such taskflow: {t}. Available taskflows are:\n{taskflow_list}"
425+
)
422426
raise ValueError(f"No such taskflow: {t}")
423427

424428
await render_model_output(f"** 🤖💪 Running Task Flow: {t}\n")

taskflows/examples/example_reusable_prompt.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ taskflow:
1010
user_prompt: |
1111
Tell me more about apples.
1212
13-
{{ GitHubSecurityLab/seclab-taskflow-agent/prompts/examples/example_prompt.yaml }}
13+
{{ PROMPTS_GitHubSecurityLab/seclab-taskflow-agent/prompts/examples/example_prompt }}

0 commit comments

Comments
 (0)