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
- clean_text
- thinking_content
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- defaulthttp://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.
Inputs (23)
| Name | Type | Default | Description |
|---|---|---|---|
| text | STRING | — | |
| api_url | STRING | http://10.0.0.71:5000/v1/chat/completions | — |
| api_key | STRING | supersecretkey | — |
| model_name | STRING | default | — |
| max_tokens | INT | 5001–8192 | — |
| temperature | FLOAT | 0.700.1–2 | — |
| top_p | FLOAT | 0.900–1 | — |
| top_k | INT | 200–200 | — |
| min_p | FLOAT | 0.050–1 | — |
| repetition_penalty | FLOAT | 1.151–2 | — |
| frequency_penalty | FLOAT | 0.000–2 | — |
| presence_penalty | FLOAT | 0.00-2–2 | — |
| dry_multiplier | FLOAT | 0.00–2 | — |
| dry_base | FLOAT | 1.751–5 | — |
| dry_allowed_length | INT | 20–20 | — |
| enable_thinking | BOOLEAN | true | — |
| reasoning_effort | COMBO | medium | 3 options: low, medium, high |
| guidance_scale | FLOAT | 1.00–5 | — |
| seed | INT | -1-1–18446744073709550000 | — |
| system_promptopt | STRING | You are a helpful assistant. | — |
| negative_promptopt | STRING | — | |
| stopopt | STRING | — | |
| instruction_templateopt | STRING | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| clean_text | STRING | — |
| thinking_content | STRING | — |