mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-08-14 06:55:57 +08:00
bug: fixed bedrock rerank bug (#12774)
Co-authored-by: hobo.l <hobo.l@binance.com>
This commit is contained in:
parent
6db3ae9b8e
commit
3d1ce4c53f
@ -70,7 +70,7 @@ class BedrockRerankModel(RerankModel):
|
|||||||
rerankingConfiguration = {
|
rerankingConfiguration = {
|
||||||
"type": "BEDROCK_RERANKING_MODEL",
|
"type": "BEDROCK_RERANKING_MODEL",
|
||||||
"bedrockRerankingConfiguration": {
|
"bedrockRerankingConfiguration": {
|
||||||
"numberOfResults": top_n,
|
"numberOfResults": min(top_n, len(text_sources)),
|
||||||
"modelConfiguration": {
|
"modelConfiguration": {
|
||||||
"modelArn": model_package_arn,
|
"modelArn": model_package_arn,
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user