Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Merged
rm-openai merged 3 commits intomainfromdoc/guardrail-exception-import
Jul 18, 2025

Conversation

slubbers-openai
Copy link
Contributor

docs: add missing InputGuardrailTripwireTriggered import to quickstart example

Fixes NameError when handling guardrail exceptions by including the required import in the docs.

…t exampleFixes NameError when handling guardrail exceptions by including the required import in the docs.
@seratchseratch added the documentationImprovements or additions to documentation labelJul 16, 2025
@seratch
Copy link
Member

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).

@slubbers-openai
Copy link
ContributorAuthor

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.

Copy link
Member

@seratchseratch left a 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!

@seratchseratch requested a review fromrm-openaiJuly 18, 2025 00:07
@rm-openairm-openai merged commit9046577 intomainJul 18, 2025
5 checks passed
@rm-openairm-openai deleted the doc/guardrail-exception-import branchJuly 18, 2025 16:11
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@seratchseratchseratch approved these changes

@rm-openairm-openairm-openai approved these changes

Assignees
No one assigned
Labels
documentationImprovements or additions to documentation
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@slubbers-openai@seratch@rm-openai

[8]ページ先頭

©2009-2025 Movatter.jp