diff --git a/src/__tests__/models/claude.test.ts b/src/__tests__/models/claude.test.ts index 037e4ed..8bdb86f 100644 --- a/src/__tests__/models/claude.test.ts +++ b/src/__tests__/models/claude.test.ts @@ -17,7 +17,7 @@ const mockSuccessResponse = { // Import after mocking import { AnthropicModel, createAnthropicModel } from '../../models/anthropic.js'; import { ModelConfig, SummarizationOptions } from '../../types/models.js'; -import { constructPrompt } from '../../models/prompts.js'; +import { constructPrompt, getBaseSummarizationInstructions } from '../../models/prompts.js'; describe('AnthropicModel', () => { const MOCK_API_KEY = 'dummy-key'; @@ -95,7 +95,7 @@ describe('AnthropicModel', () => { it('should summarize content successfully', async () => { const content = 'Test content'; const type = 'text'; - const expectedPrompt = `Summarize the following ${type} in a clear, concise way that would be useful for an AI agent. Focus on the most important information and maintain technical accuracy. + const expectedPrompt = `${getBaseSummarizationInstructions(type)} ${content} diff --git a/src/models/prompts.ts b/src/models/prompts.ts index 0ee43ee..3c7cca8 100644 --- a/src/models/prompts.ts +++ b/src/models/prompts.ts @@ -81,7 +81,7 @@ function getFormatInstructions(output_format?: string): string { /** * Constructs the base summarization instructions */ -function getBaseSummarizationInstructions(type: string): string { +export function getBaseSummarizationInstructions(type: string): string { return `Summarize the following ${type} in a clear, concise way that would be useful for an AI agent. Focus on the most important information and maintain technical accuracy. Always keep your summary shorter than 4096 tokens.`; }