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

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

Merged
gabor-openai merged 2 commits intomainfromdev/steven/agent_bug
Oct 30, 2025
Merged

Support prompt usage#34

gabor-openai merged 2 commits intomainfromdev/steven/agent_bug
Oct 30, 2025

Conversation

@steven10a
Copy link
Collaborator

@steven10asteven10a commentedOct 30, 2025
edited by gabor-openai
Loading

Fixes reported bug fromrcatoen:

TypeError: GuardrailAgent.__new__() missing 1 required positional argument: 'instructions' when usingprompt instead ofinstructions

Fix:

  • Typing for instruction was too strict required it to be a string
  • Functionality was already supported as we are simply a wrapper aroundAgent SDK

Also added support for users adding their own input and output guardrails via the Agent SDK.

  • These were silently suppressed and only guardrails via the config were run
  • We now merge the lists and run all of them

Deleted an oldNSFW.md file that is not being used

Copy link

CopilotAI left a 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 theinstructions parameter optional and support callable functions for dynamic generation
  • Added support for user-providedinput_guardrails andoutput_guardrails that 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.

FileDescription
src/guardrails/agents.pyEnhancedGuardrailAgent.__new__() to accept optional/callable instructions and merge user-provided guardrails with config-based guardrails
docs/benchmarking/nsfw.mdRemoved entire file containing outdated NSFW benchmark results and documentation

💡Add Copilot custom instructions for smarter, more guided reviews.Learn how to get started.

Copy link
Collaborator

@gabor-openaigabor-openai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

LGTM thank you!

@gabor-openaigabor-openai merged commit794ff02 intomainOct 30, 2025
3 checks passed
@gabor-openaigabor-openai deleted the dev/steven/agent_bug branchOctober 30, 2025 17:41
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

Copilot code reviewCopilotCopilot left review comments

@gabor-openaigabor-openaigabor-openai approved these changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@steven10a@gabor-openai

[8]ページ先頭

©2009-2025 Movatter.jp