-
Notifications
You must be signed in to change notification settings - Fork 604
feat(bedrock): add guardrail_latest_message option #1224
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(bedrock): add guardrail_latest_message option #1224
Conversation
|
Related: #999 |
|
@aiancheruk Thank you for raising this PR! Could you refine the helper function a bit? Once that's done, I'll be happy to merge it. |
cb166a6 to
8cda99f
Compare
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
…en feature flag is true
5927fa4 to
044ac6c
Compare
he was out, this PRs has been reviewed by Nick
|
Thanks for your help @JackYPCOnline @Unshure @pgrayy! |
Description
This PR adds a new guardrail_latest_message parameter to the BedrockModel that allows users to send only the last user message to AWS Bedrock Guardrails for evaluation, instead of the entire conversation history.
Key changes:
guardrail_latest_message: bool = Falseparameter toBedrockConfig_format_bedrock_messages()adding latest user message toguardContentwhenguardrail_latest_message=TrueBenefits:
Follow up:
Use coding agent to add image in GuardContent
Related Issues
#999
Documentation PR
strands-agents/docs#340
Type of Change
New feature
Testing
How have you tested the change? Verify that the changes do not break functionality or introduce warnings in consuming repositories: agents-docs, agents-tools, agents-cli
hatch run prepareChecklist
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.