Skip to content

armgit / my-yt

Public Imported from GitHub
0

A clean and minimal youtube frontend, without all the ads and whistles

JavaScript

feat: improved video summary with concise and detailed summary sections

Christian Feibd20a6824ceb
diff --git a/lib/subtitles-summary.js b/lib/subtitles-summary.js
index 39c2c72..d5553f3 100644
--- a/lib/subtitles-summary.js
+++ b/lib/subtitles-summary.js
@@ -17,7 +17,10 @@ Extract the key points from the following video transcript:
${cleanedTranscript}`.trim()
- const systemPrompt = "You're a helpful assistant that sumarizes a video transcript in max 10 sentences, extracting the key points"
+ // const systemPrompt = "You're a helpful assistant that sumarizes a video transcript in max 10 sentences, extracting the key points"
+ const systemPrompt = `Summarize this video given its subtitles into increasing levels of conciseness.
+Begin by summarizing it into a single paragraph, followed by a longer summary that expands on the key points.
+Do not describe or mention the video itself. Simply summarize the points it makes. Focus on the overall or underlying takeaway, cause, reason.`
const summary = await llm.summarize(systemPrompt, userPrompt, llmSettings)
callback('received summary')
repo.setVideoSummary(id, summary)