From aff042505e1c48eeb2cdfce8b4c97d2342792670 Mon Sep 17 00:00:00 2001 From: Sanjiv Das Date: Tue, 19 Mar 2024 22:42:47 -0700 Subject: [PATCH 1/2] Add Claude-3-Haiku Added the Claude 3 Haiku model to Anthropic Chat providers and also to Bedrock Claude Chat providers --- packages/jupyter-ai-magics/jupyter_ai_magics/providers.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/jupyter-ai-magics/jupyter_ai_magics/providers.py b/packages/jupyter-ai-magics/jupyter_ai_magics/providers.py index 563c00c4f..5fb15ee57 100644 --- a/packages/jupyter-ai-magics/jupyter_ai_magics/providers.py +++ b/packages/jupyter-ai-magics/jupyter_ai_magics/providers.py @@ -437,7 +437,7 @@ 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 = [ @@ -446,6 +446,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"] @@ -829,6 +830,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"] From 44a7f7b0d124ac2ef1d02fdb54e4817d6a04fb8a Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 20 Mar 2024 05:46:35 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- packages/jupyter-ai-magics/jupyter_ai_magics/providers.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/jupyter-ai-magics/jupyter_ai_magics/providers.py b/packages/jupyter-ai-magics/jupyter_ai_magics/providers.py index 5fb15ee57..f27831e87 100644 --- a/packages/jupyter-ai-magics/jupyter_ai_magics/providers.py +++ b/packages/jupyter-ai-magics/jupyter_ai_magics/providers.py @@ -437,7 +437,9 @@ def is_api_key_exc(cls, e: Exception): return False -class ChatAnthropicProvider(BaseProvider, ChatAnthropic): # https://docs.anthropic.com/claude/docs/models-overview +class ChatAnthropicProvider( + BaseProvider, ChatAnthropic +): # https://docs.anthropic.com/claude/docs/models-overview id = "anthropic-chat" name = "ChatAnthropic" models = [