- Notifications
You must be signed in to change notification settings - Fork17
Support prompt usage#34
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
Uh oh!
There was an error while loading.Please reload this page.
Conversation
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.
Pull Request Overview
This PR enhances theGuardrailAgent class to support dynamic instructions and user-provided guardrails, while also removing outdated NSFW benchmark documentation.
- Made the
instructionsparameter optional and support callable functions for dynamic generation - Added support for user-provided
input_guardrailsandoutput_guardrailsthat merge with config-based guardrails - Removed deprecated NSFW benchmark documentation file
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/guardrails/agents.py | EnhancedGuardrailAgent.__new__() to accept optional/callable instructions and merge user-provided guardrails with config-based guardrails |
| docs/benchmarking/nsfw.md | Removed entire file containing outdated NSFW benchmark results and documentation |
💡Add Copilot custom instructions for smarter, more guided reviews.Learn how to get started.
gabor-openai left a comment
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 thank you!
794ff02 intomainUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Fixes reported bug from
rcatoen:TypeError: GuardrailAgent.__new__() missing 1 required positional argument: 'instructions'when usingpromptinstead ofinstructionsFix:
Agent SDKAlso added support for users adding their own input and output guardrails via the Agent SDK.
Deleted an old
NSFW.mdfile that is not being used