mirror of
https://github.com/stackblitz/bolt.new
synced 2025-02-06 04:48:04 +00:00
TypeCheck fix
This commit is contained in:
parent
9396734dea
commit
b0754e546b
@ -234,7 +234,10 @@ async function getLMStudioModels(): Promise<ModelInfo[]> {
|
||||
|
||||
async function initializeModelList(): Promise<ModelInfo[]> {
|
||||
MODEL_LIST = [...(await Promise.all(
|
||||
PROVIDER_LIST.filter(p => !!p.getDynamicModels).map(p => p.getDynamicModels()))).flat(), ...staticModels];
|
||||
PROVIDER_LIST
|
||||
.filter((p): p is ProviderInfo & { getDynamicModels: () => Promise<ModelInfo[]> } => !!p.getDynamicModels)
|
||||
.map(p => p.getDynamicModels())))
|
||||
.flat(), ...staticModels];
|
||||
return MODEL_LIST;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user