perf: 文本截取

This commit is contained in:
archer
2023-04-17 09:02:39 +08:00
parent 426eceac22
commit 0db413ab52
6 changed files with 10 additions and 38 deletions

View File

@@ -204,17 +204,6 @@ const Chat = ({ chatId }: { chatId: string }) => {
return;
}
// 长度校验
const model = modelList.find((item) => item.model === chatData.modelName);
if (model && val.length >= model.maxToken) {
toast({
title: '单次输入超出 4000 字符',
status: 'warning'
});
return;
}
const newChatList: ChatSiteItemType[] = [
...chatData.history,
{