From 1b1e5ca998f44d9da8a542645e1f20fcaa75c355 Mon Sep 17 00:00:00 2001 From: Jason Weill <93281816+JasonWeill@users.noreply.github.com> Date: Wed, 7 Feb 2024 15:31:55 -0800 Subject: [PATCH] Add OpenAI text-embedding-3-small, -large models (#628) * Adds new gen-3 embedding models * [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> --- .../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 9ef8720ba..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"] + 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")