Skip to content

Commit

Permalink
fix: increase limit cout
Browse files Browse the repository at this point in the history
  • Loading branch information
JimmyLv committed Mar 14, 2023
1 parent 7601dfc commit 458ee3c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/openai/getSmallSizeTranscripts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ type SubtitleItem = {
}

// Seems like 15,000 bytes is the limit for the prompt
const LIMIT_COUNT = 7000; // 1000 is a buffer
// 13000 = 6500*2
const LIMIT_COUNT = 6500; // 2000 is a buffer
export function getSmallSizeTranscripts(newTextData: SubtitleItem[], oldTextData: SubtitleItem[], byteLimit: number = LIMIT_COUNT): string {
const text = newTextData.sort((a, b) => a.index - b.index).map(t => t.text).join(" ");
const byteLength = getByteLength(text);
Expand Down

0 comments on commit 458ee3c

Please sign in to comment.