Griptape Embedding Driver: OpenAI
OpenAI models, one key, done
- DRIVER
Griptape Embedding Driver: OpenAI is the boring, dependable default - and that's a compliment. One API key, one dropdown, and your RAG pipeline has production-grade embeddings from OpenAI's text-embedding models. It's the first embedding driver people should wire up when they don't have a reason to use something else.
The entire decision this node asks of you is which of the three embedding models you want. Everything else is a key and an environment variable.
How it works
Configuration node, pack-standard: it produces an EMBEDDING_DRIVER that downstream RAG/vector-store nodes use to convert text into vectors. OpenAI's API does the actual embedding; the node just builds the driver.
The inputs:
- embedding_model -
text-embedding-ada-002(default),text-embedding-3-small, ortext-embedding-3-large. The practical tradeoffs: ada-002 is the legacy workhorse; 3-small is cheaper and nearly as good for most retrieval; 3-large is the quality pick with a higher price tag. Model dimensions differ too, which matters if you're mixing embeddings from different drivers. - api_key_env_var - env-var name for
OPENAI_API_KEY, not the key itself. Set it in your shell before launching ComfyUI, or under Settings → Griptape, which picks it up from your environment.
Installing
Ships in the ComfyUI Griptape Nodes pack:
- ComfyUI Manager: search "Griptape" → install ComfyUI-Griptape.
- Manual:
cd ComfyUI/custom_nodes && git clone https://github.com/griptape-ai/ComfyUI-Griptape, then restart.
Pack dependencies: griptape[all], openai, python-dotenv, plus git-hosted extensions. The torch caveat applies pack-wide (reinstall torch with the CUDA index if Griptape's install breaks ComfyUI's build - README troubleshooting).
Gotchas
The key env var is the usual failure point: the node refuses the literal key if you paste it in, because it expects the variable name. If you get auth errors, check that OPENAI_API_KEY is actually set in the environment ComfyUI runs in - and if you launched ComfyUI from a GUI, your shell's .bashrc/.zshrc exports may not have made it in. Also, dimension mismatch is a subtle one: if you change embedding models between runs, previously stored vectors have different dimensions and your vector-store searches silently degrade. Pick your model once and stick with it, or rebuild the index.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| embedding_modelopt | COMBO | text-embedding-ada-002 | Select the embedding model to use. |
| api_key_env_varopt | STRING | OPENAI_API_KEY | Enter the environment variable name that contains your API key, not the actual API key. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| DRIVER | EMBEDDING_DRIVER | — |