Nodes/comfyui_LLM_party/☁️OpenAI Word Vector Search
ComfyUI Node

☁️OpenAI Word Vector Search

OpenAI Word Vector Search — comfyui_LLM_party

By heshengtao·Created 2 years ago·Updated 6 days ago· 2,321
☁️OpenAI Word Vector Search
    • ebd_response
    model_nametext-embedding-3-small
    questionquestion
    is_enabletrue
    k5
    chunk_size200
    chunk_overlap50
    file_content
    base_path
    base_url
    api_key
    is_ollamafalse

    This is the "real" RAG node in comfyui_LLM_party - actual vector embeddings and similarity search, not keyword matching. If Load Keyword Searcher is the free, good-enough option, this is the one you reach for when your questions are phrased differently than your source text and you need the model to understand meaning, not just spot matching words.

    The mechanism is standard embedding-based retrieval, and the README backs this up directly - it describes the project as supporting "industry-specific word vector RAG" for localizing knowledge-base management. Your source text gets chunked, each chunk gets embedded via an OpenAI-compatible embeddings API (text-embedding-3-small by default, the same model OpenAI itself recommends as the cheap, solid default), your question gets embedded the same way, and the node returns the chunks whose embeddings are closest to your question's. That's meaningfully more capable than keyword search - it'll find a relevant chunk even when your question doesn't share a single exact word with it - but it costs an API call per run, unless you route it at a local model instead.

    Inputs that matter. model_name (default text-embedding-3-small) is the embedding model to call. question is what you're searching for. k (default 5), chunk_size (default 200), and chunk_overlap (default 50) are the same retrieval-tuning knobs as the keyword node - how many chunks come back, how big each chunk is, how much they overlap so an answer straddling a boundary doesn't get lost. file_content is optional and, as with this pack's other knowledge-base nodes, is meant to be piped in from Load File Folder or similar rather than typed by hand. The genuinely important optional fields are base_url, api_key, and is_ollama: leave is_ollama off and fill in an OpenAI-compatible base_url/api_key to hit a real embeddings API, or flip is_ollama on and point base_url at a local Ollama instance to embed for free with a self-hosted model instead - a real way to get this node's capability without an API bill. base_path lets you scope the search to a specific location if you're working with files on disk rather than piped-in text. is_enable is the pack's usual on/off toggle. The single output, ebd_response, is a STRING of the matched chunks - feed it straight into your LLM node's context.

    Installing it. This ships with the full comfyui_LLM_party pack - no separate install. Get it through ComfyUI Manager (search "comfyui_LLM_party") or cd ComfyUI/custom_nodes && git clone https://github.com/heshengtao/comfyui_LLM_party, then pip install -r requirements.txt from inside the project folder using your ComfyUI Python environment, and restart.

    Troubleshooting. An empty or error result usually traces back to base_url/api_key - this node needs a real, working embeddings endpoint, and if you leave base_url blank without also flipping on is_ollama, there's nothing for it to call. Make sure base_url for an OpenAI-style API ends in /v1/, the same convention the README insists on for every API node in this pack - a missing trailing slash is a genuinely common source of silent failures across this project. If you're using Ollama instead, confirm Ollama actually supports embeddings for the model you've pulled - not every local model exposes an embedding endpoint. And if the whole pack fails to import rather than just this node erroring, that's the project's much larger bundled requirements.txt hitting a version conflict elsewhere - real users have reported this exact failure mode after a fresh install, and the README's own requirements_fixed.txt is the fallback worth trying first.

    Category大模型派对(llm_party)/知识库(knowbase)

    Inputs (11)

    NameTypeDefaultDescription
    model_nameSTRINGtext-embedding-3-small
    questionSTRINGquestion
    is_enableBOOLEANtrue
    kINT5
    chunk_sizeINT200
    chunk_overlapINT50
    file_contentoptSTRING
    base_pathoptSTRING
    base_urloptSTRING
    api_keyoptSTRING
    is_ollamaoptBOOLEANfalse

    Outputs (1)

    NameTypeDescription
    ebd_responseSTRING