From 6406993e83e0d34aa24efecd0c4fcdb37dade452 Mon Sep 17 00:00:00 2001 From: heimoshuiyu Date: Wed, 29 Mar 2023 12:51:31 +0800 Subject: [PATCH] handle create new chatstore on diff model --- src/app.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/app.tsx b/src/app.tsx index 1b41cb8..da39212 100644 --- a/src/app.tsx +++ b/src/app.tsx @@ -121,13 +121,15 @@ export function App() { const key = getDefaultParams("key", ""); const sys = getDefaultParams("sys", ""); const mode = getDefaultParams("mode", ""); + const model = getDefaultParams("model", ""); // only create new chatStore if the params in URL are NOT // equal to the current selected chatStore if ( (api && api !== chatStore.apiEndpoint) || (key && key !== chatStore.apiKey) || (sys && sys !== chatStore.systemMessageContent) || - (mode && mode !== (chatStore.streamMode ? "stream" : "fetch")) + (mode && mode !== (chatStore.streamMode ? "stream" : "fetch")) || + (model && model !== chatStore.model) ) { handleNewChatStore(); }