From b9a3193e8e5823285d65020bc6024d3d2e670adf Mon Sep 17 00:00:00 2001 From: Andrea Brancaleoni Date: Tue, 21 Jan 2025 11:19:42 -0800 Subject: [PATCH] claude: bump models --- action.cjs | 4 ++-- src/anthropicExplainPatch.js | 2 +- src/bedrockExplainPatch.js | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/action.cjs b/action.cjs index 1f7bbe5..01a6226 100644 --- a/action.cjs +++ b/action.cjs @@ -19,8 +19,8 @@ module.exports = async ({ github, context, inputs, actionPath }) => { amplification: '4', filterdiff_args: '--exclude=**/package-lock.json --exclude=**/yarn.lock --exclude=**/*.js.map --exclude=**/*.svg --exclude=**/test/data/**/* --exclude=**/docs/**/* --exclude=**/deploy/**/* --exclude=**/.htpasswd', openai_models: 'gpt-4o-2024-05-13 gpt-3.5-turbo-0125', - anthropic_models: 'claude-3-5-sonnet-20240620', - bedrock_models: 'anthropic.claude-3-5-sonnet-20240620-v1:0', + anthropic_models: 'claude-3-5-sonnet-20241022', + bedrock_models: 'anthropic.claude-3-5-sonnet-20241022-v2:0', owner: context.repo.owner, repo: context.repo.repo, prnum: context.issue.number, diff --git a/src/anthropicExplainPatch.js b/src/anthropicExplainPatch.js index 21542bb..a1b3994 100644 --- a/src/anthropicExplainPatch.js +++ b/src/anthropicExplainPatch.js @@ -5,7 +5,7 @@ import { SYSTEM_PROMPT, explainPatchHelper } from './utils.js' /* eslint-disable camelcase */ export default async function explainPatch ({ apiKey, patchBody, owner, repo, - models = ['claude-3-5-sonnet-20240620'], + models = ['claude-3-5-sonnet-20241022'], system = SYSTEM_PROMPT, max_tokens = 3072, temperature = 1, diff --git a/src/bedrockExplainPatch.js b/src/bedrockExplainPatch.js index 48be019..92d4803 100644 --- a/src/bedrockExplainPatch.js +++ b/src/bedrockExplainPatch.js @@ -15,6 +15,7 @@ const COUNT_TOKENS_HASHFUN = { 'anthropic.claude-v2:1': anthropicCountTokens, 'anthropic.claude-3-sonnet-20240229-v1:0': anthropicCountTokens, 'anthropic.claude-3-5-sonnet-20240620-v1:0': anthropicCountTokens, + 'anthropic.claude-3-5-sonnet-20241022-v2:0': anthropicCountTokens, 'anthropic.claude-3-haiku-20240307-v1:0': anthropicCountTokens, 'anthropic.claude-3-opus-20240229-v1:0': anthropicCountTokens, 'anthropic.claude-instant-v1': anthropicCountTokens, @@ -46,7 +47,7 @@ const countTokens = (text, modelId) => { /* eslint-disable camelcase */ export default async function explainPatch ({ patchBody, owner, repo, - models = ['anthropic.claude-3-5-sonnet-20240620-v1:0'], + models = ['anthropic.claude-3-5-sonnet-20241022-v2:0'], system = SYSTEM_PROMPT, max_tokens = 3072, temperature = 1,