From 6bc10c8794af2b47f80bbbe856bcbd3efaa8abed Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Tue, 28 Nov 2023 13:25:41 -0800 Subject: [PATCH] fix: openai models messages --- src/routes/(app)/+page.svelte | 2 ++ src/routes/(app)/c/[id]/+page.svelte | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/routes/(app)/+page.svelte b/src/routes/(app)/+page.svelte index fee723c0..14cb72ce 100644 --- a/src/routes/(app)/+page.svelte +++ b/src/routes/(app)/+page.svelte @@ -238,6 +238,8 @@ ]; } + await tick(); + window.scrollTo({ top: document.body.scrollHeight }); const res = await fetch(`https://api.openai.com/v1/chat/completions`, { diff --git a/src/routes/(app)/c/[id]/+page.svelte b/src/routes/(app)/c/[id]/+page.svelte index d1b68e52..daf0f793 100644 --- a/src/routes/(app)/c/[id]/+page.svelte +++ b/src/routes/(app)/c/[id]/+page.svelte @@ -273,6 +273,8 @@ ]; } + await tick(); + window.scrollTo({ top: document.body.scrollHeight }); const res = await fetch(`https://api.openai.com/v1/chat/completions`, {