Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Claude3 Haikuに対応 #392

Merged
merged 2 commits into from
Mar 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/DEPLOY_OPTION.md
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
5 changes: 5 additions & 0 deletions packages/cdk/lambda/utils/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
3 changes: 2 additions & 1 deletion packages/cdk/lib/construct/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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}`);
Expand Down
Loading