fix: #2280 auto-detect models from 'list/models'

This commit is contained in:
Yidadaa
2023-07-09 18:03:06 +08:00
parent 9b61fe9df2
commit 28c457730a
2 changed files with 12 additions and 6 deletions

View File

@@ -117,6 +117,10 @@ export const useAppConfig = create<ChatConfigStore>()(
},
mergeModels(newModels) {
if (!newModels || newModels.length === 0) {
return;
}
const oldModels = get().models;
const modelMap: Record<string, LLMModel> = {};