LLM Create Chat
The system prompt that seeds every chat
- CHAT
LLM Create Chat is the starting line of the pack's LLM workflow: type a system prompt, get a CHAT object out. That chat object is the thing every other LLM node in the pack passes around - you add messages to it, you complete it, you pass it along - so this node is how you set the model's "persona and rules" once, at the top of the graph.
The system prompt is where you tell the model who it is and how to behave: "You are a prompt expander that outputs JSON only," "You are an image analyzer that describes subjects," "Always answer in under 50 words." Get this right and the rest of your LLM pipeline gets dramatically better output; treat it as a throwaway and you'll fight the model's defaults all day.
How it works
The mechanism is almost insultingly simple: it wraps your system prompt into the standard OpenAI-style message shape - {"role": "system", "content": [{"type": "text", "text": ...}]} - and returns it as a list, which is what the pack calls a CHAT. That's it. The chat is a plain Python list of messages, so it flows through the graph as a normal value.
Inputs and outputs
system_prompt- a multiline STRING, defaulting to "You are a helpful assistant." That's your only input.
Output: a CHAT object. Wire it into LLM Chat Completion to start the actual conversation, or into LLM Chat Add Message to stuff in example turns first (few-shot priming) before the model ever responds.
Where this fits
The pack's LLM flow is: LLM Create Client (API key + endpoint) → LLM Create Chat (system prompt) → optionally LLM Chat Add Message (few-shot examples) → LLM Chat Completion (the actual request). Each conversation gets its own chat object, which means you can run several parallel conversations in one workflow, each with a different persona, all sharing one client. That's the design this node anchors.
One thing worth being clear about, since the pack has a lot of pure-local nodes: this LLM family makes real API calls. You need a client with a valid API key and an OpenAI-compatible endpoint - OpenAI itself, or any local server (vLLM, LM Studio, an OpenAI-compatible gateway) pointing at a base URL. Nothing runs offline.
Installing it
It's in Duanyll Nodepack. ComfyUI Manager → search "Duanyll Nodepack" → install → restart, or:
cd ComfyUI/custom_nodes
git clone https://github.com/Duanyll/duanyll_nodepack
The LLM nodes need only requests, which ComfyUI already ships. Find them under duanyll/llm.
My practical advice: put the real work into that system prompt. Most "the LLM gave me garbage" reports trace back to a lazy system prompt, not a bad model. This node is where you set the rules of the game.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| system_prompt | STRING | You are a helpful assistant. | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| CHAT | CHAT | — |