diff --git a/src/routes/(app)/+page.svelte b/src/routes/(app)/+page.svelte index c0d210fc6..3fbb700af 100644 --- a/src/routes/(app)/+page.svelte +++ b/src/routes/(app)/+page.svelte @@ -106,7 +106,6 @@ const sendPromptOllama = async (model, userPrompt, parentId, _chatId) => { console.log('sendPromptOllama'); let responseMessageId = uuidv4(); - let responseMessage = { parentId: parentId, id: responseMessageId, @@ -126,38 +125,8 @@ } await tick(); - window.scrollTo({ top: document.body.scrollHeight }); - // const res = await fetch(`${$settings?.API_BASE_URL ?? OLLAMA_API_BASE_URL}/generate`, { - // method: 'POST', - // headers: { - // 'Content-Type': 'text/event-stream', - // ...($settings.authHeader && { Authorization: $settings.authHeader }), - // ...($user && { Authorization: `Bearer ${localStorage.token}` }) - // }, - // body: JSON.stringify({ - // model: model, - // prompt: userPrompt, - // system: $settings.system ?? undefined, - // options: { - // seed: $settings.seed ?? undefined, - // temperature: $settings.temperature ?? undefined, - // repeat_penalty: $settings.repeat_penalty ?? undefined, - // top_k: $settings.top_k ?? undefined, - // top_p: $settings.top_p ?? undefined, - // num_ctx: $settings.num_ctx ?? undefined, - // ...($settings.options ?? {}) - // }, - // format: $settings.requestFormat ?? undefined, - // context: - // history.messages[parentId] !== null && - // history.messages[parentId].parentId in history.messages - // ? history.messages[history.messages[parentId].parentId]?.context ?? undefined - // : undefined - // }) - // }); - const res = await fetch(`${$settings?.API_BASE_URL ?? OLLAMA_API_BASE_URL}/chat`, { method: 'POST', headers: { diff --git a/src/routes/(app)/c/[id]/+page.svelte b/src/routes/(app)/c/[id]/+page.svelte index fd61a4dc8..189909979 100644 --- a/src/routes/(app)/c/[id]/+page.svelte +++ b/src/routes/(app)/c/[id]/+page.svelte @@ -133,7 +133,6 @@ const sendPromptOllama = async (model, userPrompt, parentId, _chatId) => { console.log('sendPromptOllama'); let responseMessageId = uuidv4(); - let responseMessage = { parentId: parentId, id: responseMessageId, @@ -153,38 +152,8 @@ } await tick(); - window.scrollTo({ top: document.body.scrollHeight }); - // const res = await fetch(`${$settings?.API_BASE_URL ?? OLLAMA_API_BASE_URL}/generate`, { - // method: 'POST', - // headers: { - // 'Content-Type': 'text/event-stream', - // ...($settings.authHeader && { Authorization: $settings.authHeader }), - // ...($user && { Authorization: `Bearer ${localStorage.token}` }) - // }, - // body: JSON.stringify({ - // model: model, - // prompt: userPrompt, - // system: $settings.system ?? undefined, - // options: { - // seed: $settings.seed ?? undefined, - // temperature: $settings.temperature ?? undefined, - // repeat_penalty: $settings.repeat_penalty ?? undefined, - // top_k: $settings.top_k ?? undefined, - // top_p: $settings.top_p ?? undefined, - // num_ctx: $settings.num_ctx ?? undefined, - // ...($settings.options ?? {}) - // }, - // format: $settings.requestFormat ?? undefined, - // context: - // history.messages[parentId] !== null && - // history.messages[parentId].parentId in history.messages - // ? history.messages[history.messages[parentId].parentId]?.context ?? undefined - // : undefined - // }) - // }); - const res = await fetch(`${$settings?.API_BASE_URL ?? OLLAMA_API_BASE_URL}/chat`, { method: 'POST', headers: {