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

@@ -85,7 +85,7 @@ const SelectFileModal = ({
if (!fileText) return;
await postModelDataSplitData({
modelId,
text: fileText,
text: fileText.replace(/\\n/g, '\n').replace(/\n+/g, '\n'),
prompt: `下面是${prompt || '一段长文本'}`
});
toast({