sync: update claude model (take 2)

This commit is contained in:
KernelDeimos 2024-11-04 22:46:57 -05:00
parent 52a54d2248
commit fe8d6af1b5
2 changed files with 10 additions and 4 deletions

View File

@ -28,6 +28,7 @@ class ClaudeService extends BaseService {
['puter-chat-completion']: {
async list () {
return [
'claude-3-5-sonnet-latest',
'claude-3-5-sonnet-20241022',
'claude-3-5-sonnet-20240620',
'claude-3-haiku-20240307',
@ -75,7 +76,7 @@ class ClaudeService extends BaseService {
}, stream);
(async () => {
const completion = await this.anthropic.messages.stream({
model: model ?? 'claude-3-5-sonnet-20241022',
model: model ?? 'claude-3-5-sonnet-latest',
max_tokens: 1000,
temperature: 0,
system: PUTER_PROMPT + JSON.stringify(system_prompts),
@ -98,7 +99,7 @@ class ClaudeService extends BaseService {
}
const msg = await this.anthropic.messages.create({
model: 'claude-3-5-sonnet-20241022',
model: 'claude-3-5-sonnet-latest',
max_tokens: 1000,
temperature: 0,
system: PUTER_PROMPT + JSON.stringify(system_prompts),

View File

@ -229,7 +229,7 @@ class AI{
// convert to the correct model name if necessary
if( options.model === 'claude-3-5-sonnet' || options.model === 'claude'){
options.model = 'claude-3-5-sonnet-20240620';
options.model = 'claude-3-5-sonnet-latest';
}
if ( options.model === 'mistral' ) {
options.model = 'mistral-large-latest';
@ -241,7 +241,12 @@ class AI{
// map model to the appropriate driver
if (!options.model || options.model === 'gpt-4o' || options.model === 'gpt-4o-mini') {
driver = 'openai-completion';
}else if(options.model === 'claude-3-haiku-20240307' || options.model === 'claude-3-5-sonnet-20240620'){
}else if(
options.model === 'claude-3-haiku-20240307' ||
options.model === 'claude-3-5-sonnet-20240620' ||
options.model === 'claude-3-5-sonnet-20241022' ||
options.model === 'claude-3-5-sonnet-latest'
){
driver = 'claude';
}else if(options.model === 'meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo' || options.model === 'meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo' || options.model === 'meta-llama/Meta-Llama-3.1-405B-Instruct-Turbo' || options.model === `google/gemma-2-27b-it`){
driver = 'together-ai';