fix(guard): 修复内容审查模型选择的问题
This commit is contained in:
parent
f1fe10f22c
commit
a4c33265a2
@ -14,7 +14,6 @@
|
||||
- [ ] 添加统计信息
|
||||
- [x] 添加内容审查功能
|
||||
- [x] 补充 embedding 模型和 reranker 模型的配置说明
|
||||
- [ ] 知识库文件应该上传到 minio 中,然后就可以支持 从 minio 中下载文件
|
||||
|
||||
📝 **Base**
|
||||
|
||||
|
||||
@ -101,8 +101,8 @@
|
||||
<span class="label">{{ items?.content_guard_llm_model.des }}</span>
|
||||
<ModelSelectorComponent
|
||||
@select-model="handleContentGuardModelSelect"
|
||||
:model_name="configStore.config?.content_guard_llm_model?.split('/').pop()"
|
||||
:model_provider="configStore.config?.content_guard_llm_model?.split('/')[0]"
|
||||
:model_name="contentGuardModelName"
|
||||
:model_provider="contentGuardModelProvider"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
@ -250,6 +250,19 @@ const handleChatModelSelect = ({ provider, name }) => {
|
||||
})
|
||||
}
|
||||
|
||||
const contentGuardModelProvider = computed(() => {
|
||||
const contentGuardModel = configStore.config?.content_guard_llm_model
|
||||
if (!contentGuardModel) return ''
|
||||
return contentGuardModel.split('/')[0]
|
||||
})
|
||||
|
||||
const contentGuardModelName = computed(() => {
|
||||
const contentGuardModel = configStore.config?.content_guard_llm_model
|
||||
if (!contentGuardModel) return ''
|
||||
const parts = contentGuardModel.split('/')
|
||||
return parts.slice(1).join('/')
|
||||
})
|
||||
|
||||
const handleContentGuardModelSelect = ({ provider, name }) => {
|
||||
configStore.setConfigValue('content_guard_llm_model', `${provider}/${name}`)
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user