This commit is contained in:
Timothy J. Baek
2024-05-24 02:17:48 -07:00
parent 404875cab9
commit e80e4c304a
14 changed files with 49 additions and 60 deletions
@@ -8,7 +8,7 @@
import { splitStream } from '$lib/utils';
import { onMount, tick, getContext } from 'svelte';
import { createModel } from '$lib/apis/ollama';
import { addNewModel, getModelById, getModels } from '$lib/apis/models';
import { addNewModel, getModelById, getModelInfos } from '$lib/apis/models';
const i18n = getContext('i18n');
@@ -99,7 +99,7 @@ SYSTEM """${system}"""`.replace(/^\s*\n/gm, '');
const saveModelfile = async (modelfile) => {
await addNewModel(localStorage.token, modelfile);
await modelfiles.set(await getModels(localStorage.token));
await modelfiles.set(await getModelInfos(localStorage.token));
};
const submitHandler = async () => {
@@ -10,7 +10,7 @@
import { splitStream } from '$lib/utils';
import { createModel } from '$lib/apis/ollama';
import { getModels, updateModelById } from '$lib/apis/models';
import { getModelInfos, updateModelById } from '$lib/apis/models';
import AdvancedParams from '$lib/components/chat/Settings/Advanced/AdvancedParams.svelte';
@@ -86,7 +86,7 @@
const updateModelfile = async (modelfile) => {
await updateModelById(localStorage.token, modelfile.tagName, modelfile);
await modelfiles.set(await getModels(localStorage.token));
await modelfiles.set(await getModelInfos(localStorage.token));
};
const updateHandler = async () => {