Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
mishig25 committed Jan 12, 2024
1 parent f6d2e86 commit 2ef7c7d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/lib/components/chat/ChatMessage.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,10 @@
$: downloadLink =
message.from === "user" ? `${$page.url.pathname}/message/${message.id}/prompt` : undefined;
$: webSearchSources =
(ragUpdates && ragUpdates?.filter(({ messageType }) => messageType === "sources")?.[0] as WebSearchUpdate)?.sources;
$: webSearchSources = (
ragUpdates &&
(ragUpdates?.filter(({ messageType }) => messageType === "sources")?.[0] as WebSearchUpdate)
)?.sources;
$: if (isCopied) {
setTimeout(() => {
Expand Down
6 changes: 5 additions & 1 deletion src/routes/conversation/[id]/+server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,11 @@ export async function POST({ request, locals, params, getClientAddress }) {
let webSearchResults: RagContextWebSearch | undefined;

if (webSearch) {
webSearchResults = (await RAGs["webSearch"].retrieveRagContext(conv, newPrompt, update)) as RagContextWebSearch;
webSearchResults = (await RAGs["webSearch"].retrieveRagContext(
conv,
newPrompt,
update
)) as RagContextWebSearch;
}

messages[messages.length - 1].ragContext = webSearchResults;
Expand Down

0 comments on commit 2ef7c7d

Please sign in to comment.