mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-10-01 15:46:39 +08:00
增加非流式响应提示
This commit is contained in:
parent
2feb0e96d0
commit
cf340a15bf
@ -1547,6 +1547,7 @@ function _Chat() {
|
|||||||
}
|
}
|
||||||
// 加载状态结束,获取token
|
// 加载状态结束,获取token
|
||||||
const [loadingChange, setLoadingChange] = useState(false);
|
const [loadingChange, setLoadingChange] = useState(false);
|
||||||
|
const currentModel = chatStore.currentSession().mask.modelConfig.model;
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!isLoading && loadingChange) {
|
if (!isLoading && loadingChange) {
|
||||||
try {
|
try {
|
||||||
@ -1568,10 +1569,14 @@ function _Chat() {
|
|||||||
});
|
});
|
||||||
} catch {}
|
} catch {}
|
||||||
}
|
}
|
||||||
|
// 插入判断,展示非流式响应的提示
|
||||||
|
if (currentModel.startsWith("o1") && isLoading) {
|
||||||
|
showToast(Locale.StreamTIp, undefined, 5000);
|
||||||
|
}
|
||||||
return () => {
|
return () => {
|
||||||
setLoadingChange(isLoading);
|
setLoadingChange(isLoading);
|
||||||
};
|
};
|
||||||
}, [isLoading, loadingChange]);
|
}, [currentModel, isLoading, loadingChange]);
|
||||||
|
|
||||||
// 快捷键 shortcut keys
|
// 快捷键 shortcut keys
|
||||||
const [showShortcutKeyModal, setShowShortcutKeyModal] = useState(false);
|
const [showShortcutKeyModal, setShowShortcutKeyModal] = useState(false);
|
||||||
|
@ -6,6 +6,7 @@ const isApp = !!getClientConfig()?.isApp;
|
|||||||
|
|
||||||
const cn = {
|
const cn = {
|
||||||
WIP: "该功能仍在开发中……",
|
WIP: "该功能仍在开发中……",
|
||||||
|
StreamTIp: "当前非流式响应,请稍候……",
|
||||||
Error: {
|
Error: {
|
||||||
Unauthorized: isApp
|
Unauthorized: isApp
|
||||||
? `😆 对话遇到了一些问题,不用慌:
|
? `😆 对话遇到了一些问题,不用慌:
|
||||||
|
@ -7,6 +7,7 @@ import { SAAS_CHAT_UTM_URL } from "@/app/constant";
|
|||||||
const isApp = !!getClientConfig()?.isApp;
|
const isApp = !!getClientConfig()?.isApp;
|
||||||
const en: LocaleType = {
|
const en: LocaleType = {
|
||||||
WIP: "Coming Soon...",
|
WIP: "Coming Soon...",
|
||||||
|
StreamTIp: "Currently generating a non-streaming response, please wait...",
|
||||||
Error: {
|
Error: {
|
||||||
Unauthorized: isApp
|
Unauthorized: isApp
|
||||||
? `😆 Oops, there's an issue. No worries:
|
? `😆 Oops, there's an issue. No worries:
|
||||||
|
Loading…
Reference in New Issue
Block a user