handle create new chatstore on diff model
This commit is contained in:
@@ -121,13 +121,15 @@ export function App() {
|
|||||||
const key = getDefaultParams("key", "");
|
const key = getDefaultParams("key", "");
|
||||||
const sys = getDefaultParams("sys", "");
|
const sys = getDefaultParams("sys", "");
|
||||||
const mode = getDefaultParams("mode", "");
|
const mode = getDefaultParams("mode", "");
|
||||||
|
const model = getDefaultParams("model", "");
|
||||||
// only create new chatStore if the params in URL are NOT
|
// only create new chatStore if the params in URL are NOT
|
||||||
// equal to the current selected chatStore
|
// equal to the current selected chatStore
|
||||||
if (
|
if (
|
||||||
(api && api !== chatStore.apiEndpoint) ||
|
(api && api !== chatStore.apiEndpoint) ||
|
||||||
(key && key !== chatStore.apiKey) ||
|
(key && key !== chatStore.apiKey) ||
|
||||||
(sys && sys !== chatStore.systemMessageContent) ||
|
(sys && sys !== chatStore.systemMessageContent) ||
|
||||||
(mode && mode !== (chatStore.streamMode ? "stream" : "fetch"))
|
(mode && mode !== (chatStore.streamMode ? "stream" : "fetch")) ||
|
||||||
|
(model && model !== chatStore.model)
|
||||||
) {
|
) {
|
||||||
handleNewChatStore();
|
handleNewChatStore();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user