From 724f9a791c2ec64038930ecc192ba5b46b9975c2 Mon Sep 17 00:00:00 2001 From: Stanislas Polu Date: Thu, 20 Jun 2024 20:58:11 +0200 Subject: [PATCH] Remove references to Sonnet 3 (in favor of 3.5) (#5768) * remove CLAUDE_3_SONNET * nit * Add sonnet 3.5 to dust apps --- .../api/w/[wId]/providers/[pId]/models.ts | 1 + types/src/front/lib/assistant.ts | 55 +------------------ 2 files changed, 2 insertions(+), 54 deletions(-) diff --git a/front/pages/api/w/[wId]/providers/[pId]/models.ts b/front/pages/api/w/[wId]/providers/[pId]/models.ts index 21ce05711cd0..b97ee0f6b4f5 100644 --- a/front/pages/api/w/[wId]/providers/[pId]/models.ts +++ b/front/pages/api/w/[wId]/providers/[pId]/models.ts @@ -203,6 +203,7 @@ async function handler( { id: "claude-2.1" }, { id: "claude-3-haiku-20240307" }, { id: "claude-3-sonnet-20240229" }, + { id: "claude-3-5-sonnet-20240620" }, { id: "claude-3-opus-20240229" }, ]; } else { diff --git a/types/src/front/lib/assistant.ts b/types/src/front/lib/assistant.ts index e156465ea94e..b670bd2bb3a8 100644 --- a/types/src/front/lib/assistant.ts +++ b/types/src/front/lib/assistant.ts @@ -66,7 +66,7 @@ export function getSmallWhitelistedModel( return GPT_3_5_TURBO_MODEL_CONFIG; } if (isProviderWhitelisted(owner, "anthropic")) { - return CLAUDE_3_SONNET_DEFAULT_MODEL_CONFIG; + return CLAUDE_3_5_SONNET_DEFAULT_MODEL_CONFIG; } if (isProviderWhitelisted(owner, "google_ai_studio")) { return GEMINI_FLASH_DEFAULT_MODEL_CONFIG; @@ -105,8 +105,6 @@ export const GPT_3_5_TURBO_MODEL_ID = "gpt-3.5-turbo" as const; export const CLAUDE_3_OPUS_2024029_MODEL_ID = "claude-3-opus-20240229" as const; export const CLAUDE_3_5_SONNET_20240620_MODEL_ID = "claude-3-5-sonnet-20240620" as const; -export const CLAUDE_3_SONNET_2024029_MODEL_ID = - "claude-3-sonnet-20240229" as const; export const CLAUDE_3_HAIKU_20240307_MODEL_ID = "claude-3-haiku-20240307" as const; export const CLAUDE_2_1_MODEL_ID = "claude-2.1" as const; @@ -124,7 +122,6 @@ export const MODEL_IDS = [ GPT_4O_MODEL_ID, CLAUDE_3_OPUS_2024029_MODEL_ID, CLAUDE_3_5_SONNET_20240620_MODEL_ID, - CLAUDE_3_SONNET_2024029_MODEL_ID, CLAUDE_3_HAIKU_20240307_MODEL_ID, CLAUDE_2_1_MODEL_ID, CLAUDE_INSTANT_1_2_MODEL_ID, @@ -311,55 +308,6 @@ export const CLAUDE_3_5_SONNET_DEFAULT_MODEL_CONFIG: ModelConfigurationType = { ], }, }; -export const CLAUDE_3_SONNET_DEFAULT_MODEL_CONFIG: ModelConfigurationType = { - providerId: "anthropic", - modelId: CLAUDE_3_SONNET_2024029_MODEL_ID, - displayName: "Claude 3 Sonnet", - contextSize: 180_000, - recommendedTopK: 32, - recommendedExhaustiveTopK: 128, // 65_536 - largeModel: true, - description: - "Anthropic Claude 3 Sonnet model, targeting balance between intelligence and speed for enterprise workloads.", - shortDescription: "Anthropic's balanced model.", - supportsMultiActions: true, - isLegacy: false, - delimitersConfiguration: { - incompleteDelimiterRegex: /<\/?[a-zA-Z_]*$/, - delimiters: [ - { - openingPattern: "", - closingPattern: "", - isChainOfThought: true, - swallow: false, - }, - { - openingPattern: "", - closingPattern: "", - isChainOfThought: true, - swallow: false, - }, - { - openingPattern: "", - closingPattern: "", - isChainOfThought: true, - swallow: false, - }, - { - openingPattern: "", - closingPattern: "", - isChainOfThought: true, - swallow: true, - }, - { - openingPattern: "", - closingPattern: "", - isChainOfThought: false, - swallow: false, - }, - ], - }, -}; export const CLAUDE_3_HAIKU_DEFAULT_MODEL_CONFIG: ModelConfigurationType = { providerId: "anthropic", modelId: CLAUDE_3_HAIKU_20240307_MODEL_ID, @@ -477,7 +425,6 @@ export const SUPPORTED_MODEL_CONFIGS: ModelConfigurationType[] = [ GPT_4_TURBO_MODEL_CONFIG, GPT_4O_MODEL_CONFIG, CLAUDE_3_OPUS_DEFAULT_MODEL_CONFIG, - CLAUDE_3_SONNET_DEFAULT_MODEL_CONFIG, CLAUDE_3_5_SONNET_DEFAULT_MODEL_CONFIG, CLAUDE_3_HAIKU_DEFAULT_MODEL_CONFIG, CLAUDE_2_DEFAULT_MODEL_CONFIG,