anhuiqiang 1 viikko sitten
vanhempi
commit
525d5e5dbd

+ 2 - 2
web/components/ConfigPanel.tsx

@@ -63,7 +63,7 @@ const ConfigPanel: React.FC<ConfigPanelProps> = ({ settings, models, onSettingsC
                 disabled={!isAdmin}
                 className="w-full text-sm bg-slate-50 border border-slate-200 rounded-lg px-3 py-2 text-slate-700 focus:outline-none focus:border-blue-500 disabled:opacity-50 disabled:cursor-not-allowed"
               >
-                <option value="">{t('selectLLMModel')}</option>
+                <option value="">--- {t('selectLLMModel')} ---</option>
                 {llmModels.map(m => (
                   <option key={m.id} value={m.id}>
                     {m.name} ({m.modelId})
@@ -192,7 +192,7 @@ const ConfigPanel: React.FC<ConfigPanelProps> = ({ settings, models, onSettingsC
                 disabled={!settings.enableRerank || !isAdmin}
                 className="w-full text-sm bg-slate-50 border border-slate-200 rounded-lg px-3 py-2 text-slate-700 focus:outline-none focus:border-blue-500 disabled:opacity-50 disabled:cursor-not-allowed"
               >
-                <option value="">--- {t('noRerankModel')} ---</option>
+                <option value="">--- {t('selectRerankModel')} ---</option>
                 {rerankModels.map(m => (
                   <option key={m.id} value={m.id}>{m.name}</option>
                 ))}

+ 1 - 3
web/components/VisionModelSelector.tsx

@@ -75,9 +75,7 @@ const VisionModelSelector: React.FC<VisionModelSelectorProps> = ({ isAdmin = fal
             disabled={loading || !isAdmin}
             className="w-full text-sm bg-slate-50 border border-slate-200 rounded-lg px-3 py-2 text-slate-700 focus:outline-none focus:border-blue-500 disabled:opacity-50 disabled:cursor-not-allowed"
           >
-            <option value="">
-              {loading ? t('loading') : visionModels.length === 0 ? t('noVisionModels') : `--- ${t('selectVisionModel')} ---`}
-            </option>
+            <option value="">--- {t('selectVisionModel')} ---</option>
             {visionModels.map(model => (
               <option key={model.id} value={model.id}>
                 {model.name} ({model.modelId})

+ 6 - 6
web/components/views/SettingsView.tsx

@@ -1553,7 +1553,7 @@ export const SettingsView: React.FC<SettingsViewProps> = ({
                                     onChange={(e) => handleUpdateKbSettings('selectedLLMId', e.target.value)}
                                     className="w-full px-4 py-3.5 bg-slate-50 border border-slate-200 rounded-2xl text-sm font-medium outline-none focus:ring-4 focus:ring-indigo-500/10 transition-all cursor-pointer appearance-none"
                                 >
-                                    <option value="">{t('selectLLM')}</option>
+                                     <option value="">--- {t('selectLLMModel')} ---</option>
                                     {models.filter(m => m.type === ModelType.LLM).map(m => (
                                         <option key={m.id} value={m.id}>{m.name} ({m.modelId})</option>
                                     ))}
@@ -1567,7 +1567,7 @@ export const SettingsView: React.FC<SettingsViewProps> = ({
                                         onChange={(e) => handleUpdateKbSettings('selectedEmbeddingId', e.target.value)}
                                         className="w-full px-4 py-3.5 bg-slate-50 border border-slate-200 rounded-2xl text-sm font-medium outline-none focus:ring-4 focus:ring-indigo-500/10 transition-all"
                                     >
-                                        <option value="">{t('selectEmbedding')}</option>
+                                         <option value="">--- {t('selectEmbeddingModel')} ---</option>
                                         {models.filter(m => m.type === ModelType.EMBEDDING).map(m => (
                                             <option key={m.id} value={m.id}>{m.name}</option>
                                         ))}
@@ -1579,8 +1579,8 @@ export const SettingsView: React.FC<SettingsViewProps> = ({
                                         value={localKbSettings.selectedRerankId || ''}
                                         onChange={(e) => handleUpdateKbSettings('selectedRerankId', e.target.value)}
                                         className="w-full px-4 py-3.5 bg-slate-50 border border-slate-200 rounded-2xl text-sm font-medium outline-none focus:ring-4 focus:ring-indigo-500/10 transition-all"
-                                    >
-                                        <option value="">{t('none')}</option>
+                                     >
+                                        <option value="">--- {t('selectRerankModel')} ---</option>
                                         {models.filter(m => m.type === ModelType.RERANK).map(m => (
                                             <option key={m.id} value={m.id}>{m.name}</option>
                                         ))}
@@ -1595,8 +1595,8 @@ export const SettingsView: React.FC<SettingsViewProps> = ({
                                         value={localKbSettings.selectedVisionId || ''}
                                         onChange={(e) => handleUpdateKbSettings('selectedVisionId', e.target.value)}
                                         className="w-full px-4 py-3.5 bg-slate-50 border border-slate-200 rounded-2xl text-sm font-medium outline-none focus:ring-4 focus:ring-indigo-500/10 transition-all"
-                                    >
-                                        <option value="">{t('none')}</option>
+                                     >
+                                        <option value="">--- {t('selectVisionModel')} ---</option>
                                         {models.filter(m => m.type === ModelType.VISION || m.supportsVision).map(m => (
                                             <option key={m.id} value={m.id}>{m.name}</option>
                                         ))}

+ 3 - 3
web/utils/translations.ts

@@ -43,7 +43,7 @@ export const translations = {
     ragSettings: "RAG 设置",
     enableRerank: "启用重排序 (Rerank)",
     enableRerankDesc: "使用重排序模型对检索结果进行二次精排,提高准确性",
-    selectRerankModel: "选择 Rerank 模型",
+    selectRerankModel: "选择Rerank模型",
     selectModelPlaceholder: "请选择模型...",
 
     // Config Panel
@@ -912,7 +912,7 @@ export const translations = {
     ragSettings: "RAG Settings",
     enableRerank: "Enable Rerank",
     enableRerankDesc: "Use a rerank model to re-rank retrieval results for better accuracy",
-    selectRerankModel: "Select Rerank Model",
+    selectRerankModel: "Please select Rerank model",
     selectModelPlaceholder: "Select a model...",
 
     headerModelSelection: "Model Selection",
@@ -1705,7 +1705,7 @@ export const translations = {
     ragSettings: "RAG 設定",
     enableRerank: "リランクを有効にする",
     enableRerankDesc: "リランクモデルを使用して検索結果を再ランク付けし、精度を向上させます",
-    selectRerankModel: "リランクモデルの選択",
+    selectRerankModel: "リランクモデルを選択してください",
     selectModelPlaceholder: "モデルを選択...",
 
     headerModelSelection: "モデル選択",