You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pd2871
changed the title
Arguments of client.create_guardrail not working as expected
Arguments of Bedrock's client.create_guardrail not working as expected
Jun 27, 2024
Thanks for reaching out. If a parameter is optional and you do not want to use it, then you should just not include it in your command. Otherwise it is expected that the command would fail with a ParamValidationError here, because you are passing a None type. When I try that I get the error:
botocore.exceptions.ParamValidationError: Parameter validation failed:
Invalid type for parameter wordPolicyConfig, value: None, type: <class 'NoneType'>, valid types: <class 'dict'>
I get the error you referenced when attempting to use that configuration. The API is expecting a value for text here.
Also the Boto3 create_guardail command involves a call to the underlying Amazon Bedrock CreateGuardrail API. Therefore the Boto3 team here cannot modify the underlying behavior here. If you'd like someone to reach out to the Bedrock team on your behalf, please create an issue in our cross-SDK repository (https://github.com/aws/aws-sdk/issues) outlining your request.
tim-finnigan
added
service-api
This issue is caused by the service API, not the SDK implementation.
and removed
bug
This issue is a confirmed bug.
investigating
This issue is being investigated and/or work is in progress to resolve the issue.
needs-triage
This issue or PR still needs to be triaged.
labels
Jun 27, 2024
This issue is now closed. Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.
Describe the bug
According to AWS documentation, some of the fields are not required compulsorily in client.create_guardrail
wordPolicyConfig
topicPolicyConfig
...
...
So, the main problem I am facing is when creating a guardrail using boto3, these fields are needed compulsorily.
I do not want LLM to restrict on any specific word after creating guardrails using boto3 but boto3 keeps on throwing error to add atleast 1 word?
So, I hope boto3 team makes these fields
Optional
instead ofCOMPULSORY
.Expected Behavior
I expected that if I pass
wordPolicyConfig=None
while usingclient.create_guardrail
, it should work fine.It is expected to not throw any error
Current Behavior
If
wordPolicyConfig=None
is passed withclient.create_guardrail
, it throws error.Reproduction Steps
Some of those fields should be made Optional instead of Compulsory based on AWS Guardrails API documentation.
Possible Solution
Some of those fields should be made Optional instead of Compulsory based on AWS Guardrails API documentation.
Additional Information/Context
No response
SDK version used
1.34.105
Environment details (OS name and version, etc.)
Windows 10
The text was updated successfully, but these errors were encountered: