improve notifications
This commit is contained in:
parent
c03e16415f
commit
66a5a903c5
@ -73,5 +73,6 @@
|
|||||||
"Hello! I'm RWKV, an open-source and commercially available large language model.": "你好! 我是RWKV, 一个开源可商用的大语言模型.",
|
"Hello! I'm RWKV, an open-source and commercially available large language model.": "你好! 我是RWKV, 一个开源可商用的大语言模型.",
|
||||||
"This tool’s API is compatible with OpenAI API. It can be used with any ChatGPT tool you like. Go to the settings of some ChatGPT tool, replace the 'https://api.openai.com' part in the API address with '": "本工具的API与OpenAI API兼容. 因此可以配合任意你喜欢的ChatGPT工具使用. 打开某个ChatGPT工具的设置, 将API地址中的'https://api.openai.com'部分替换为'",
|
"This tool’s API is compatible with OpenAI API. It can be used with any ChatGPT tool you like. Go to the settings of some ChatGPT tool, replace the 'https://api.openai.com' part in the API address with '": "本工具的API与OpenAI API兼容. 因此可以配合任意你喜欢的ChatGPT工具使用. 打开某个ChatGPT工具的设置, 将API地址中的'https://api.openai.com'部分替换为'",
|
||||||
"New Version Available": "新版本可用",
|
"New Version Available": "新版本可用",
|
||||||
"Update": "更新"
|
"Update": "更新",
|
||||||
|
"Please click the button in the top right corner to start the model": "请点击右上角的按钮启动模型"
|
||||||
}
|
}
|
@ -16,6 +16,7 @@ import {ToolTipButton} from '../components/ToolTipButton';
|
|||||||
import {ArrowCircleUp28Regular, Delete28Regular, RecordStop28Regular} from '@fluentui/react-icons';
|
import {ArrowCircleUp28Regular, Delete28Regular, RecordStop28Regular} from '@fluentui/react-icons';
|
||||||
import {CopyButton} from '../components/CopyButton';
|
import {CopyButton} from '../components/CopyButton';
|
||||||
import {ReadButton} from '../components/ReadButton';
|
import {ReadButton} from '../components/ReadButton';
|
||||||
|
import {toast} from 'react-toastify';
|
||||||
|
|
||||||
const userName = 'M E';
|
const userName = 'M E';
|
||||||
const botName = 'A I';
|
const botName = 'A I';
|
||||||
@ -88,6 +89,10 @@ const ChatPanel: FC = observer(() => {
|
|||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
if (e.type === 'click' || (e.keyCode === 13 && !e.shiftKey)) {
|
if (e.type === 'click' || (e.keyCode === 13 && !e.shiftKey)) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
if (commonStore.modelStatus === ModelStatus.Offline) {
|
||||||
|
toast(t('Please click the button in the top right corner to start the model'), {type: 'warning'});
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (!message) return;
|
if (!message) return;
|
||||||
onSubmit(message);
|
onSubmit(message);
|
||||||
setMessage('');
|
setMessage('');
|
||||||
|
@ -134,7 +134,7 @@ const columns: TableColumnDefinition<ModelSourceItem>[] = [
|
|||||||
}
|
}
|
||||||
{item.downloadUrl && !item.isLocal &&
|
{item.downloadUrl && !item.isLocal &&
|
||||||
<ToolTipButton desc={t('Download')} icon={<ArrowDownload20Regular/>} onClick={() => {
|
<ToolTipButton desc={t('Download')} icon={<ArrowDownload20Regular/>} onClick={() => {
|
||||||
toast(`${t('Downloading')} ${item.name}`);
|
toast(`${t('Downloading')} ${item.name}`, {type: 'info'});
|
||||||
DownloadFile(`./${manifest.localModelDir}/${item.name}`, item.downloadUrl!);
|
DownloadFile(`./${manifest.localModelDir}/${item.name}`, item.downloadUrl!);
|
||||||
}}/>}
|
}}/>}
|
||||||
{item.url && <ToolTipButton desc={t('Open Url')} icon={<Open20Regular/>} onClick={() => {
|
{item.url && <ToolTipButton desc={t('Open Url')} icon={<Open20Regular/>} onClick={() => {
|
||||||
|
Loading…
Reference in New Issue
Block a user