Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f976349 commit 227fb2fCopy full SHA for 227fb2f
examples/agent_patterns/streaming_guardrails.py
@@ -77,6 +77,7 @@ async def main():
77
# Every iteration of the loop, check if the guardrail has been triggered
78
if guardrail_task and guardrail_task.done():
79
guardrail_result = guardrail_task.result()
80
+ guardrail_task = None
81
if not guardrail_result.is_readable_by_ten_year_old:
82
print("\n\n================\n\n")
83
print(f"Guardrail triggered. Reasoning:\n{guardrail_result.reasoning}")
0 commit comments