From 2ed7efc80e0e5b9f1ee6725696b9eda177bd073c Mon Sep 17 00:00:00 2001 From: Sanjiv Das Date: Mon, 4 Mar 2024 16:39:33 -0800 Subject: [PATCH 1/4] update anthropic models --- packages/jupyter-ai-magics/jupyter_ai_magics/providers.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/jupyter-ai-magics/jupyter_ai_magics/providers.py b/packages/jupyter-ai-magics/jupyter_ai_magics/providers.py index eda848b87..9cbf61b13 100644 --- a/packages/jupyter-ai-magics/jupyter_ai_magics/providers.py +++ b/packages/jupyter-ai-magics/jupyter_ai_magics/providers.py @@ -793,7 +793,7 @@ def __init__(self, *args, **kwargs): async def _acall(self, *args, **kwargs) -> Coroutine[Any, Any, str]: return await self._call_in_executor(*args, **kwargs) - +# See model ID list here: https://docs.aws.amazon.com/bedrock/latest/userguide/model-ids.html class BedrockProvider(BaseProvider, Bedrock): id = "bedrock" name = "Amazon Bedrock" @@ -821,15 +821,15 @@ class BedrockProvider(BaseProvider, Bedrock): async def _acall(self, *args, **kwargs) -> Coroutine[Any, Any, str]: return await self._call_in_executor(*args, **kwargs) - +# See model ID list here: https://docs.aws.amazon.com/bedrock/latest/userguide/model-ids.html class BedrockChatProvider(BaseProvider, BedrockChat): id = "bedrock-chat" name = "Amazon Bedrock Chat" models = [ - "anthropic.claude-v1", "anthropic.claude-v2", "anthropic.claude-v2:1", "anthropic.claude-instant-v1", + "anthropic.claude-3-sonnet-20240229-v1:0" ] model_id_key = "model_id" pypi_package_deps = ["boto3"] From e337e3accb0568f78c0d65cf66c4e2b0677fe3b6 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 5 Mar 2024 00:56:49 +0000 Subject: [PATCH 2/4] [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 9cbf61b13..5dd66c6d7 100644 --- a/packages/jupyter-ai-magics/jupyter_ai_magics/providers.py +++ b/packages/jupyter-ai-magics/jupyter_ai_magics/providers.py @@ -793,6 +793,7 @@ def __init__(self, *args, **kwargs): async def _acall(self, *args, **kwargs) -> Coroutine[Any, Any, str]: return await self._call_in_executor(*args, **kwargs) + # See model ID list here: https://docs.aws.amazon.com/bedrock/latest/userguide/model-ids.html class BedrockProvider(BaseProvider, Bedrock): id = "bedrock" @@ -821,6 +822,7 @@ class BedrockProvider(BaseProvider, Bedrock): async def _acall(self, *args, **kwargs) -> Coroutine[Any, Any, str]: return await self._call_in_executor(*args, **kwargs) + # See model ID list here: https://docs.aws.amazon.com/bedrock/latest/userguide/model-ids.html class BedrockChatProvider(BaseProvider, BedrockChat): id = "bedrock-chat" @@ -829,7 +831,7 @@ 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-sonnet-20240229-v1:0", ] model_id_key = "model_id" pypi_package_deps = ["boto3"] From 6a8da3d573e76607ea3c5a58e436898b61c6b9e3 Mon Sep 17 00:00:00 2001 From: Sanjiv Das Date: Thu, 7 Mar 2024 11:28:43 -0800 Subject: [PATCH 3/4] update anthropic models --- .../jupyter-ai-magics/jupyter_ai_magics/providers.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/packages/jupyter-ai-magics/jupyter_ai_magics/providers.py b/packages/jupyter-ai-magics/jupyter_ai_magics/providers.py index 5dd66c6d7..e45afcf95 100644 --- a/packages/jupyter-ai-magics/jupyter_ai_magics/providers.py +++ b/packages/jupyter-ai-magics/jupyter_ai_magics/providers.py @@ -441,14 +441,11 @@ class ChatAnthropicProvider(BaseProvider, ChatAnthropic): id = "anthropic-chat" name = "ChatAnthropic" models = [ - "claude-v1", - "claude-v1.0", - "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" ] model_id_key = "model" pypi_package_deps = ["anthropic"] From de319c9acf131569c74f45dcc94180eea472cbb9 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 7 Mar 2024 19:29:27 +0000 Subject: [PATCH 4/4] [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 | 2 +- 1 file changed, 1 insertion(+), 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 e45afcf95..563c00c4f 100644 --- a/packages/jupyter-ai-magics/jupyter_ai_magics/providers.py +++ b/packages/jupyter-ai-magics/jupyter_ai_magics/providers.py @@ -445,7 +445,7 @@ class ChatAnthropicProvider(BaseProvider, ChatAnthropic): "claude-2.1", "claude-instant-1.2", "claude-3-opus-20240229", - "claude-3-sonnet-20240229" + "claude-3-sonnet-20240229", ] model_id_key = "model" pypi_package_deps = ["anthropic"]