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