Skip to content

Commit

Permalink
front: Introduce sonnet-3.5 (#5767)
Browse files Browse the repository at this point in the history
  • Loading branch information
spolu authored Jun 20, 2024
1 parent aa04f0d commit bf06e4a
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 6 deletions.
4 changes: 2 additions & 2 deletions front/components/providers/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import {
} from "@dust-tt/sparkle";
import type { ModelConfig, SUPPORTED_MODEL_CONFIGS } from "@dust-tt/types";
import {
CLAUDE_3_5_SONNET_DEFAULT_MODEL_CONFIG,
CLAUDE_3_HAIKU_DEFAULT_MODEL_CONFIG,
CLAUDE_3_OPUS_DEFAULT_MODEL_CONFIG,
CLAUDE_3_SONNET_DEFAULT_MODEL_CONFIG,
GEMINI_FLASH_DEFAULT_MODEL_CONFIG,
GEMINI_PRO_DEFAULT_MODEL_CONFIG,
GPT_3_5_TURBO_MODEL_CONFIG,
Expand All @@ -32,8 +32,8 @@ export const USED_MODEL_CONFIGS: readonly ModelConfig[] = [
GPT_4_TURBO_MODEL_CONFIG,
GPT_4O_MODEL_CONFIG,
GPT_3_5_TURBO_MODEL_CONFIG,
CLAUDE_3_5_SONNET_DEFAULT_MODEL_CONFIG,
CLAUDE_3_OPUS_DEFAULT_MODEL_CONFIG,
CLAUDE_3_SONNET_DEFAULT_MODEL_CONFIG,
CLAUDE_3_HAIKU_DEFAULT_MODEL_CONFIG,
MISTRAL_LARGE_MODEL_CONFIG,
MISTRAL_SMALL_MODEL_CONFIG,
Expand Down
8 changes: 4 additions & 4 deletions front/lib/api/assistant/global_agents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ import {
} from "@dust-tt/types";
import {
CLAUDE_2_DEFAULT_MODEL_CONFIG,
CLAUDE_3_5_SONNET_DEFAULT_MODEL_CONFIG,
CLAUDE_3_HAIKU_DEFAULT_MODEL_CONFIG,
CLAUDE_3_OPUS_DEFAULT_MODEL_CONFIG,
CLAUDE_3_SONNET_DEFAULT_MODEL_CONFIG,
CLAUDE_INSTANT_DEFAULT_MODEL_CONFIG,
GEMINI_PRO_DEFAULT_MODEL_CONFIG,
GPT_3_5_TURBO_MODEL_CONFIG,
Expand Down Expand Up @@ -317,16 +317,16 @@ async function _getClaude3SonnetGlobalAgent({
versionCreatedAt: null,
versionAuthorId: null,
name: "claude-3-sonnet",
description: CLAUDE_3_SONNET_DEFAULT_MODEL_CONFIG.description,
description: CLAUDE_3_5_SONNET_DEFAULT_MODEL_CONFIG.description,
instructions:
"Your name is claude-3-sonnet, but that does not mean you're expected to generate sonnets unless instructed.",
pictureUrl: "https://dust.tt/static/systemavatar/claude_avatar_full.png",
status,
scope: "global",
userListStatus: status === "active" ? "in-list" : "not-in-list",
model: {
providerId: CLAUDE_3_SONNET_DEFAULT_MODEL_CONFIG.providerId,
modelId: CLAUDE_3_SONNET_DEFAULT_MODEL_CONFIG.modelId,
providerId: CLAUDE_3_5_SONNET_DEFAULT_MODEL_CONFIG.providerId,
modelId: CLAUDE_3_5_SONNET_DEFAULT_MODEL_CONFIG.modelId,
temperature: 0.7,
},
actions: [],
Expand Down
53 changes: 53 additions & 0 deletions types/src/front/lib/assistant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@ export const GPT_4_TURBO_MODEL_ID = "gpt-4-turbo" as const;
export const GPT_4O_MODEL_ID = "gpt-4o" as const;
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 =
Expand All @@ -121,6 +123,7 @@ export const MODEL_IDS = [
GPT_3_5_TURBO_MODEL_ID,
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,
Expand Down Expand Up @@ -259,6 +262,55 @@ export const CLAUDE_3_OPUS_DEFAULT_MODEL_CONFIG: ModelConfigurationType = {
],
},
};
export const CLAUDE_3_5_SONNET_DEFAULT_MODEL_CONFIG: ModelConfigurationType = {
providerId: "anthropic",
modelId: CLAUDE_3_5_SONNET_20240620_MODEL_ID,
displayName: "Claude 3.5 Sonnet",
contextSize: 180_000,
recommendedTopK: 32,
recommendedExhaustiveTopK: 128, // 65_536
largeModel: true,
description:
"Anthropic latest Claude 3.5 Sonnet model, their most intelligent model.",
shortDescription: "Anthropic's smartest model.",
supportsMultiActions: true,
isLegacy: false,
delimitersConfiguration: {
incompleteDelimiterRegex: /<\/?[a-zA-Z_]*$/,
delimiters: [
{
openingPattern: "<thinking>",
closingPattern: "</thinking>",
isChainOfThought: true,
swallow: false,
},
{
openingPattern: "<search_quality_reflection>",
closingPattern: "</search_quality_reflection>",
isChainOfThought: true,
swallow: false,
},
{
openingPattern: "<reflecting>",
closingPattern: "</reflecting>",
isChainOfThought: true,
swallow: false,
},
{
openingPattern: "<search_quality_score>",
closingPattern: "</search_quality_score>",
isChainOfThought: true,
swallow: true,
},
{
openingPattern: "<result>",
closingPattern: "</result>",
isChainOfThought: false,
swallow: false,
},
],
},
};
export const CLAUDE_3_SONNET_DEFAULT_MODEL_CONFIG: ModelConfigurationType = {
providerId: "anthropic",
modelId: CLAUDE_3_SONNET_2024029_MODEL_ID,
Expand Down Expand Up @@ -426,6 +478,7 @@ export const SUPPORTED_MODEL_CONFIGS: ModelConfigurationType[] = [
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,
CLAUDE_INSTANT_DEFAULT_MODEL_CONFIG,
Expand Down

0 comments on commit bf06e4a

Please sign in to comment.