@@ -106,6 +106,22 @@ class ADBProviderSettings(BaseModel):
106106 """元数据配置,JSON 字符串格式 / Metadata configuration in JSON string format"""
107107
108108
109+ class ADBRerankModel (BaseModel ):
110+ """ADB 重排模型配置 / ADB Rerank Model Configuration
111+
112+ 配置重排模型的名称和排序任务类型说明。
113+ Configure the rerank model name and instruct for sorting task type.
114+ """
115+
116+ name : str
117+ """重排模型名称,可选值:qwen3-rerank、gte-rerank-v2
118+ Rerank model name, options: qwen3-rerank, gte-rerank-v2"""
119+ instruct : Optional [str ] = None
120+ """排序任务类型说明,仅当 name 为 qwen3-rerank 时可设置,指导模型采用不同的排序策略
121+ Instruct for sorting task type, only available when name is qwen3-rerank,
122+ guides the model to adopt different sorting strategies"""
123+
124+
109125class ADBRetrieveSettings (BaseModel ):
110126 """ADB 检索设置 / ADB Retrieve Settings
111127
@@ -122,6 +138,9 @@ class ADBRetrieveSettings(BaseModel):
122138 rerank_factor : Optional [float ] = None
123139 """重排序因子,取值范围 1 < RerankFactor <= 5
124140 Re-ranking factor, value range: 1 < RerankFactor <= 5"""
141+ rerank_model : Optional [ADBRerankModel ] = None
142+ """重排模型配置,当启用重排因子时可设置
143+ Rerank model configuration, available when rerank factor is enabled"""
125144 recall_window : Optional [List [int ]] = None
126145 """召回窗口,格式为 [A, B],其中 -10 <= A <= 0,0 <= B <= 10
127146 Recall window, format [A, B] where -10 <= A <= 0, 0 <= B <= 10"""
0 commit comments