Skip to content

Commit

Permalink
fix: udpate the prompt
Browse files Browse the repository at this point in the history
  • Loading branch information
JimmyLv committed Feb 28, 2023
1 parent ddb2a7c commit cf78629
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pages/api/summarize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export default async function handler(req: Request, res: Response) {
top_p: 1,
frequency_penalty: 0,
presence_penalty: 0,
max_tokens: 300,
max_tokens: apiKey ? 400 : 300,
stream: true,
n: 1,
};
Expand Down
2 changes: 1 addition & 1 deletion utils/prompt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export function getSummaryPrompt(title: string,transcript: any) {
.replace(/\n+/g, " ")
.trim()}"\n视频字幕: "${truncateTranscript(transcript)
.replace(/\n+/g, " ")
.trim()}"\n我希望你是一名专业的视频内容编辑,帮我总结视频的内容精华。请你将视频字幕文本进行总结,然后以无序列表的方式返回。不要超过5点,不要重复句子,确保所有的句子都清晰完整,祝你好运!`;
.trim()}"\n我希望你是一名专业的视频内容编辑,帮我总结视频的内容精华。请你将视频字幕文本进行总结,然后以无序列表的方式返回,不要超过5条。记得不要重复句子,确保所有的句子都足够精简,清晰完整,祝你好运!`;
}

// Seems like 15,000 bytes is the limit for the prompt
Expand Down

1 comment on commit cf78629

@vercel
Copy link

@vercel vercel bot commented on cf78629 Feb 28, 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.