File tree Expand file tree Collapse file tree 3 files changed +4
-22
lines changed
integrations/amazon_bedrock
src/haystack_integrations/components/rankers/amazon_bedrock Expand file tree Collapse file tree 3 files changed +4
-22
lines changed Original file line number Diff line number Diff line change 1
- from .ranker import AmazonBedrockRanker , BedrockRanker
1
+ from .ranker import AmazonBedrockRanker
2
2
3
- __all__ = ["AmazonBedrockRanker" , "BedrockRanker" ]
3
+ __all__ = ["AmazonBedrockRanker" ]
Original file line number Diff line number Diff line change 1
- import warnings
2
1
from typing import Any , Dict , List , Optional
3
2
4
3
from botocore .exceptions import ClientError
@@ -265,20 +264,3 @@ def resolve_secret(secret: Optional[Secret]) -> Optional[str]:
265
264
except Exception as exception :
266
265
msg = f"Error during Amazon Bedrock API call: { exception } "
267
266
raise AmazonBedrockInferenceError (msg ) from exception
268
-
269
-
270
- class BedrockRanker (AmazonBedrockRanker ):
271
- """
272
- Deprecated alias for AmazonBedrockRanker.
273
- This class will be removed in a future version.
274
- Please use AmazonBedrockRanker instead.
275
- """
276
-
277
- def __init__ (self , * args , ** kwargs ):
278
- warnings .warn (
279
- "BedrockRanker is deprecated and will be removed in a future version. "
280
- "Please use AmazonBedrockRanker instead." ,
281
- DeprecationWarning ,
282
- stacklevel = 2 ,
283
- )
284
- super ().__init__ (* args , ** kwargs )
Original file line number Diff line number Diff line change 7
7
from haystack_integrations .common .amazon_bedrock .errors import (
8
8
AmazonBedrockInferenceError ,
9
9
)
10
- from haystack_integrations .components .rankers .amazon_bedrock import AmazonBedrockRanker , BedrockRanker
10
+ from haystack_integrations .components .rankers .amazon_bedrock import AmazonBedrockRanker
11
11
12
12
13
13
@pytest .fixture
@@ -31,7 +31,7 @@ def test_amazon_bedrock_ranker_initialization(mock_aws_session):
31
31
32
32
33
33
def test_bedrock_ranker_run (mock_aws_session ):
34
- ranker = BedrockRanker (
34
+ ranker = AmazonBedrockRanker (
35
35
model = "cohere.rerank-v3-5:0" ,
36
36
top_k = 2 ,
37
37
aws_access_key_id = Secret .from_token ("test_access_key" ),
You can’t perform that action at this time.
0 commit comments