Nodes/ComfyUI_EmAySee_CustomNodes/EmAySee Submit To Oobabooga API With Key With Think Parse
ComfyUI Node

EmAySee Submit To Oobabooga API With Key With Think Parse

The kitchen-sink chat API node with thinking-tag parsing — the one you'd actually use

By EmAySee·Created about a year ago·Updated 4 months ago· 2
EmAySee Submit To Oobabooga API With Key With Think Parse
    • clean_text
    • thinking_content
    text
    api_urlhttp://10.0.0.71:5000/v1/chat/completions
    api_keysupersecretkey
    model_namedefault
    max_tokens500
    temperature0.70
    top_p0.90
    top_k20
    min_p0.05
    repetition_penalty1.15
    frequency_penalty0.00
    presence_penalty0.00
    dry_multiplier0.0
    dry_base1.75
    dry_allowed_length2
    enable_thinkingtrue
    reasoning_effortmedium
    guidance_scale1.0
    seed-1
    system_promptYou are a helpful assistant.
    negative_prompt
    stop
    instruction_template

    If you're going to use one Oobabooga node from this pack, this is the one. EmAySee Submit To Oobabooga API With Key With Think Parse is the fullest expression of the author's local-LLM connector: a chat/completions call with every sampler knob text-generation-webui offers, an API key, and - the part that makes it actually good for prompt work - automatic extraction of <think>...</think> reasoning traces into a separate output so your prompt encoder never sees the model's internal monologue.

    It's the sibling of the lighter "Thinker" node, but where that one exposes four knobs, this one exposes the whole panel: top_k, min_p, frequency_penalty, presence_penalty, the DRY repetition trio (dry_multiplier, dry_base, dry_allowed_length), guidance_scale, enable_thinking, reasoning_effort (low/medium/high), plus the standard temperature/top_p/repetition_penalty/seed. Optional inputs give you system_prompt, negative_prompt, stop (comma-separated stop strings), and instruction_template (e.g. "Qwen", "Alpaca", "ChatML") - the last one being how you tell a custom model what chat format to speak.

    How it works

    Builds an OpenAI-style message array, POSTs to /v1/chat/completions with stream: false and all the sampling params in the payload, then regex-splits the reply: everything inside <think> becomes thinking_content, the rest becomes clean_text. No thinking tags? You get the plain reply in clean_text and an empty thinking output. Timeout is 120s, and failures are returned as an Error: ... string in clean_text instead of crashing the graph.

    The inputs that matter

    • text - the user message (force-input; wire it from upstream).
    • api_url - default http://10.0.0.71:5000/v1/chat/completions, the author's LAN box. Change it.
    • api_key - default "supersecretkey". That's a placeholder, not a real key.
    • model_name - default "default", i.e. let text-generation-webui use whatever model is currently loaded. Set it explicitly if you run several.
    • enable_thinking - whether to ask the model to reason (default on). For pure answer jobs, turning it off speeds things up.
    • reasoning_effort - low/medium/high, default medium. Maps to the model's effort setting; lower = faster, dumber.

    Outputs: clean_text → your CLIP Text Encode; thinking_content → a display node, or wire it into a [NatDes]-style parser if you want to keep the reasoning out of the prompt entirely.

    Installing it

    Same pack, same drill - ComfyUI_EmAySee_CustomNodes via ComfyUI Manager, or git clone https://github.com/EmAySee/ComfyUI_EmAySee_CustomNodes into custom_nodes/, restart. No requirements beyond requests, no model files.

    Honest caveats

    The defaults are a screenshot of the author's dev machine (10.0.0.71, supersecretkey), so the first run will likely fail until you point it at your own server. And be careful with the sampler-heavy payload: dry_multiplier, min_p, and guidance_scale are advanced toggles that some model/config combos reject outright - if you get an error string back after touching them, reset them to defaults (0, 0.05, 1.0) before debugging anything else. For most prompt-expansion work you'll leave all of that alone and just use system_prompt, temperature, and max_tokens.

    CategoryEmAySee/API

    Inputs (23)

    NameTypeDefaultDescription
    textSTRING
    api_urlSTRINGhttp://10.0.0.71:5000/v1/chat/completions
    api_keySTRINGsupersecretkey
    model_nameSTRINGdefault
    max_tokensINT5001–8192
    temperatureFLOAT0.700.1–2
    top_pFLOAT0.900–1
    top_kINT200–200
    min_pFLOAT0.050–1
    repetition_penaltyFLOAT1.151–2
    frequency_penaltyFLOAT0.000–2
    presence_penaltyFLOAT0.00-2–2
    dry_multiplierFLOAT0.00–2
    dry_baseFLOAT1.751–5
    dry_allowed_lengthINT20–20
    enable_thinkingBOOLEANtrue
    reasoning_effortCOMBOmedium3 options: low, medium, high
    guidance_scaleFLOAT1.00–5
    seedINT-1-1–18446744073709550000
    system_promptoptSTRINGYou are a helpful assistant.
    negative_promptoptSTRING
    stopoptSTRING
    instruction_templateoptSTRING

    Outputs (2)

    NameTypeDescription
    clean_textSTRING
    thinking_contentSTRING