fix: 默认模型在模型服务中禁用后显示错误 #266
This commit is contained in:
parent
41c3895da4
commit
dd4239da87
@ -9,7 +9,8 @@ export const getModelUniqId = (m?: Model) => {
|
||||
export const hasModel = (m?: Model) => {
|
||||
const allModels = store
|
||||
.getState()
|
||||
.llm.providers.map((p) => p.models)
|
||||
.llm.providers.filter((p) => p.enabled)
|
||||
.map((p) => p.models)
|
||||
.flat()
|
||||
|
||||
return allModels.find((model) => model.id === m?.id)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user