This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// WARNING:此脚本仅做学习和演示用途,在不了解其用途前不建议使用 | |
// 本脚本的用途是将输入内容分页,每次提取一页内容,编辑第二条消息,发送,然后收集结果 | |
// 使用前,需要有两条消息,参考模板 https://chat.openai.com/share/17195108-30c2-4c62-8d59-980ca645f111 | |
// 演示视频: https://www.bilibili.com/video/BV1tp4y1c7ME/?vd_source=e71f65cbc40a72fce570b20ffcb28b22 | |
// | |
(function (fullText) { | |
const wait = (ms) => new Promise((resolve) => setTimeout(resolve, ms)); | |
const groupSentences = (fullText, maxCharecters = 2800) => { | |
const sentences = fullText.split("\n").filter((line) => line.trim().length > 0); |