☁️OpenAI Embeddings database Tool
Give your agent a RAG tool without a local model
- tool
This is comfyui_LLM_party's cloud-backed version of retrieval-augmented generation as an agent tool. The mechanism is the standard RAG recipe: chop your document into chunks, turn each chunk into a vector with an embedding model, and at query time pull back whichever chunks are closest to what's being asked, so the LLM can reference real text instead of guessing. What's specific to this node is that the embedding step happens over the OpenAI API rather than a model running on your own GPU - trading your VRAM for API spend, and skipping the need to have an embedding model on disk at all.
How it works
Wire the tool output into an LLM/agent node's tool-list input. Once it's connected, the model can decide mid-conversation to query your knowledge base itself, rather than you manually retrieving and pasting context into the prompt beforehand.
The inputs and outputs that matter
model_name(defaulttext-embedding-3-small) - OpenAI's cheap, fast embedding model; swap it for a larger one if you need better retrieval precision and don't mind the cost.k(default 5) - how many top-matching chunks come back per query. Higher means more context handed to the LLM, but also a longer prompt and a higher chance of pulling in something less relevant.chunk_size/chunk_overlap(200 / 50) - how source text gets split before embedding. Smaller chunks retrieve more precisely but carry less surrounding context; the overlap keeps an idea that straddles a chunk boundary from getting cut in half.file_content(optional) - the text to index, typically piped in from one of this pack's loader nodes rather than typed by hand.base_path(optional) - point at a folder instead of a single blob of text.base_url/api_key- optional, falls back toconfig.iniif left blank.is_ollama(defaultfalse) - flip this on and the node talks to a local Ollama embeddings endpoint through the same OpenAI-compatible interface, instead of the real cloud API. Same trick this pack uses elsewhere to swap "cloud" for "local" without changing anything else about how a node is called.
One output: tool (STRING) - wire it into your agent's tools input.
How to install it
- ComfyUI Manager: search "comfyui_LLM_party", install, restart.
- Manual:
cd ComfyUI/custom_nodes && git clone https://github.com/heshengtao/comfyui_LLM_party, thenpip install -r requirements.txtfrom inside the pack folder using ComfyUI's own Python, then restart.
No local embedding model, no GPU allocation for this node specifically - just working API credentials, or a running local Ollama instance if you're using is_ollama.
Common issues & troubleshooting
It fails before touching your document at all. Check credentials first - an empty or invalid api_key/base_url (or an unfilled config.ini) fails at the very first embedding call, before any chunking happens.
API costs climb faster than expected. Every chunk is a separate embedding call - a large document with a small chunk_size means a lot of requests. If you're indexing something big, consider a coarser chunk_size or check your provider's per-call pricing first.
Retrieval feels off - the LLM keeps citing the wrong parts of your document. That traces back to chunk_size/chunk_overlap, not this node's connection to the API. Chunks too large blur separate topics together; too small, and you lose the surrounding context needed to match a query meaningfully.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| model_name | STRING | text-embedding-3-small | — |
| is_enable | BOOLEAN | true | — |
| k | INT | 5 | — |
| chunk_size | INT | 200 | — |
| chunk_overlap | INT | 50 | — |
| file_contentopt | STRING | — | |
| base_pathopt | STRING | — | |
| base_urlopt | STRING | — | |
| api_keyopt | STRING | — | |
| is_ollamaopt | BOOLEAN | false | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| tool | STRING | — |