diff --git a/action.cjs b/action.cjs index aca36a7..6559766 100644 --- a/action.cjs +++ b/action.cjs @@ -20,7 +20,7 @@ module.exports = async ({ github, context, inputs, actionPath }) => { 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-opus-20240229-v1:0', + bedrock_models: 'anthropic.claude-3-5-sonnet-20240620-v1:0', owner: context.repo.owner, repo: context.repo.repo, prnum: context.issue.number, diff --git a/src/bedrockExplainPatch.js b/src/bedrockExplainPatch.js index 7389231..52a8242 100644 --- a/src/bedrockExplainPatch.js +++ b/src/bedrockExplainPatch.js @@ -14,6 +14,7 @@ const COUNT_TOKENS_HASHFUN = { 'anthropic.claude-v2': anthropicCountTokens, '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-haiku-20240307-v1:0': anthropicCountTokens, 'anthropic.claude-3-opus-20240229-v1:0': anthropicCountTokens, 'anthropic.claude-instant-v1': anthropicCountTokens, @@ -45,7 +46,7 @@ const countTokens = (text, modelId) => { /* eslint-disable camelcase */ export default async function explainPatch ({ patchBody, owner, repo, - models = ['anthropic.claude-3-opus-20240229-v1:0'], + models = ['anthropic.claude-3-5-sonnet-20240620-v1:0'], system = SYSTEM_PROMPT, max_tokens = 2048, temperature = 1,