Nodes/Quality of life Suit:V2/Chat_Completion _O
ComfyUI Node

Chat_Completion _O

The deprecated ChatGPT endpoint — and what to use instead

By omar92·Created 3 years ago·Updated 5 months ago· 181
Chat_Completion _O
  • openai
  • messages
  • STR
  • OPENAI_CHAT_COMPLETION
modelgpt-3.5-turbo

Chat_Completion _O is the old version of the pack's ChatGPT completion node - the underscore version - and it's marked deprecated. It sits under O/deprecated/OpenAI/Advanced/ChatGPT, kept around for backward compatibility with workflows built before the pack's refactor. If you're loading an old workflow that references it, you'll want to know what it is; if you're building new, use Chat completion _O instead and don't look back.

What it is

The node takes three inputs: openai (an OPENAI object from the deprecated ChatGPT _O loader), model (a plain string, default gpt-3.5-turbo), and messages (an OPENAI_CHAT_MESSAGES list). It returns the reply as a STR and the raw completion object. Mechanically it calls the old openai.ChatCompletion.create() interface - note the capital C and the old style - which is the whole problem.

Why it broke

The pack's own pyproject description admits it: the extension "does not support the new OpenAI API, leading to compatibility issues." When OpenAI's Python SDK hit 1.0, the old ChatCompletion/openai.Model interface was removed. Users hit exactly this - community threads show errors like "You tried to access openai.Model, but this is no longer supported in openai>=1.0.0" - and the era's workaround was pinning openai==0.28 or migrating the code. If you run this deprecated node today against a modern openai install, it's a coin flip whether it errors.

What to do instead

The pack shipped a cleaned-up chain for exactly this reason:

cd ComfyUI/custom_nodes
git clone https://github.com/omar92/ComfyUI-QualityOfLifeSuit_Omar92.git

then restart ComfyUI, and rebuild the flow with the current nodes: load_openAI _OChat_Message _Ocombine_chat_messages _OChat completion _O. Same idea, current interface, and the client supports any OpenAI-compatible base_url.

The honest take

Deprecated nodes exist so old saved workflows still load without screaming about missing classes - that's genuinely useful, because a missing-node error is how ComfyUI workflows die. But nothing here is worth preserving: the interface is obsolete, it fights the modern SDK, and the replacement is one menu away. If you inherited a workflow with Chat_Completion _O and it errors, don't fight it - swap in the new chain. If you're starting fresh, you should never have met this node.

CategoryO/deprecated/OpenAI/Advanced/ChatGPT

Inputs (3)

NameTypeDefaultDescription
openaiOPENAI
modelSTRINGgpt-3.5-turbo
messagesOPENAI_CHAT_MESSAGES

Outputs (2)

NameTypeDescription
STRSTR
OPENAI_CHAT_COMPLETIONOPENAI_CHAT_COMPLETION