Skip to content

Commit

Permalink
Add Claude-3-Haiku (#696)
Browse files Browse the repository at this point in the history
* Add Claude-3-Haiku

Added the Claude 3 Haiku model to Anthropic Chat providers and also to Bedrock Claude Chat providers

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
srdas and pre-commit-ci[bot] authored Mar 20, 2024
1 parent 4814904 commit d294c68
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/jupyter-ai-magics/jupyter_ai_magics/providers.py
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,9 @@ def is_api_key_exc(cls, e: Exception):
return False


class ChatAnthropicProvider(BaseProvider, ChatAnthropic):
class ChatAnthropicProvider(
BaseProvider, ChatAnthropic
): # https://docs.anthropic.com/claude/docs/models-overview
id = "anthropic-chat"
name = "ChatAnthropic"
models = [
Expand All @@ -446,6 +448,7 @@ class ChatAnthropicProvider(BaseProvider, ChatAnthropic):
"claude-instant-1.2",
"claude-3-opus-20240229",
"claude-3-sonnet-20240229",
"claude-3-haiku-20240307",
]
model_id_key = "model"
pypi_package_deps = ["anthropic"]
Expand Down Expand Up @@ -829,6 +832,7 @@ class BedrockChatProvider(BaseProvider, BedrockChat):
"anthropic.claude-v2:1",
"anthropic.claude-instant-v1",
"anthropic.claude-3-sonnet-20240229-v1:0",
"anthropic.claude-3-haiku-20240307-v1:0",
]
model_id_key = "model_id"
pypi_package_deps = ["boto3"]
Expand Down

0 comments on commit d294c68

Please sign in to comment.