Skip to content

Commit ba0d5c6

Browse files
authored
refactor(deps)!: demote LangChain and LangChain-providers from core to dev (#1806)
Now that DefaultFramework handles OpenAI-compatible chat via httpx, LangChain is no longer needed for basic operation. Moving it out of core slims the mandatory install substantially and makes the LangChain integration genuinely opt-in.
1 parent 9360fb2 commit ba0d5c6

4 files changed

Lines changed: 130 additions & 138 deletions

File tree

docs/getting-started/installation-guide.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,10 @@ Use the following steps to install the NeMo Guardrails library in a virtual envi
6262

6363
::::
6464

65-
1. Install the NeMo Guardrails library with support for NVIDIA-hosted models. Set `NVIDIA_API_KEY` to your personal API key generated on [build.nvidia.com](https://build.nvidia.com/).
65+
1. Install the NeMo Guardrails library. Set `NVIDIA_API_KEY` to your personal API key generated on [build.nvidia.com](https://build.nvidia.com/).
6666

6767
```bash
68-
pip install "nemoguardrails[nvidia]"
68+
pip install nemoguardrails
6969
```
7070

7171
1. Set up an environment variable for your NVIDIA API key.
@@ -101,7 +101,7 @@ git clone https://github.com/NVIDIA-NeMo/Guardrails.git nemoguardrails
101101
cd nemoguardrails
102102
python -m venv .venv
103103
source .venv/bin/activate
104-
poetry install --extras "nvidia"
104+
poetry install
105105
```
106106

107107
When using Poetry, prefix CLI commands with `poetry run`:
@@ -120,8 +120,6 @@ You can install the NeMo Guardrails library with optional extra packages to add
120120

121121
| Extra | Description |
122122
|-------|-------------|
123-
| `nvidia` | NVIDIA-hosted model integration through [build.nvidia.com](https://build.nvidia.com/) |
124-
| `openai` | OpenAI-hosted model integration |
125123
| `server` | [Guardrails API server](../run-rails/using-fastapi-server/overview.md) dependencies (aiofiles for async file handling, openai for API schemas). FastAPI is a core dependency. Required to run `nemoguardrails server`. |
126124
| `sdd` | [Sensitive data detection](../configure-rails/guardrail-catalog/pii-detection.md#presidio-based-sensitive-data-detection) using Presidio |
127125
| `eval` | [Evaluation tools](../evaluation/evaluate-guardrails.md) for testing guardrails |

nemoguardrails/imports.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -145,11 +145,11 @@ def import_optional_dependency(
145145

146146
# Commonly used optional dependencies with their extra groups
147147
OPTIONAL_DEPENDENCIES = {
148-
"openai": "openai",
149-
"langchain": None, # Not in extras
150-
"langchain_openai": "openai",
148+
"openai": "server",
149+
"langchain": None,
150+
"langchain_openai": None,
151151
"langchain_community": None,
152-
"langchain_nvidia_ai_endpoints": "nvidia",
152+
"langchain_nvidia_ai_endpoints": None,
153153
"torch": None,
154154
"transformers": None,
155155
"presidio_analyzer": None,

0 commit comments

Comments
 (0)