diff --git a/pages/api/sumup.ts b/pages/api/sumup.ts index 96232b0f..65714d08 100644 --- a/pages/api/sumup.ts +++ b/pages/api/sumup.ts @@ -45,7 +45,8 @@ export default async function handler( } const inputText = subtitlesArray ? getSmallSizeTranscripts(subtitlesArray, subtitlesArray) - : descriptionText; + : descriptionText; // subtitlesArray.map((i) => i.text).join("\n") + const systemPrompt = getSystemPrompt({ shouldShowTimestamp: subtitlesArray ? shouldShowTimestamp : false, }); diff --git a/utils/reduceSubtitleTimestamp.ts b/utils/reduceSubtitleTimestamp.ts index 089e3fb6..570f5b30 100644 --- a/utils/reduceSubtitleTimestamp.ts +++ b/utils/reduceSubtitleTimestamp.ts @@ -35,8 +35,8 @@ export function reduceSubtitleTimestamp( ): Array { // 把字幕数组总共分成 20 组 const TOTAL_GROUP_COUNT = 30; - // 如果字幕不够多,就每3句话合并一下 - const MINIMUM_COUNT_ONE_GROUP = 3; + // 如果字幕不够多,就每7句话合并一下 + const MINIMUM_COUNT_ONE_GROUP = 7; const eachGroupCount = subtitles.length > TOTAL_GROUP_COUNT ? subtitles.length / TOTAL_GROUP_COUNT