+
:
}
+ onClick={() => setOpen(!open)}
+ sx={{ textTransform: 'none' }}
+ >
+ {t('map_project.reranker_configuration')}
+
+
+
+
+ {t('map_project.reranker_configuration_description')}
+
+
option?.label || ''}
+ isOptionEqualToValue={(option, current) => option.id === current.id}
+ onChange={(event, option) => {
+ if(option?.id === CUSTOM_ENCODER_MODEL_OPTION) {
+ onChange(isKnownOption ? '' : value)
+ return
+ }
+ onChange(option?.id || DEFAULT_ENCODER_MODEL)
+ }}
+ renderInput={params => (
+
+ )}
+ renderOption={(props, option) => (
+
+ {option.label}{option.isDefault ? ` (${t('common.default')})` : ''}
+
+ )}
+ />
+ {
+ isCustomSelected &&
+ onChange(event.target.value || '')}
+ />
+ }
+
+
+
+ )
+}
+
+export default RerankerConfig
diff --git a/src/components/map-projects/rerankerModels.js b/src/components/map-projects/rerankerModels.js
new file mode 100644
index 0000000..202e4db
--- /dev/null
+++ b/src/components/map-projects/rerankerModels.js
@@ -0,0 +1,7 @@
+export const DEFAULT_ENCODER_MODEL = 'BAAI/bge-reranker-v2-m3'
+
+export const ENCODER_MODEL_OPTIONS = [
+ DEFAULT_ENCODER_MODEL,
+]
+
+export const CUSTOM_ENCODER_MODEL_OPTION = '__custom_encoder_model__'
diff --git a/src/i18n/locales/en/translations.json b/src/i18n/locales/en/translations.json
index e61f3d3..c74785e 100644
--- a/src/i18n/locales/en/translations.json
+++ b/src/i18n/locales/en/translations.json
@@ -559,6 +559,12 @@
"lookup_configuration_url": "Repository URL",
"lookup_configuration_token": "Token",
"lookup_configuration_description": "Configure a Source/CodeSystem for lookup operation to fetch candidates definitions.",
+ "reranker_configuration": "Reranker Configuration",
+ "reranker_configuration_description": "Choose the reranker model used to calculate unified scores for this project. The default model is selected automatically, or you can enter a custom model name.",
+ "reranker_configuration_model": "Reranker model",
+ "reranker_configuration_custom_option": "Custom model name",
+ "reranker_configuration_custom_model": "Custom reranker model",
+ "reranker_configuration_placeholder": "e.g. BAAI/bge-reranker-v2-m3",
"refresh_candidates_tooltip": "Refresh Candidates",
"group_candidates": "Group By",
"sort_candidates": "Sort",
diff --git a/src/i18n/locales/es/translations.json b/src/i18n/locales/es/translations.json
index 3836f97..2b1a92f 100644
--- a/src/i18n/locales/es/translations.json
+++ b/src/i18n/locales/es/translations.json
@@ -534,6 +534,12 @@
"lookup_configuration_url": "URL del repositorio",
"lookup_configuration_token": "Token",
"lookup_configuration_description": "Configure una Fuente/Sistema de códigos para la operación de búsqueda y recuperar definiciones de candidatos.",
+ "reranker_configuration": "Configuracion del reranker",
+ "reranker_configuration_description": "Elija el modelo de reranker utilizado para calcular las puntuaciones unificadas de este proyecto. El modelo predeterminado se selecciona automaticamente, o puede ingresar un nombre de modelo personalizado.",
+ "reranker_configuration_model": "Modelo de reranker",
+ "reranker_configuration_custom_option": "Nombre de modelo personalizado",
+ "reranker_configuration_custom_model": "Modelo de reranker personalizado",
+ "reranker_configuration_placeholder": "p. ej. BAAI/bge-reranker-v2-m3",
"refresh_candidates_tooltip": "Actualizar candidatos",
"group_candidates": "Agrupar por",
"sort_candidates": "Ordenar",
diff --git a/src/i18n/locales/zh/translations.json b/src/i18n/locales/zh/translations.json
index 5c0ee70..d2977c3 100644
--- a/src/i18n/locales/zh/translations.json
+++ b/src/i18n/locales/zh/translations.json
@@ -559,6 +559,12 @@
"lookup_configuration_url": "仓库 URL",
"lookup_configuration_token": "令牌",
"lookup_configuration_description": "配置用于查找操作的源/代码系统,以获取候选项定义。",
+ "reranker_configuration": "重排序器配置",
+ "reranker_configuration_description": "为此项目选择用于计算统一分数的重排序器模型。默认模型会自动选中,您也可以输入自定义模型名称。",
+ "reranker_configuration_model": "重排序器模型",
+ "reranker_configuration_custom_option": "自定义模型名称",
+ "reranker_configuration_custom_model": "自定义重排序器模型",
+ "reranker_configuration_placeholder": "例如 BAAI/bge-reranker-v2-m3",
"refresh_candidates_tooltip": "刷新候选项",
"group_candidates": "分组依据",
"sort_candidates": "排序",