diff --git a/docs/DEPLOY_OPTION.md b/docs/DEPLOY_OPTION.md index 2ed44d00..16c6c5b1 100644 --- a/docs/DEPLOY_OPTION.md +++ b/docs/DEPLOY_OPTION.md @@ -167,6 +167,7 @@ Knowledge base プロンプト例: キーワードで検索し情報を取得し ``` "anthropic.claude-3-sonnet-20240229-v1:0", +"anthropic.claude-3-haiku-20240307-v1:0", "anthropic.claude-v2", "anthropic.claude-instant-v1", "meta.llama2-13b-chat-v1", diff --git a/packages/cdk/lambda/utils/models.ts b/packages/cdk/lambda/utils/models.ts index b55e71e6..c02aa9f2 100644 --- a/packages/cdk/lambda/utils/models.ts +++ b/packages/cdk/lambda/utils/models.ts @@ -323,6 +323,11 @@ export const BEDROCK_MODELS: { createBodyText: createBodyTextClaudeMessage, extractOutputText: extractOutputTextClaudeMessage, }, + 'anthropic.claude-3-haiku-20240307-v1:0': { + promptTemplate: CLAUDEV21_PROMPT, + createBodyText: createBodyTextClaudeMessage, + extractOutputText: extractOutputTextClaudeMessage, + }, 'anthropic.claude-v2:1': { promptTemplate: CLAUDEV21_PROMPT, createBodyText: createBodyTextClaudev21, diff --git a/packages/cdk/lib/construct/api.ts b/packages/cdk/lib/construct/api.ts index 1c009881..29f8b1ef 100644 --- a/packages/cdk/lib/construct/api.ts +++ b/packages/cdk/lib/construct/api.ts @@ -56,6 +56,7 @@ export class Api extends Construct { // Validate Model Names const supportedModelIds = [ 'anthropic.claude-3-sonnet-20240229-v1:0', + 'anthropic.claude-3-haiku-20240307-v1:0', 'anthropic.claude-v2:1', 'anthropic.claude-v2', 'anthropic.claude-instant-v1', @@ -69,7 +70,7 @@ export class Api extends Construct { 'mistral.mistral-7b-instruct-v0:2', 'mistral.mixtral-8x7b-instruct-v0:1', ]; - const multiModalModelIds = ['anthropic.claude-3-sonnet-20240229-v1:0']; + const multiModalModelIds = ['anthropic.claude-3-sonnet-20240229-v1:0','anthropic.claude-3-haiku-20240307-v1:0']; for (const modelId of modelIds) { if (!supportedModelIds.includes(modelId)) { throw new Error(`Unsupported Model Name: ${modelId}`);