xiongzhu 2 年之前
父節點
當前提交
141c4ed629
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/paper/paper-gen/general.ts

+ 1 - 1
src/paper/paper-gen/general.ts

@@ -109,7 +109,7 @@ ${chapters[i].sections.map((e) => `- ${e.sectionName}\n    ${e.sectionDesc}`).jo
 你只需要输出能够直接出现在论文中的内容,不需要输出你对该内容的总结或者介绍等其他文字,不需要出现介绍下一章或其他承上启下的文字。
 第${i + 1}章:# ${chapters[i].chapterName}:`
         const { content } = await llm.call([new SystemMessage(sysPrompt), new HumanMessage(prompt)])
-        if (!content.includes(chapters[i].chapterName)) {
+        if (!content.trim().split('\n')[0].includes(chapters[i].chapterName)) {
             paper.write(`\n\n# ${chapters[i].chapterName}`)
         }
         paper.write('\n\n' + content)