[FEAT] Add support for Claude Sonnet 3.5 model (#1731)

add support for claude sonnet 3.5 model
This commit is contained in:
Sean Hatfield 2024-06-20 10:13:53 -07:00 committed by GitHub
parent d043fdada6
commit 524edd6e69
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 6 additions and 0 deletions

View File

@ -36,6 +36,7 @@ export default function AnthropicAiOptions({ settings }) {
"claude-3-haiku-20240307",
"claude-3-opus-20240229",
"claude-3-sonnet-20240229",
"claude-3-5-sonnet-20240620",
].map((model) => {
return (
<option key={model} value={model}>

View File

@ -23,6 +23,7 @@ const PROVIDER_DEFAULT_MODELS = {
"claude-3-opus-20240229",
"claude-3-sonnet-20240229",
"claude-3-haiku-20240307",
"claude-3-5-sonnet-20240620",
],
azure: [],
lmstudio: [],

View File

@ -46,6 +46,8 @@ class AnthropicLLM {
return 200_000;
case "claude-3-haiku-20240307":
return 200_000;
case "claude-3-5-sonnet-20240620":
return 200_000;
default:
return 100_000; // assume a claude-instant-1.2 model
}
@ -59,6 +61,7 @@ class AnthropicLLM {
"claude-3-opus-20240229",
"claude-3-sonnet-20240229",
"claude-3-haiku-20240307",
"claude-3-5-sonnet-20240620",
];
return validModels.includes(modelName);
}

View File

@ -565,6 +565,7 @@ function validAnthropicModel(input = "") {
"claude-3-opus-20240229",
"claude-3-sonnet-20240229",
"claude-3-haiku-20240307",
"claude-3-5-sonnet-20240620",
];
return validModels.includes(input)
? null