From 3ca4d7bff09b72dc0f128fcbebb04d563422575d Mon Sep 17 00:00:00 2001 From: Jason Weill Date: Wed, 7 Feb 2024 14:32:53 -0800 Subject: [PATCH 1/2] Adds new gen-3 embedding models --- .../jupyter-ai-magics/jupyter_ai_magics/embedding_providers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/jupyter-ai-magics/jupyter_ai_magics/embedding_providers.py b/packages/jupyter-ai-magics/jupyter_ai_magics/embedding_providers.py index 9ef8720ba..0b45807e0 100644 --- a/packages/jupyter-ai-magics/jupyter_ai_magics/embedding_providers.py +++ b/packages/jupyter-ai-magics/jupyter_ai_magics/embedding_providers.py @@ -71,7 +71,7 @@ def __init__(self, *args, **kwargs): class OpenAIEmbeddingsProvider(BaseEmbeddingsProvider, OpenAIEmbeddings): id = "openai" name = "OpenAI" - models = ["text-embedding-ada-002"] + models = ["text-embedding-ada-002", "text-embedding-3-small", "text-embedding-3-large"] model_id_key = "model" pypi_package_deps = ["openai"] auth_strategy = EnvAuthStrategy(name="OPENAI_API_KEY") From b4bd2c3744a8ceb0cdf614141c60bf5ad6d1e4f6 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 7 Feb 2024 22:37:31 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- .../jupyter_ai_magics/embedding_providers.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/jupyter-ai-magics/jupyter_ai_magics/embedding_providers.py b/packages/jupyter-ai-magics/jupyter_ai_magics/embedding_providers.py index 0b45807e0..55f74bc1c 100644 --- a/packages/jupyter-ai-magics/jupyter_ai_magics/embedding_providers.py +++ b/packages/jupyter-ai-magics/jupyter_ai_magics/embedding_providers.py @@ -71,7 +71,11 @@ def __init__(self, *args, **kwargs): class OpenAIEmbeddingsProvider(BaseEmbeddingsProvider, OpenAIEmbeddings): id = "openai" name = "OpenAI" - models = ["text-embedding-ada-002", "text-embedding-3-small", "text-embedding-3-large"] + models = [ + "text-embedding-ada-002", + "text-embedding-3-small", + "text-embedding-3-large", + ] model_id_key = "model" pypi_package_deps = ["openai"] auth_strategy = EnvAuthStrategy(name="OPENAI_API_KEY")