-
Notifications
You must be signed in to change notification settings - Fork 752
feat(BedrockConverseModel): add additional configuration fields to Bedrock Runtime API #1458
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(BedrockConverseModel): add additional configuration fields to Bedrock Runtime API #1458
Conversation
PR Change SummaryExtended the BedrockModelSettings class with new configuration options for enhanced control over Bedrock Runtime API requests.
Modified Files
How can I customize these reviews?Check out the Hyperlint AI Reviewer docs for more information on how to customize the review. If you just want to ignore it on this PR, you can add the Note specifically for link checks, we only check the first 30 links in a file and we cache the results for several hours (for instance, if you just added a page, you might experience this). Our recommendation is to add |
Hey @Kludex this PR add support for extra fields. Looks like CI is failing with network error in Python 3.10 |
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.
@leandrodamascena all good here besides the references. I think we need to make it easier for people to navigate to the bedrock documentation, where it explains those settings.
bedrock_additional_model_requests_fields: Mapping[str, Any] | ||
"""Additional model-specific parameters to include in requests.""" |
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.
It would be nice to add links to those.
bedrock_additional_model_requests_fields: Mapping[str, Any] | |
"""Additional model-specific parameters to include in requests.""" | |
bedrock_additional_model_requests_fields: Mapping[str, Any] | |
"""Additional model-specific parameters to include in requests. | |
See more about it on <url>. | |
""" |
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.
Hey @Kludex yeah, make sense! While we don't have specific links in the boto3 configuration, I can add the API reference link for each field: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_Converse.html
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.
That would be great. :)
I want to make it easier for us to maintain each model/provider.
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.
Yes, especially since you deal with dozens of integrations, this concern is super valid.
docs/models/bedrock.md
Outdated
You can customize the Bedrock Runtime API calls by adding additional parameters, such as guardrail | ||
configurations and performance settings. For a complete list of configurable parameters, refer to the |
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.
Can we add links to the guardrail configurations
and performance settings
?
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.
Sure.
Hi @Kludex! I've already addressed all the feedback and pushed a new commit. Please see if this is enough or if I need to make more changes. |
It's enough. Obrigado. :) |
Valeu de novo! 🚀 |
Closes #1396
Closes #1170
Description
This PR extends the
BedrockModelSettings
class with several new configuration options to provide more comprehensive control over Bedrock Runtime API requests.Changes
bedrock_guardrail_config
for content moderation settingsbedrock_performance_configuration
for inference optimizationbedrock_request_metadata
for tracking and compliance metadatabedrock_additional_model_response_fields_paths
for extracting custom fieldsbedrock_prompt_variables
for template substitutionbedrock_additional_model_requests_fields
for model-specific parametersMotivation
These additions allow for more fine-grained control over Bedrock model invocations, enabling features such as content filtering, performance tuning, and access to model-specific parameters not covered by the standard API interface.