Skip to content

Commit

Permalink
Add Claude-3-Haiku (jupyterlab#696) (jupyterlab#697)
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>
(cherry picked from commit d294c68)
  • Loading branch information
srdas authored Mar 20, 2024
1 parent 0dcbc69 commit 9022060
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions packages/jupyter-ai-magics/jupyter_ai_magics/providers.py
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,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 @@ -397,9 +399,11 @@ class ChatAnthropicProvider(BaseProvider, ChatAnthropic):
"claude-v1.2",
"claude-2",
"claude-2.0",
"claude-instant-v1",
"claude-instant-v1.0",
"claude-instant-v1.2",
"claude-2.1",
"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 @@ -781,6 +785,8 @@ class BedrockChatProvider(BaseProvider, BedrockChat):
"anthropic.claude-v2",
"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 9022060

Please sign in to comment.