Nodes/comfyui-aichat/OpenAI 内容块连接器
ComfyUI Node

OpenAI 内容块连接器

Bundle OpenAI content parts into one message

By spawner1145·Created about a year ago·Updated 11 days ago· 3
OpenAI 内容块连接器
  • content_part_1
  • content_part_2
  • content_part_3
  • content_parts

The duct tape of the OpenAI side

Same job as the Gemini side's connector, one letter different. OpenAIContentConnector takes up to three OAI_CONTENT_ITEM inputs - text blocks, encoded images, uploaded files - and merges them into a single content_parts list on one output. Since OpenAIChat only has three content slots, this is how you assemble messages with more parts, or how you keep the wiring tidy when a message comes from several sources.

It's a pure aggregator: no settings, no ordering logic, no reordering. Parts come out in the order you plugged them in - 1, then 2, then 3 - and that's the order the model sees. Text context first, image second, that sort of thing. If the reply reads like the model got things backwards, check your connection order before you blame the prompt.

Because the output type matches the input type, you can chain connectors - output into input - and stack well beyond the three-part limit. Same pattern as the Gemini pack.

Inputs and output

content_part_1, content_part_2, content_part_3 - all optional, plug in what you have. content_parts - the merged list.

Under the hood, content items are plain dicts ({"type": "text", ...}, {"input_image": {...}}, {"input_file": {...}}), and the connector just concatenates them. It won't fix a bad part, convert formats, or validate anything - if you feed it garbage, it hands back garbage, slightly better bundled.

Install

With the whole pack via ComfyUI Manager (search "comfyui-aichat") or:

cd ComfyUI/custom_nodes
git clone https://github.com/spawner1145/comfyui-aichat

Restart ComfyUI. No models to download; the pack's dependencies are just openai, httpx, and PyYAML.

When to bother

If you're sending one image or one text prompt, skip it - the Chat node's slots cover you. Reach for the connector when a message grows beyond three parts or when you want a single clean wire into OpenAIChat instead of three separate inputs. It's the most forgettable node in the pack, which is exactly the point: plumbing shouldn't be memorable.

CategoryOpenAI API/Content

Inputs (3)

NameTypeDefaultDescription
content_part_1optOAI_CONTENT_ITEM
content_part_2optOAI_CONTENT_ITEM
content_part_3optOAI_CONTENT_ITEM

Outputs (1)

NameTypeDescription
content_partsOAI_CONTENT_ITEM