-
Notifications
You must be signed in to change notification settings - Fork 134
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
refactor!: AmazonBedrockGenerator - remove truncation #1314
Conversation
@mpangrazzi not to distract you with something that @anakin87 is already familiar with and has complete context. @anakin87 I know we are not following deprecation policy here but with generators being slowly removed anyways I thought it would be an overkill to follow the policy here - so I just eviscerated the truncation support altogether. And we have internal support to remove it right away 👍 |
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.
In general, I like this change.
I left a comment.
I would also make this change more evident in the changelog with a PR title like:
"refactor!: AmazonBedrockGenerator - remove truncation "
...s/amazon_bedrock/src/haystack_integrations/components/generators/amazon_bedrock/generator.py
Outdated
Show resolved
Hide resolved
…ts/generators/amazon_bedrock/generator.py Co-authored-by: Stefano Fiorucci <[email protected]>
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.
Feel free to merge once linting errors are fixed (restore stacklevel).
* AmazonBedrockGenerator - remove truncation * Update tests * Linting * Remove deprecation test * Update docs config * Update integrations/amazon_bedrock/src/haystack_integrations/components/generators/amazon_bedrock/generator.py Co-authored-by: Stefano Fiorucci <[email protected]> * Lint --------- Co-authored-by: Stefano Fiorucci <[email protected]>
Why:
Remove truncation in AmazonBedrockGenerator.
What:
transformers
dependency from thepyproject.toml
.max_length
andtruncate
parameters and associated warning logic from the generator.DefaultPromptHandler
class along with associated prompt truncation logic.How can it be used:
See above
How did you test it:
Notes for the reviewer:
Please focus on the removal of the prompt handler logic and verify that all necessary tests continue to pass. Special attention may be needed to confirm that
max_length
andtruncate
parameters' deprecation does not affect downstream functionality or produce any warnings at runtime.