Skip to content

Commit

Permalink
Merge pull request #7 from Braffolk/dev
Browse files Browse the repository at this point in the history
fixed outdated test
  • Loading branch information
Braffolk authored Dec 15, 2024
2 parents 3404729 + 707963d commit 11000c5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/__tests__/models/claude.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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}
Expand Down
2 changes: 1 addition & 1 deletion src/models/prompts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.`;
}

Expand Down

0 comments on commit 11000c5

Please sign in to comment.