Skip to content

Commit

Permalink
bug: fixed bedrock rerank bug (#12774)
Browse files Browse the repository at this point in the history
Co-authored-by: hobo.l <hobo.l@binance.com>
  • Loading branch information
luckylhb90 and hobo-l-20230331 authored Jan 21, 2025
1 parent 6db3ae9 commit 3d1ce4c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def _invoke(
rerankingConfiguration = {
"type": "BEDROCK_RERANKING_MODEL",
"bedrockRerankingConfiguration": {
"numberOfResults": top_n,
"numberOfResults": min(top_n, len(text_sources)),
"modelConfiguration": {
"modelArn": model_package_arn,
},
Expand Down

0 comments on commit 3d1ce4c

Please sign in to comment.