diff options
Diffstat (limited to 'packages/shared/prompts.ts')
| -rw-r--r-- | packages/shared/prompts.ts | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/packages/shared/prompts.ts b/packages/shared/prompts.ts index 82c9ba6e..40e706b2 100644 --- a/packages/shared/prompts.ts +++ b/packages/shared/prompts.ts @@ -53,11 +53,15 @@ You must respond in JSON with the key "tags" and the value is an array of string export function buildSummaryPrompt( lang: string, + customPrompts: string[], content: string, contextLength: number, ) { const constructPrompt = (c: string) => ` - Summarize the following content in 3-4 sentences in ${lang}, responding ONLY with the summary: + Summarize the following content responding ONLY with the summary. You MUST follow the following rules: +- Summary must be in 3-4 sentences. +- The summary language must be in ${lang}. +${customPrompts && customPrompts.map((p) => `- ${p}`).join("\n")} ${c}`; const promptSize = calculateNumTokens(constructPrompt("")); |
