Open-source LLM knowledge platform: turn raw documents into a queryable RAG, an autonomous reasoning agent, and a self-maintaining Wiki.
Go agentagenticaichatbotdsh-pluginembeddingsevaluationgenerative-aigolangknowledge-basellmmulti-tenantollamaopenaiquestion-answeringragrerankingsemantic-searchvector-searchwiki
fix: 模型管理中禁用ReRank模型Ollama选项并添加提示信息
wizardchen7576f08ad5c9
diff --git a/frontend/src/components/ModelEditorDialog.vue b/frontend/src/components/ModelEditorDialog.vueindex 5cde40fb6..34ffc6a24 100644--- a/frontend/src/components/ModelEditorDialog.vue+++ b/frontend/src/components/ModelEditorDialog.vue@@ -25,15 +25,21 @@<t-radio-group v-model="formData.source"><t-radiovalue="local"- :disabled="ollamaServiceStatus === false"+ :disabled="ollamaServiceStatus === false || modelType === 'rerank'">{{ $t('model.editor.sourceLocal') }}</t-radio><t-radio value="remote">{{ $t('model.editor.sourceRemote') }}</t-radio></t-radio-group>+ <!-- ReRank模型不支持Ollama的提示信息 -->+ <div v-if="modelType === 'rerank'" class="ollama-unavailable-tip rerank-tip">+ <t-icon name="info-circle-filled" class="tip-icon info" />+ <span class="tip-text">{{ $t('model.editor.ollamaNotSupportRerank') }}</span>+ </div>+<!-- Ollama不可用时的提示信息 -->- <div v-if="ollamaServiceStatus === false" class="ollama-unavailable-tip">+ <div v-else-if="ollamaServiceStatus === false" class="ollama-unavailable-tip"><t-icon name="error-circle-filled" class="tip-icon" /><span class="tip-text">{{ $t('model.editor.ollamaUnavailable') }}</span><t-button@@ -415,6 +421,11 @@ watch(() => props.visible, (val) => {} else {resetForm()}++ // ReRank 模型强制使用 remote 来源(Ollama 不支持 ReRank)+ if (props.modelType === 'rerank') {+ formData.value.source = 'remote'+ }} else {// 恢复背景滚动document.body.style.overflow = ''@@ -1314,6 +1325,10 @@ const handleCancel = () => {font-size: 16px;flex-shrink: 0;margin-right: 2px;++ &.info {+ color: #07C05F;+ }}.tip-text {@@ -1322,6 +1337,17 @@ const handleCancel = () => {line-height: 1.5;}+ // ReRank提示使用主题绿色风格,与主页面保持一致+ &.rerank-tip {+ background: #f0fdf6;+ border: 1px solid #d1fae5;+ border-left: 3px solid #07C05F;++ .tip-text {+ color: #166534;+ }+ }+:deep(.tip-link) {color: #07C05F;font-size: 13px;diff --git a/frontend/src/i18n/locales/en-US.ts b/frontend/src/i18n/locales/en-US.tsindex 2b0af527d..20a7cf902 100644--- a/frontend/src/i18n/locales/en-US.ts+++ b/frontend/src/i18n/locales/en-US.ts@@ -1407,6 +1407,7 @@ export default {downloadFailed: 'Failed to download {name}',downloadStartFailed: 'Failed to start download',ollamaUnavailable: 'Ollama service is unavailable, local models cannot be selected',+ ollamaNotSupportRerank: 'Ollama does not support ReRank models, please use a remote API instead',goToOllamaSettings: 'Open Settings',validation: {modelNameRequired: 'Please enter the model name',diff --git a/frontend/src/i18n/locales/ru-RU.ts b/frontend/src/i18n/locales/ru-RU.tsindex 48113c0c6..171ba1e37 100644--- a/frontend/src/i18n/locales/ru-RU.ts+++ b/frontend/src/i18n/locales/ru-RU.ts@@ -877,6 +877,7 @@ export default {downloadFailed: 'Не удалось загрузить {name}',downloadStartFailed: 'Не удалось запустить загрузку',ollamaUnavailable: 'Сервис Ollama недоступен, локальные модели недоступны для выбора',+ ollamaNotSupportRerank: 'Ollama не поддерживает модели ReRank, используйте удалённый API',goToOllamaSettings: 'Открыть настройки',validation: {modelNameRequired: 'Введите название модели',diff --git a/frontend/src/i18n/locales/zh-CN.ts b/frontend/src/i18n/locales/zh-CN.tsindex 0b326b334..2b574291f 100644--- a/frontend/src/i18n/locales/zh-CN.ts+++ b/frontend/src/i18n/locales/zh-CN.ts@@ -969,6 +969,7 @@ export default {downloadFailed: "{name} 下载失败",downloadStartFailed: "启动下载失败",ollamaUnavailable: "Ollama服务不可用,无法选择本地模型",+ ollamaNotSupportRerank: "Ollama 不支持 ReRank 模型,请使用远程接口配置",goToOllamaSettings: "查看设置",validation: {modelNameRequired: "请输入模型名称",