Skip to content

Commit

Permalink
fix: increase the merge count
Browse files Browse the repository at this point in the history
  • Loading branch information
JimmyLv committed Mar 12, 2023
1 parent 933b735 commit 0217b4c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion pages/api/sumup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
});
Expand Down
4 changes: 2 additions & 2 deletions utils/reduceSubtitleTimestamp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ export function reduceSubtitleTimestamp<T>(
): Array<CommonSubtitleItem> {
// 把字幕数组总共分成 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
Expand Down

1 comment on commit 0217b4c

@vercel
Copy link

@vercel vercel bot commented on 0217b4c Mar 12, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.