Skip to content

A self-hostable bookmark-everything app (links, notes and images) with AI-based automatic tagging and full text search

fix: Instruct the model to only respond with the summary when summarizing content

Mohamed Bassemb9f1a59d9997
diff --git a/packages/shared/prompts.ts b/packages/shared/prompts.ts
index d741030a..82c9ba6e 100644
--- a/packages/shared/prompts.ts
+++ b/packages/shared/prompts.ts
@@ -57,7 +57,7 @@ export function buildSummaryPrompt(
contextLength: number,
) {
const constructPrompt = (c: string) => `
- Summarize the following content in a 3-4 sentences in ${lang}:
+ Summarize the following content in 3-4 sentences in ${lang}, responding ONLY with the summary:
${c}`;
const promptSize = calculateNumTokens(constructPrompt(""));