Sfoglia il codice sorgente

fix: default model load issue

Timothy J. Baek 1 anno fa
parent
commit
42251c232a
1 ha cambiato i file con 4 aggiunte e 3 eliminazioni
  1. 4 3
      src/routes/(app)/+layout.svelte

+ 4 - 3
src/routes/(app)/+layout.svelte

@@ -63,9 +63,6 @@
 			.filter((models) => models)
 			.filter((models) => models)
 			.reduce((a, e, i, arr) => a.concat(e, ...(i < arr.length - 1 ? [{ name: 'hr' }] : [])), []);
 			.reduce((a, e, i, arr) => a.concat(e, ...(i < arr.length - 1 ? [{ name: 'hr' }] : [])), []);
 
 
-		// models.push(...(ollamaModels ? [{ name: 'hr' }, ...ollamaModels] : []));
-		// models.push(...(openAIModels ? [{ name: 'hr' }, ...openAIModels] : []));
-		// models.push(...(liteLLMModels ? [{ name: 'hr' }, ...liteLLMModels] : []));
 		return models;
 		return models;
 	};
 	};
 
 
@@ -110,6 +107,10 @@
 			}
 			}
 
 
 			console.log();
 			console.log();
+
+			await models.set(await getModels());
+			await tick();
+
 			await settings.set(JSON.parse(localStorage.getItem('settings') ?? '{}'));
 			await settings.set(JSON.parse(localStorage.getItem('settings') ?? '{}'));
 
 
 			await modelfiles.set(await getModelfiles(localStorage.token));
 			await modelfiles.set(await getModelfiles(localStorage.token));