Skip to content

Commit

Permalink
add anthropic sonnet 3.5 model (mckaywrigley#1794)
Browse files Browse the repository at this point in the history
  • Loading branch information
meetpateltech authored Jun 22, 2024
1 parent cf0fe63 commit 81328b6
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 2 deletions.
6 changes: 6 additions & 0 deletions lib/chat-setting-limits.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ export const CHAT_SETTING_LIMITS: Record<LLMID, ChatSettingLimits> = {
MAX_TOKEN_OUTPUT_LENGTH: 4096,
MAX_CONTEXT_LENGTH: 200000
},
"claude-3-5-sonnet-20240620": {
MIN_TEMPERATURE: 0.0,
MAX_TEMPERATURE: 1.0,
MAX_TOKEN_OUTPUT_LENGTH: 4096,
MAX_CONTEXT_LENGTH: 200000
},

// GOOGLE MODELS

Expand Down
21 changes: 19 additions & 2 deletions lib/models/llm/anthropic-llm-list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { LLM } from "@/types"
const ANTHROPIC_PLATFORM_LINK =
"https://docs.anthropic.com/claude/reference/getting-started-with-the-api"

// Anthropic Models (UPDATED 03/13/24) -----------------------------
// Anthropic Models (UPDATED 06/20/24) -----------------------------

// Claude 2 (UPDATED 12/21/23)
const CLAUDE_2: LLM = {
Expand Down Expand Up @@ -85,10 +85,27 @@ const CLAUDE_3_OPUS: LLM = {
}
}

// Claude 3.5 Sonnet (UPDATED 06/20/24)
const CLAUDE_3_5_SONNET: LLM = {
modelId: "claude-3-5-sonnet-20240620",
modelName: "Claude 3.5 Sonnet",
provider: "anthropic",
hostedId: "claude-3-5-sonnet-20240620",
platformLink: ANTHROPIC_PLATFORM_LINK,
imageInput: true,
pricing: {
currency: "USD",
unit: "1M tokens",
inputCost: 3,
outputCost: 15
}
}

export const ANTHROPIC_LLM_LIST: LLM[] = [
CLAUDE_2,
CLAUDE_INSTANT,
CLAUDE_3_HAIKU,
CLAUDE_3_SONNET,
CLAUDE_3_OPUS
CLAUDE_3_OPUS,
CLAUDE_3_5_SONNET
]
1 change: 1 addition & 0 deletions types/llms.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export type AnthropicLLMID =
| "claude-3-haiku-20240307" // Claude 3 Haiku
| "claude-3-sonnet-20240229" // Claude 3 Sonnet
| "claude-3-opus-20240229" // Claude 3 Opus
| "claude-3-5-sonnet-20240620" // Claude 3.5 Sonnet

// Mistral Models
export type MistralLLMID =
Expand Down

0 comments on commit 81328b6

Please sign in to comment.