From 9e48aeca454a5a4fcc95a41ae128868f5cea4aaa Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Wed, 17 Jul 2024 15:39:50 +0200 Subject: [PATCH] fix: web search --- src/lib/components/chat/Chat.svelte | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/lib/components/chat/Chat.svelte b/src/lib/components/chat/Chat.svelte index 49d5fa410..c63fd0243 100644 --- a/src/lib/components/chat/Chat.svelte +++ b/src/lib/components/chat/Chat.svelte @@ -770,6 +770,11 @@ if (model?.info?.meta?.knowledge ?? false) { files.push(...model.info.meta.knowledge); } + if (responseMessage?.files) { + files.push( + ...responseMessage?.files.filter((item) => ['web_search_results'].includes(item.type)) + ); + } eventTarget.dispatchEvent( new CustomEvent('chat:start', { @@ -1005,6 +1010,11 @@ if (model?.info?.meta?.knowledge ?? false) { files.push(...model.info.meta.knowledge); } + if (responseMessage?.files) { + files.push( + ...responseMessage?.files.filter((item) => ['web_search_results'].includes(item.type)) + ); + } scrollToBottom();