From da16d43be0ad2f5634fac2b1ca6168ffadc17d63 Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Thu, 25 Jan 2024 01:36:45 -0800 Subject: [PATCH] fix: rag message body format --- src/routes/(app)/+page.svelte | 2 +- src/routes/(app)/c/[id]/+page.svelte | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/routes/(app)/+page.svelte b/src/routes/(app)/+page.svelte index 468ede11..00a7aae3 100644 --- a/src/routes/(app)/+page.svelte +++ b/src/routes/(app)/+page.svelte @@ -519,7 +519,7 @@ .filter((message) => message) .map((message, idx, arr) => ({ role: message.role, - ...(message.files + ...(message.files.filter((file) => file.type === 'image') ? { content: [ { diff --git a/src/routes/(app)/c/[id]/+page.svelte b/src/routes/(app)/c/[id]/+page.svelte index 531259d1..5b08c4c3 100644 --- a/src/routes/(app)/c/[id]/+page.svelte +++ b/src/routes/(app)/c/[id]/+page.svelte @@ -530,7 +530,7 @@ .filter((message) => message) .map((message, idx, arr) => ({ role: message.role, - ...(message.files + ...(message.files.filter((file) => file.type === 'image') ? { content: [ {