Skip to content
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

[Integration] AWS Bedrock Reranker #17134

Merged
merged 5 commits into from
Dec 6, 2024

Conversation

SuperSecureHuman
Copy link
Contributor

Description

AWS Bedrock now has rerankers (started with Cohere Reranker 3.5). This PR adds support for it.

https://aws.amazon.com/blogs/machine-learning/cohere-rerank-3-5-is-now-available-in-amazon-bedrock-through-rerank-api/

Type of Change

  • New feature (non-breaking change which adds functionality)

Added Reranker from AWS Bedrock

How Has This Been Tested?

Replaced example code from llamaindex to use the AWS Reranker, and made sure it works

@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Dec 3, 2024
@SuperSecureHuman
Copy link
Contributor Author

Do let me know if anything is needed / modifications are needed

@SuperSecureHuman
Copy link
Contributor Author

image

If this is good to go, I can add a sample notebook

@brycecf
Copy link
Contributor

brycecf commented Dec 3, 2024

Real unit tests please. This is not a meaningful test:

def test_class():
    names_of_base_classes = [b.__name__ for b in AWSBedrockRerank.__mro__]
    assert BaseNodePostprocessor.__name__ in names_of_base_classes

@logan-markewich
Copy link
Collaborator

I agree with @brycecf -- net new packages should have meaningful tests. You can mock out the api calls to boto3/bedrock for example, or other strategies

@SuperSecureHuman
Copy link
Contributor Author

Hi, I have tried using mock... Please lemme know if anything

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Dec 6, 2024
@logan-markewich logan-markewich merged commit ee5fed7 into run-llama:main Dec 6, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm This PR has been approved by a maintainer size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants