debug Completeion _O
See the whole ChatGPT response object, warts and all, right in your terminal
- completion
Some nodes exist to make images. This one exists to make your terminal window very, very chatty. debug Completeion _O takes the full OpenAI chat completion object from the pack's Chat completion _O node and dumps it to the console. No outputs, no preview, nothing on the canvas - pure terminal forensics.
It lives under O/debug/OpenAI/Advanced/ChatGPT, one of two debug nodes the pack provides for its OpenAI suite (the other, debug messages_O, prints the message list you send in). This one prints what comes back. If your ChatGPT workflow is returning something odd - the wrong tone, empty text, a refusal you didn't ask for - this is where you look past the friendly STRING output and see the raw response.
What it takes
A single input:
- completion (OPENAI_CHAT_COMPLETION) - the second output of
Chat completion _O
And that's it. RETURN_TYPES = (), marked as an output node, and the "output" is a print statement:
print(f'QualityOfLifeSuit_Omar92:OpenAIChatCompletion:', completion)
The whole object gets serialized to the console - role, content, finish reason, token usage, the works. Because it's an output node, ComfyUI always executes it, so you can hang it off the completion wire permanently and it'll just keep printing on every queue without interfering with the rest of the graph.
Why you'd bother
The Chat completion _O node only surfaces choices[0].message.content as its STRING output. Everything else - the finish reason, usage stats, the raw structure - stays hidden unless you ask. That's what this node is for. The "debug" prefix in its name is doing real work: this is a debugging tool, not a workflow component. Think of it as a print statement you left in on purpose.
One genuinely useful habit: leave it wired in while you tune a system message. You'll see exactly what the model was actually sent (well, what it returned) instead of guessing why the prompt output changed. When the suite's API calls fail, the completion node swallows the first error and retries once - and in that case there's no completion at all, so this node never fires. When things go silent, check load_openAI _O's endpoint and your API key first.
Install
It ships with the Quality of Life Suit, installed once for the whole O/ menu:
cd <ComfyUI root>/custom_nodes
git clone https://github.com/omar92/ComfyUI-QualityOfLifeSuit_Omar92.git
Restart ComfyUI - a browser reload doesn't load new nodes. The pack generates a config.json on first run and auto-updates on every start; set "autoUpdate": false if you want it to stay put. And don't forget this whole OpenAI wing leans on the pack's own admitted "does not support the new OpenAI API" caveat - if the completion object never shows up at all, that's usually the first place to look.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| completion | OPENAI_CHAT_COMPLETION | — |
Outputs (0)
No outputs