From bd522413d3fd602730bbb2837ac14b2b5b9fcccc Mon Sep 17 00:00:00 2001 From: "Lumberbot (aka Jack)" <39504233+meeseeksmachine@users.noreply.github.com> Date: Thu, 8 Feb 2024 00:41:03 +0100 Subject: [PATCH] Backport PR #628: Add OpenAI text-embedding-3-small, -large models (#629) Co-authored-by: Jason Weill <93281816+JasonWeill@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")