Eduards commited on
Commit
b0754e5
·
1 Parent(s): 9396734

TypeCheck fix

Browse files
Files changed (1) hide show
  1. app/utils/constants.ts +4 -1
app/utils/constants.ts CHANGED
@@ -234,7 +234,10 @@ async function getLMStudioModels(): Promise<ModelInfo[]> {
234
 
235
  async function initializeModelList(): Promise<ModelInfo[]> {
236
  MODEL_LIST = [...(await Promise.all(
237
- PROVIDER_LIST.filter(p => !!p.getDynamicModels).map(p => p.getDynamicModels()))).flat(), ...staticModels];
 
 
 
238
  return MODEL_LIST;
239
  }
240
 
 
234
 
235
  async function initializeModelList(): Promise<ModelInfo[]> {
236
  MODEL_LIST = [...(await Promise.all(
237
+ PROVIDER_LIST
238
+ .filter((p): p is ProviderInfo & { getDynamicModels: () => Promise<ModelInfo[]> } => !!p.getDynamicModels)
239
+ .map(p => p.getDynamicModels())))
240
+ .flat(), ...staticModels];
241
  return MODEL_LIST;
242
  }
243