Skip to content

Commit

Permalink
anthropic: cutoff dates
Browse files Browse the repository at this point in the history
  • Loading branch information
enricoros committed Mar 5, 2024
1 parent 592c5cc commit 66bedf7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/modules/llms/server/anthropic/anthropic.models.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { ModelDescriptionSchema } from '../llm.server.types';

import { LLM_IF_OAI_Chat } from '../../store-llms';
import { LLM_IF_OAI_Chat, LLM_IF_OAI_Vision } from '../../store-llms';

const roundTime = (date: string) => Math.round(new Date(date).getTime() / 1000);

Expand All @@ -11,24 +11,29 @@ export const hardcodedAnthropicModels: ModelDescriptionSchema[] = [
created: roundTime('2024-02-29'),
description: 'Most powerful model for highly complex tasks',
contextWindow: 200000,
maxCompletionTokens: 4096,
pricing: {
cpmPrompt: 0.015,
cpmCompletion: 0.075,
},
interfaces: [LLM_IF_OAI_Chat],
trainingDataCutoff: 'Aug 2023',
interfaces: [LLM_IF_OAI_Chat, LLM_IF_OAI_Vision],
},
{
id: 'claude-3-sonnet-20240229',
label: 'Claude 3 Sonnet',
created: roundTime('2024-03-04'),
created: roundTime('2024-02-29'),
description: 'Ideal balance of intelligence and speed for enterprise workloads',
contextWindow: 200000,
maxCompletionTokens: 4096,
pricing: {
cpmPrompt: 0.003,
cpmCompletion: 0.015,
},
interfaces: [LLM_IF_OAI_Chat],
trainingDataCutoff: 'Aug 2023',
interfaces: [LLM_IF_OAI_Chat, LLM_IF_OAI_Vision],
},
/* Claude 3 Haiku will be here */
{
id: 'claude-2.1',
label: 'Claude 2.1',
Expand Down
1 change: 1 addition & 0 deletions src/modules/llms/server/llm.server.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ const modelDescriptionSchema = z.object({
maxCompletionTokens: z.number().optional(),
pricing: pricingSchema.optional(),
// rateLimits: rateLimitsSchema.optional(),
trainingDataCutoff: z.string().optional(),
interfaces: z.array(z.enum([LLM_IF_OAI_Chat, LLM_IF_OAI_Fn, LLM_IF_OAI_Complete, LLM_IF_OAI_Vision])),
hidden: z.boolean().optional(),
});
Expand Down

0 comments on commit 66bedf7

Please sign in to comment.