You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: app/api/generate-summary/route.ts
+8-2Lines changed: 8 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,7 @@ function formatTime(seconds: number): string {
17
17
18
18
exportasyncfunctionPOST(request: Request){
19
19
try{
20
-
const{ transcript, videoInfo, videoId, model ='gemini-2.5-flash'}=awaitrequest.json();
20
+
const{ transcript, videoInfo, videoId, model ='gemini-2.5-flash', language ='English'}=awaitrequest.json();
21
21
22
22
if(!transcript||!Array.isArray(transcript)){
23
23
returnNextResponse.json(
@@ -63,6 +63,12 @@ ${fullTranscript}
63
63
64
64
**Output Requirements:**
65
65
66
+
**Language Requirement:**
67
+
- Your entire output MUST be written in ${language}.
68
+
- All section titles, descriptions, and content must be in ${language}.
69
+
- Do not mix languages. Everything including headers like "Video Notes", "Context", "Key takeaways" etc. must be translated to ${language}.
70
+
- Maintain the same markdown structure but translate all text to ${language}.
71
+
66
72
**【Video Notes】**
67
73
68
74
1. **Context**
@@ -94,7 +100,7 @@ Highlight the 1-3 most intriguing and memorable and surprising stories/anecdotes
94
100
* All the above content should be presented with clean and clear Markdown sections, paying attention to title hierarchy.
95
101
* Note that the transcript might include transcription errors; you should deduce the correct spellings from the context and output the correct versions
96
102
* Never over-summarize!
97
-
* Format all timestamps as "00:00" and hyperlink the timestamps to the corresponding video sections
103
+
* Include timestamps in MM:SS or HH:MM:SS format (e.g., 05:32 or 1:45:30) for important moments
98
104
* Do not add new facts; if ambiguous statements appear, maintain the original meaning and note the uncertainty.
99
105
* Avoid overly long paragraphs; longer ones can be broken down into multiple logical paragraphs
100
106
* Try to preserve the original tone and voice of the video content. When rewriting, make sure your writing is concise, engaging, and highly readable
0 commit comments