💬大炮API多轮对话@炮老师的小课堂
Skills, @-mentions, and the two send buttons
- 🤖API模型
- ⚙️对话设置
- 🧩Skill配置
- 📦素材库
- 💬助手回复
- 📚会话历史JSON
- 🧩Skill最终结果
This is the centerpiece of the whole chat system in ComfyUI-dapaoAPI: DapaoAPIMultiTurnChatNode, the workbench that ties together model config, chat settings, Skills, and a material library into an actual back-and-forth with a frontier LLM. It's an output node - one of the few in this pack - which is the first clue that the author thinks of it as a terminal for a pipeline, not just another utility brick. It calls api.dapaoai.com through the OpenAI-compatible interface, so any model in the config node's list is fair game, and it returns three STRING outputs you can feed downstream.
How you build one
The required inputs are a chain of custom-type objects plus some plumbing: 🤖API模型 (from DapaoAPILLMConfigNode) is the only truly mandatory one; 💬本轮消息 is your message; then a set of round-trip state ports - 📚会话历史, 🖼️图片引用, 🧩流程状态, 🧩选项, 🆔请求标识, 🧭执行动作 - that the node writes back out so your workflow can loop the conversation. The optional inputs are where the power is: ⚙️对话设置, 🧩Skill配置, 📦素材库.
That loop pattern is the thing to internalize. The 📚会话历史JSON output feeds straight back into the 📚会话历史 input of the next turn, which is how you get a persistent conversation in a stateless graph. The node also outputs 💬助手回复 and 🧩Skill最终结果, the latter being the finished product of any Skill that runs.
The two send buttons
Here's the design that most people misread at first. The node has 发送 and 发送最终状态 (send final state) actions:
- 发送 queues the chat node and its upstream dependencies and runs the LLM - the normal "chat with the model" path.
- 发送最终状态 does not call the LLM at all. It takes the Skill's final result (falling back to the latest assistant reply) and sends only that to your real downstream nodes, without executing unrelated branches of the canvas. Cost-conscious pipeline folks will love this: it's how you get the output of a conversation without paying to re-run the conversation.
The action is driven by the 🧭执行动作 string port (chat default, publish_final for the no-LLM path). If you run the whole workflow normally instead of pressing buttons, it also executes - the tooltip notes downstream only fires when you explicitly send final state or run the full workflow, and even if you've cleared the chat draft, recent history backfills the reply so downstream doesn't re-request the LLM.
What happens per turn
The node trims history to your configured round limit, estimates tokens, and if a Skill is loaded it can make a routing call (see the Skill loader article - that's the extra call). It parses @图片N / @视频N / @音频N mentions against the material library, Lanczos-scales images to the settings' 2048px cap, and only sends what's referenced this round. It displays input/output/total tokens and call count per turn, shows money only when the API actually returns a fee, and supports ComfyUI list inputs with async concurrent mapping - batch several messages across a list and it fans them out. One honest limitation: paid POSTs are never auto-retried, so a flaky connection costs you a manual re-run rather than a surprise double-bill.
Gotchas
- The 🎲随机种 fields in this family are cache-only, never sent to the LLM. Don't expect seed-locked outputs.
- Chinese-only menus throughout; the README and all tooltips are Simplified Chinese.
- Auto-skill-select costs an extra call; fixed selection doesn't. Build with fixed selection for anything you run repeatedly.
- If your mapped model isn't multimodal and you tag an image, you get a clear error rather than a silent drop - switch to a gemini-3.x or gpt-5.x model for image chat.
Install: ComfyUI Manager → "dapaoAPI", or git clone https://github.com/paolaoshi/ComfyUI-dapaoAPI.git into ComfyUI/custom_nodes/, pip install -r requirements.txt, restart. You need a dapaoAI API key (register at api.dapaoai.com, top up, apply key in the default group). This node is the part of the pack with no Western Reddit footprint and a lot of Chinese workflow love - expect to translate labels and follow the author's WeChat-era community patterns.
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| 🤖API模型 | DAPAO_API_LLM_CONFIG | — | |
| 💬本轮消息 | STRING | — | |
| 📚会话历史 | STRING | [] | — |
| 🖼️图片引用 | STRING | [] | — |
| 🧩流程状态 | STRING | {} | — |
| 🧩选项 | STRING | [] | — |
| 🆔请求标识 | STRING | — | |
| 🧭执行动作 | STRING | chat | — |
| ⚙️对话设置opt | DAPAO_API_CHAT_SETTINGS | — | |
| 🧩Skill配置opt | DAPAO_API_SKILL_CONFIG | — | |
| 📦素材库opt | DAPAO_API_CHAT_MATERIAL_LIBRARY | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| 💬助手回复 | STRING | — |
| 📚会话历史JSON | STRING | — |
| 🧩Skill最终结果 | STRING | — |