- Notifications
You must be signed in to change notification settings - Fork2k
Add missing guardrail exception import to quickstart#1161
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Conversation
…t exampleFixes NameError when handling guardrail exceptions by including the required import in the docs.
The full version is covered athttps://openai.github.io/openai-agents-python/guardrails/ and this quick start page keeps things as simple as possible. Having the complete code for guardrail use cases in quick start too would be fine, but in the case, try/except clauses should be added too (the current code snippet in the quick start page does not use the exception at all). |
…d where used and add try/except example
Thanks for the feedback@seratch! Good catch. I’ve now added the full try/except block (when I was working through this example having the exception handling made the outputs much easier to read and navigate). Understand if you’d prefer to keep the quickstart as simple as possible though, so feel free to accept or discard this addition as you see fit. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
LGTM;@rm-openai let me know if you have any opinions here!
9046577
intomainUh oh!
There was an error while loading.Please reload this page.
docs: add missing InputGuardrailTripwireTriggered import to quickstart example
Fixes NameError when handling guardrail exceptions by including the required import in the docs.