File tree Expand file tree Collapse file tree
integrations/amazon_bedrock/examples Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33from haystack import Document
44from haystack .utils import Secret
55
6- from haystack_integrations .components .rankers .amazon_bedrock import BedrockRanker
6+ from haystack_integrations .components .rankers .amazon_bedrock import AmazonBedrockRanker
77
88# Set up AWS credentials
99# You can also set these as environment variables
1010aws_profile_name = os .environ .get ("AWS_PROFILE" ) or "default"
1111aws_region_name = os .environ .get ("AWS_DEFAULT_REGION" ) or "eu-central-1"
12- # Initialize the BedrockRanker with AWS credentials
13- ranker = BedrockRanker (
12+ # Initialize the AmazonBedrockRanker with AWS credentials
13+ ranker = AmazonBedrockRanker (
1414 model = "cohere.rerank-v3-5:0" ,
1515 top_k = 2 ,
1616 aws_profile_name = Secret .from_token (aws_profile_name ),
You can’t perform that action at this time.
0 commit comments