From aa59f0a94ceacb1d3b11dc06f3f08ed5f0ddf44a Mon Sep 17 00:00:00 2001 From: JimmyLv Date: Mon, 13 Mar 2023 11:15:47 +0800 Subject: [PATCH] fix: update the outline level=1 --- components/PromptOptions.tsx | 6 +++--- lib/openai/prompt.ts | 9 ++++++--- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/components/PromptOptions.tsx b/components/PromptOptions.tsx index 1765dc2b..ab0da9d4 100644 --- a/components/PromptOptions.tsx +++ b/components/PromptOptions.tsx @@ -62,7 +62,7 @@ export function PromptOptions({ className="mb-2 block text-sm font-medium text-gray-900 dark:text-white" > 要点个数 - ({getValues("sentenceNumber")}) + (≤{getValues("sentenceNumber")}) 大纲层级 - ({getValues("outlineLevel")}) + (≤{getValues("outlineLevel")}) 详细程度 - ({getValues("detailLevel")}) + (≤{getValues("detailLevel")}) 1; + const outlineTemplateText = shouldShowAsOutline ? `\n - Child points`: ''; + const outlineDescriptionText = shouldShowAsOutline ? `Use the outline list, which can have a hierarchical structure of up to ${videoConfig.outlineLevel} levels. ` : ''; + const prompt = `Your output should use the following template:\n### Summary\n### Highlights\n- ${emojiTemplateText}Bulletpoint${outlineTemplateText}\n\nYour task is to summarise the text I have given you in up to ${sentenceCount} concise bullet points, starting with a short highlight. ${outlineDescriptionText}${emojiDescriptionText}Use the text above: {{Title}} {{Transcript}}.\n\nReply in ${language} Language.`; return `Title: "${videoTitle}"\nTranscript: "${videoTranscript}"\n\nInstructions: ${prompt}`; }