💬 Chatbot
Chatbot (SDVN)
- image
- audio
- video
- answer
- prompt
Chatbot calls a cloud LLM from inside your workflow and hands the answer back as text. The obvious use is prompt engineering - write a rough idea, have Gemini or GPT expand it into a proper detailed prompt, feed that straight into your CLIP encoder - but it also does vision (describe or caption an image), and it can be pointed at other text tasks in a graph. It's the pack's bridge to the big commercial models, so it needs an API key and it sends your data off to a third party. Both of those are the price of admission.
The chatbot picker is the model you're calling: a spread of Gemini tiers (3.1 Flash Lite up through 3 Pro), OpenAI's GPT-5 family (full, mini, nano), and Deepseek R1. Pick the model, and how well and how expensively it answers is on that provider, not this node. The APIkey field takes your key inline, or you can set defaults once in the pack's API_key.json file and leave the field blank - the README walks through where to get each provider's key. main_prompt and sub_prompt are your instruction and a secondary/context prompt; preset offers a couple of canned modes (Python Function, Prompt Generate) that pre-frame the request for common jobs; translate runs your text through Google Translate first; and seed feeds the dynamic-prompt support.
The optional inputs are what make it more than a text box: image, audio, video, and file. Attach an image and a vision-capable model (Gemini, GPT) can look at it and answer about it - caption it, extract a prompt from it, critique it. The outputs are answer, the model's full reply, and prompt, the resolved prompt text, so you can route a generated prompt straight into the rest of the graph while keeping the raw answer for display.
The most common reach for this is "make my lazy prompt good": type "a knight in a forest," run it through a Prompt Generate preset, and get back a paragraph with lighting, lens, and style detail the base model responds to. That works well and it's a legitimately nice loop to have in-graph. The honest caveats are the ones that come with any API node. It costs money per call on the provider's meter - this isn't local and free like the rest of your graph. It sends your prompts (and any attached image) to that provider's servers, which matters if you care where your inputs go. And it needs network access and a valid key, so it's a dependency your workflow now carries that a pure-local graph doesn't.
One security note that's true of every custom node, this one included: ComfyUI custom nodes run arbitrary Python with full access to your machine, and a node that also holds API keys and talks to the network is exactly the kind you want to have gotten from a source you trust. This is an established community pack, which is the reassurance; the general rule still stands.
Install comes with the pack. ComfyUI Manager, search SDVN_Comfy_node; or cd ComfyUI/custom_nodes && git clone https://github.com/StableDiffusionVN/SDVN_Comfy_node, then pip install -r custom_nodes/SDVN_Comfy_node/requirements.txt from your ComfyUI root and restart. For hands-off keys, copy API_key.json.example to API_key.json and fill in whichever providers you use.
Troubleshooting is mostly auth and quota. A call that fails or returns nothing is usually a missing or wrong key, a key without access to the model tier you picked, or an exhausted quota/credit on the provider - check the provider's dashboard, not the node. A vision request that ignores your image means you picked a model that can't see (the README notes image support is on Gemini and ChatGPT); switch to one that can. And if the whole node won't import, that's the pack-wide requirements.txt step, not this node specifically.
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| chatbot | COMBO | Chọn mô hình chatbot. | |
| preset | COMBO | Preset hội thoại mẫu. | |
| APIkey | STRING | Get API Gemini: https://aistudio.google.com/app/apikey Get API OpenAI: https://platform.openai.com/settings/organization/api-keys Get API HugggingFace: https://huggingface.co/settings/tokens | |
| seed | INT | 00–18446744073709550000 | The random seed |
| main_prompt | STRING | Chatbot prompt | |
| sub_prompt | STRING | Chatbot prompt | |
| translate | COMBO | Ngôn ngữ của phản hồi. | |
| imageopt | IMAGE | Ảnh ngữ cảnh cho Gemini hoặc OpenAI. | |
| audioopt | AUDIO | Audio ngữ cảnh cho Gemini. | |
| videoopt | VIDEO | Video ngữ cảnh cho Gemini. | |
| fileopt | STRING | Đường dẫn file cần tải lên cho Gemini. Hỗ trợ path tuyệt đối hoặc path tương đối từ thư mục input. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| answer | STRING | Phản hồi từ chatbot. |
| prompt | STRING | Prompt cuối cùng trước khi gửi API. |