Skip to content

armgit / my-yt

Public Imported from GitHub
0

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

JavaScript

exclude first summary line

Christian Fei33a4a882b0b9
diff --git a/lib/llm.js b/lib/llm.js
index a347d22..3190fe1 100644
--- a/lib/llm.js
+++ b/lib/llm.js
@@ -25,6 +25,7 @@ export async function fetchCompletionLMSTUDIO (system, prompt, model = "llama-3.
const data = await response.json()
let message = data.choices[data.choices.length - 1]?.message?.content || ''
message = message.replace('<|eot_id|>', '')
+ message = message.split('\n').filter((_, i) => i > 0).join('\n')
return message
} catch (error) {
console.error('Error summarizing text:', error)