AI通用助手
A chat LLM node that isn't locked to one model
- text
The workhorse of the pack's AI lineup: a plain language-model node that takes text, runs it through a chat LLM, and returns rewritten text. No images, no audio, no video - this is the boring, reliable, text-in-text-out node you use when you want a translation, a prompt polish, or an arbitrary "ask the model something" step in the middle of a workflow. The KB's llm-in-comfyui.md tracks exactly this pattern - an LLM dropped into the graph as a tool, not the frozen encoder inside a checkpoint - and this node is the API-flavored version of it.
The one feature that separates it from a million other chat nodes: the model field is a free text box, not a dropdown. It defaults to deepseek-v3 (served through the default DashScope base URL), but you can type any model name the endpoint supports. Combined with the editable base_url, that means the same node can talk to DashScope's Qwen models, DeepSeek, or - if you point base_url at another OpenAI-compatible server - almost anything else in the ecosystem. This is the node the README's "API can be entered three ways" story is really about: text box, config.json via the "从配置文件获取数据" node, or the DASHSCOPE_API_KEY environment variable.
Inputs: api_key, base_url (pre-filled with https://dashscope.aliyuncs.com/compatible-mode/v1), model, temperature (default 1.3 - the tooltip notes higher is more random, lower is more deterministic; the README warns that different models cap temperature differently, so check the model's docs), mode (AI翻译, AI翻译+润色, 自定义, or 无 to pass text through untouched), out_language, role (your custom system prompt, used in 自定义 mode), and text. Output: one text string, ready to feed a prompt box or another node.
Why you'd reach for it: prompt enhancement before a generation, translating a prompt or caption, or a quick creative brainstorm ("主题创意" in the multimodal sibling - here it's covered by the role presets). It's also the cheapest node in the pack to experiment with, since plain text calls are the most affordable DashScope operation.
Install: ComfyUI Manager → "ComfyUI-My-Nodes", or git clone https://github.com/Tagbliton/ComfyUI-My-Nodes into custom_nodes, restart. Pack deps from requirements.txt: dashscope, openai, requests, soundfile, numpy, and the pinned urllib3==1.26.20.
Gotchas. Same account wall as the rest of the pack - a DashScope key needs a real-name-verified mainland China account, so Invalid Api-Key usually means that, not a typo. If you change base_url to a non-Alibaba endpoint, remember the api_key has to match that service; people routinely paste a DashScope key into an OpenAI-style endpoint and get mystified auth errors. And one behavior worth knowing: in 自定义 mode the out_language field does nothing - the tooltip says so, and the model just follows your role.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| api_key | STRING | — | |
| base_url | STRING | https://dashscope.aliyuncs.com/compatible-mode/v1 | — |
| model | STRING | deepseek-v3 | — |
| temperature | FLOAT | 1.30–2 | 较高的值将使输出更加随机,而较低的值将使其更加集中和确定性 |
| mode | COMBO | 4 options: AI翻译, AI翻译+润色, 自定义, 无 | |
| out_language | COMBO | 输出语言,如果模式为自定义则不会发生作用 | |
| role | STRING | 输入自定义AI角色 | |
| text | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| text | STRING | — |