From 101da9df94b0dd6d825599845df79cdf1187b481 Mon Sep 17 00:00:00 2001 From: Jez Date: Sat, 8 Nov 2025 14:59:28 +1100 Subject: [PATCH] fix: correct typos in SummarizerService MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Fix buildSystenPrompt → buildSystemPrompt (lines 47, 76) - Fix styleInstructructions → styleInstructions (line 81, 90) - Improves code readability and professionalism --- src/services/summarizer.service.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/services/summarizer.service.ts b/src/services/summarizer.service.ts index 3084ef4..d28f955 100644 --- a/src/services/summarizer.service.ts +++ b/src/services/summarizer.service.ts @@ -44,7 +44,7 @@ export class SummarizerService { language = "English", } = config || {}; - const systemPrompt = this.buildSystenPrompt(maxLength, style, language); + const systemPrompt = this.buildSystemPrompt(maxLength, style, language); // Estimate tokens (rough calculation: 1 token ≈ 4 characters) const inputTokens = Math.ceil((systemPrompt.length + text.length) / 4); @@ -73,12 +73,12 @@ export class SummarizerService { }; } - private buildSystenPrompt( + private buildSystemPrompt( maxLength: number, style: string, language: string, ): string { - const styleInstructructions: Record = { + const styleInstructions: Record = { concise: "Create a brief, concise summary focusing on the main points.", detailed: @@ -87,7 +87,7 @@ export class SummarizerService { "Create a summary using bullet points to highlight key information.", }; - return `You are a professional text summarizer. ${styleInstructructions[style as keyof typeof styleInstructructions]} + return `You are a professional text summarizer. ${styleInstructions[style as keyof typeof styleInstructions]} Instructions: - Summarize in ${language}