From 2c1184fec2cddf82626c38a6c7f486f6eb534658 Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Thu, 15 Feb 2024 01:30:27 -0800 Subject: [PATCH] fix: title --- src/routes/(app)/+page.svelte | 14 ++++++++++++-- src/routes/(app)/c/[id]/+page.svelte | 14 ++++++++++++-- 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/src/routes/(app)/+page.svelte b/src/routes/(app)/+page.svelte index e1aba7d0..2ef7b8c8 100644 --- a/src/routes/(app)/+page.svelte +++ b/src/routes/(app)/+page.svelte @@ -708,9 +708,19 @@ const modelTag = $models.filter((m) => m.name === responseMessage.model).at(0); if (modelTag?.external) { - await sendPromptOpenAI(responseMessage.model, prompt, responseMessage.id, _chatId); + await sendPromptOpenAI( + responseMessage.model, + history.messages[responseMessage.parentId].content, + responseMessage.id, + _chatId + ); } else if (modelTag) { - await sendPromptOllama(responseMessage.model, prompt, responseMessage.id, _chatId); + await sendPromptOllama( + responseMessage.model, + history.messages[responseMessage.parentId].content, + responseMessage.id, + _chatId + ); } else { toast.error(`Model ${model} not found`); } diff --git a/src/routes/(app)/c/[id]/+page.svelte b/src/routes/(app)/c/[id]/+page.svelte index 1218cc02..0f942479 100644 --- a/src/routes/(app)/c/[id]/+page.svelte +++ b/src/routes/(app)/c/[id]/+page.svelte @@ -709,9 +709,19 @@ const modelTag = $models.filter((m) => m.name === responseMessage.model).at(0); if (modelTag?.external) { - await sendPromptOpenAI(responseMessage.model, prompt, responseMessage.id, _chatId); + await sendPromptOpenAI( + responseMessage.model, + history.messages[responseMessage.parentId].content, + responseMessage.id, + _chatId + ); } else if (modelTag) { - await sendPromptOllama(responseMessage.model, prompt, responseMessage.id, _chatId); + await sendPromptOllama( + responseMessage.model, + history.messages[responseMessage.parentId].content, + responseMessage.id, + _chatId + ); } else { toast.error(`Model ${model} not found`); }