perf: 生成qa prompt

This commit is contained in:
archer
2023-04-03 01:39:00 +08:00
parent a0832af14b
commit caf31faf31
2 changed files with 13 additions and 5 deletions

View File

@@ -31,7 +31,7 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
const replaceText = text.replace(/(\\n|\n)+/g, ' ');
// 文本拆分成 chunk
let chunks = replaceText.match(/[^!?.。]+[!?.。]/g) || [];
const chunks = replaceText.match(/[^!?.。]+[!?.。]/g) || [];
const textList: string[] = [];
let splitText = '';