diff --git a/docs/source/users/index.md b/docs/source/users/index.md index ad15da84f..9cc38ba93 100644 --- a/docs/source/users/index.md +++ b/docs/source/users/index.md @@ -144,8 +144,8 @@ Jupyter AI supports the following model providers: | GPT4All | `gpt4all` | N/A | `gpt4all` | | Hugging Face Hub | `huggingface_hub` | `HUGGINGFACEHUB_API_TOKEN` | `huggingface_hub`, `ipywidgets`, `pillow` | | NVIDIA | `nvidia-chat` | `NVIDIA_API_KEY` | `langchain_nvidia_ai_endpoints` | -| OpenAI | `openai` | `OPENAI_API_KEY` | `openai` | -| OpenAI (chat) | `openai-chat` | `OPENAI_API_KEY` | `openai` | +| OpenAI | `openai` | `OPENAI_API_KEY` | `langchain-openai` | +| OpenAI (chat) | `openai-chat` | `OPENAI_API_KEY` | `langchain-openai` | | SageMaker | `sagemaker-endpoint` | N/A | `boto3` | The environment variable names shown above are also the names of the settings keys used when setting up the chat interface. diff --git a/packages/jupyter-ai-magics/jupyter_ai_magics/partner_providers/openai.py b/packages/jupyter-ai-magics/jupyter_ai_magics/partner_providers/openai.py index 4d37d0663..f9c88dbd8 100644 --- a/packages/jupyter-ai-magics/jupyter_ai_magics/partner_providers/openai.py +++ b/packages/jupyter-ai-magics/jupyter_ai_magics/partner_providers/openai.py @@ -7,7 +7,7 @@ class OpenAIProvider(BaseProvider, OpenAI): name = "OpenAI" models = ["babbage-002", "davinci-002", "gpt-3.5-turbo-instruct"] model_id_key = "model_name" - pypi_package_deps = ["openai"] + pypi_package_deps = ["langchain_openai"] auth_strategy = EnvAuthStrategy(name="OPENAI_API_KEY") @classmethod @@ -43,7 +43,7 @@ class ChatOpenAIProvider(BaseProvider, ChatOpenAI): "gpt-4-1106-preview", ] model_id_key = "model_name" - pypi_package_deps = ["openai"] + pypi_package_deps = ["langchain_openai"] auth_strategy = EnvAuthStrategy(name="OPENAI_API_KEY") fields = [ @@ -75,7 +75,7 @@ class AzureChatOpenAIProvider(BaseProvider, AzureChatOpenAI): models = ["*"] model_id_key = "deployment_name" model_id_label = "Deployment name" - pypi_package_deps = ["openai"] + pypi_package_deps = ["langchain_openai"] auth_strategy = EnvAuthStrategy(name="AZURE_OPENAI_API_KEY") registry = True @@ -102,6 +102,6 @@ class OpenAIEmbeddingsProvider(BaseEmbeddingsProvider, OpenAIEmbeddings): "text-embedding-3-large", ] model_id_key = "model" - pypi_package_deps = ["openai"] + pypi_package_deps = ["langchain_openai"] auth_strategy = EnvAuthStrategy(name="OPENAI_API_KEY")