Skip to content

Commit

Permalink
feat: added Claude 3.5 Sonnet model (#117)
Browse files Browse the repository at this point in the history
  • Loading branch information
adubovik authored Jun 24, 2024
1 parent 5eb782a commit 0d13191
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ The following models support `POST SERVER_URL/openai/deployments/DEPLOYMENT_NAME

|Vendor|Model|Deployment name|Modality|`/tokenize`|`/truncate_prompt`|tools/functions support|precise tokenization|
|---|---|---|---|---|---|---|---|
|Anthropic|Claude 3.5 Sonnet|anthropic.claude-3-5-sonnet-20240620-v1:0|text-to-text, image-to-text|||||
|Anthropic|Claude 3 Sonnet|anthropic.claude-3-sonnet-20240229-v1:0|text-to-text, image-to-text|||||
|Anthropic|Claude 3 Haiku|anthropic.claude-3-haiku-20240307-v1:0|text-to-text, image-to-text|||||
|Anthropic|Claude 3 Opus|anthropic.claude-3-opus-20240229-v1:0|text-to-text, image-to-text|||||
Expand Down
1 change: 1 addition & 0 deletions aidial_adapter_bedrock/deployments.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ class ChatCompletionDeployment(str, Enum):
ANTHROPIC_CLAUDE_V2 = "anthropic.claude-v2"
ANTHROPIC_CLAUDE_V2_1 = "anthropic.claude-v2:1"
ANTHROPIC_CLAUDE_V3_SONNET = "anthropic.claude-3-sonnet-20240229-v1:0"
ANTHROPIC_CLAUDE_V3_5_SONNET = "anthropic.claude-3-5-sonnet-20240620-v1:0"
ANTHROPIC_CLAUDE_V3_HAIKU = "anthropic.claude-3-haiku-20240307-v1:0"
ANTHROPIC_CLAUDE_V3_OPUS = "anthropic.claude-3-opus-20240229-v1:0"
STABILITY_STABLE_DIFFUSION_XL = "stability.stable-diffusion-xl"
Expand Down
1 change: 1 addition & 0 deletions aidial_adapter_bedrock/llm/model/adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ async def get_bedrock_adapter(
match deployment:
case (
ChatCompletionDeployment.ANTHROPIC_CLAUDE_V3_SONNET
| ChatCompletionDeployment.ANTHROPIC_CLAUDE_V3_5_SONNET
| ChatCompletionDeployment.ANTHROPIC_CLAUDE_V3_HAIKU
| ChatCompletionDeployment.ANTHROPIC_CLAUDE_V3_OPUS
):
Expand Down
2 changes: 2 additions & 0 deletions tests/integration_tests/test_chat_completion.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ def get_id(self):
ChatCompletionDeployment.ANTHROPIC_CLAUDE_V2,
ChatCompletionDeployment.ANTHROPIC_CLAUDE_V2_1,
ChatCompletionDeployment.ANTHROPIC_CLAUDE_V3_SONNET,
ChatCompletionDeployment.ANTHROPIC_CLAUDE_V3_5_SONNET,
ChatCompletionDeployment.META_LLAMA2_13B_CHAT_V1,
ChatCompletionDeployment.META_LLAMA2_70B_CHAT_V1,
ChatCompletionDeployment.META_LLAMA3_8B_INSTRUCT_V1,
Expand All @@ -125,6 +126,7 @@ def supports_tools(deployment: ChatCompletionDeployment) -> bool:
return deployment in [
ChatCompletionDeployment.ANTHROPIC_CLAUDE_V2_1,
ChatCompletionDeployment.ANTHROPIC_CLAUDE_V3_SONNET,
ChatCompletionDeployment.ANTHROPIC_CLAUDE_V3_5_SONNET,
ChatCompletionDeployment.ANTHROPIC_CLAUDE_V3_HAIKU,
ChatCompletionDeployment.ANTHROPIC_CLAUDE_V3_OPUS,
]
Expand Down
1 change: 1 addition & 0 deletions tests/unit_tests/test_endpoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
(ChatCompletionDeployment.ANTHROPIC_CLAUDE_V2, True, True),
(ChatCompletionDeployment.ANTHROPIC_CLAUDE_V2_1, True, True),
(ChatCompletionDeployment.ANTHROPIC_CLAUDE_V3_SONNET, False, False),
(ChatCompletionDeployment.ANTHROPIC_CLAUDE_V3_5_SONNET, False, False),
(ChatCompletionDeployment.ANTHROPIC_CLAUDE_V3_HAIKU, False, False),
(ChatCompletionDeployment.ANTHROPIC_CLAUDE_V3_OPUS, False, False),
(ChatCompletionDeployment.STABILITY_STABLE_DIFFUSION_XL, False, True),
Expand Down

0 comments on commit 0d13191

Please sign in to comment.