Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/services/summarizer.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -73,12 +73,12 @@ export class SummarizerService {
};
}

private buildSystenPrompt(
private buildSystemPrompt(
maxLength: number,
style: string,
language: string,
): string {
const styleInstructructions: Record<SummaryStyles, string> = {
const styleInstructions: Record<SummaryStyles, string> = {
concise:
"Create a brief, concise summary focusing on the main points.",
detailed:
Expand All @@ -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}
Expand Down