Nodes/comfyui_LLM_party/☁️Mini Intent Recognizer
ComfyUI Node

☁️Mini Intent Recognizer

Route a message to one of ten branches without an if/else graph

By heshengtao·Created 2 years ago·Updated 6 days ago· 2,321
☁️Mini Intent Recognizer
    • intent1
    • intent2
    • intent3
    • intent4
    • intent5
    • intent6
    • intent7
    • intent8
    • intent9
    • intent10
    input_str
    model_namegpt-4o-mini
    base_url
    api_key
    is_enabletrue
    intent1
    intent2
    intent3
    intent4
    intent5
    intent6
    intent7
    intent8
    intent9
    intent10

    Building an agent that behaves differently depending on what a user actually meant is normally a two-step job: one LLM call to figure out the intent, then a chain of ComfyUI switch/if nodes to route the graph based on that answer. Mini Intent Recognizer collapses both steps into one node. You describe up to ten possible intents in plain language, feed it a message, and the model sorts the input toward the matching branch itself.

    It's part of comfyui_LLM_party's "mini-party" family - the pack's single-node, no-graph-assembly-required utilities, sitting alongside things like Mini Summary Generator. Where the pack's full agent nodes want a loader, a persona, and a memory node wired together before they do anything, mini-party nodes are meant to be dropped in and used immediately.

    How it works

    input_str is the text you want classified - a user message, a piece of extracted data, whatever needs routing. model_name (default gpt-4o-mini) is the classifier doing the work; a cheap, fast model is genuinely the right call here since intent classification is a small, well-bounded task compared to open-ended generation.

    The interesting part is the intentN fields. You get ten optional slots, intent1 through intent10, each a free-text description of one possible intent - and the node exposes ten correspondingly named outputs, intent1 through intent10. The shape of that pairing is the design: describe your possibilities in the input slots, and the model funnels the message toward whichever output matches. You don't have to fill all ten - leave the ones you're not using blank and just wire up the branches you actually need downstream.

    The inputs and outputs that matter

    • input_str - the message to classify. Required, no default.
    • intent1intent10 - your own description of each possible category, in plain language. The clarity of these descriptions is what the whole node's accuracy rests on.
    • base_url / api_key - optional; leave blank to fall back on this pack's config.ini.
    • is_enable - the pack's standard bypass toggle.

    Ten STRING outputs, intent1intent10, matching the ten input slots one to one - connect each to whatever branch of your workflow should run when that intent is the one that matched.

    How to install it

    Ships with the full pack, no separate download:

    • ComfyUI Manager: search "comfyui_LLM_party", install, restart.
    • Manual: cd ComfyUI/custom_nodes && git clone https://github.com/heshengtao/comfyui_LLM_party, then run pip install -r requirements.txt from inside the pack's folder using ComfyUI's own Python (python_embeded\python.exe -m pip install -r requirements.txt on a portable Windows build), then restart.

    This node makes an API call and nothing more - no local model, no GPU weight of its own.

    Common issues & troubleshooting

    Two intents keep colliding. If intent3 and intent7 both fire on similar messages, the descriptions you wrote are probably too close semantically - the model is doing real classification, not keyword matching, so two vaguely worded categories that mean almost the same thing will genuinely confuse it. Tighten the wording until each intent describes something distinct.

    A slot you left blank never gets used, which is fine. Empty intentN fields are simply not offered as options - you don't need to fill all ten to get useful routing out of three or four.

    Nothing routes at all, or you get an API error. Same root cause as everywhere else in this pack that calls an LLM: check api_key/base_url first, on the node or in config.ini. Separate from this node specifically, real users have reported the entire pack failing to import right after a fresh Manager install - a dependency conflict in the bundled requirements.txt, not a bug in this node - worth checking the ComfyUI console for import errors before assuming your intent wiring is the problem.

    Category大模型派对(llm_party)/迷你派对(mini-party)

    Inputs (15)

    NameTypeDefaultDescription
    input_strSTRING
    model_nameSTRINGgpt-4o-mini
    base_urloptSTRING
    api_keyoptSTRING
    is_enableoptBOOLEANtrue
    intent1optSTRING
    intent2optSTRING
    intent3optSTRING
    intent4optSTRING
    intent5optSTRING
    intent6optSTRING
    intent7optSTRING
    intent8optSTRING
    intent9optSTRING
    intent10optSTRING

    Outputs (10)

    NameTypeDescription
    intent1STRING
    intent2STRING
    intent3STRING
    intent4STRING
    intent5STRING
    intent6STRING
    intent7STRING
    intent8STRING
    intent9STRING
    intent10STRING