From ae9499301a1f7fa7e477890d5d8525a6c80f26a1 Mon Sep 17 00:00:00 2001 From: Jing Hua Date: Tue, 7 Mar 2023 23:57:27 +0800 Subject: [PATCH] style: error message + move stream to try block --- src/components/Chat/ChatContent/ChatContent.tsx | 4 ++-- src/hooks/useSubmit.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/Chat/ChatContent/ChatContent.tsx b/src/components/Chat/ChatContent/ChatContent.tsx index b8a58ce..4c95404 100644 --- a/src/components/Chat/ChatContent/ChatContent.tsx +++ b/src/components/Chat/ChatContent/ChatContent.tsx @@ -68,8 +68,8 @@ const ChatContent = () => { /> {error !== '' && ( -
-
+
+
{error}
{ setChats(updatedChats); setGenerating(true); - let stream; try { + let stream; const messages = limitMessageTokens( chats[currentChatIndex].messages, 4000