Moonshot Single Chat
One-and-done LLM chat via Kimi, no conversation state to fight
- response
If Groq Chat is the pack's speed demon, Moonshot Single Chat is its "just answer me once and forget it" node. It talks to Kimi, Moonshot AI's chat model, through a single stateless call - every run sends your prompt fresh with no conversation history attached. That's the whole selling point: no hidden state, no surprise context bleed between runs, nothing to reset. You hit queue, you get one answer, the node is clean again.
Mechanically it's the openai SDK pointed at Moonshot's compatible endpoint (https://api.moonshot.cn/v1) with your MOONSHOT_API_KEY from api_key.ini. You pick a context window, not a quality tier - moonshot-v1-8k, 32k, or 128k. They're the same model, so the choice is purely "how much text can I stuff in." If you're feeding it a long document or error log, grab the 128k variant; for one-line prompt expansion, 8k is plenty and cheaper.
Inputs worth knowing:
prompt- your message, multiline.model- the threemoonshot-v1-*context sizes above.temperature- defaults to a cool 0.3, which is sensible for structured output like prompt generation. Crank it for creative prose.max_tokens- up to 128,000, so it's generous.system_message- optional; set it to "you are a prompt engineer for Stable Diffusion" and this becomes a prompt-expander rather than a chatbot.
Output is a single STRING named response. Same wiring as the rest of the pack: straight into a text preview, or into the Prompt Extractor if you asked for both a positive and negative prompt and want them split.
Installing and keys
It ships with the whole pack, so:
cd ComfyUI/custom_nodes
git clone https://github.com/yiwangsimple/ComfyUI_GroqChat
restart, and copy api_key.ini.example → api_key.ini in the pack folder. Grab a key at platform.moonshot.cn/console/api-keys and put it in the MOONSHOT_API_KEY field. The openai>=1.0 dependency comes from requirements.txt.
Gotchas
If you get "MOONSHOT_API_KEY not set or invalid", the ini isn't where the node looks for it - same story as every API node in this pack: key goes in the pack root. And if you find yourself wanting the model to remember what you said last run, you're using the wrong sibling - that's the Multi Chat node's job, deliberately. The only real trap here is expecting context and not getting it; this node is stateless by design.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | — | |
| model | COMBO | 3 options: moonshot-v1-8k, moonshot-v1-32k, moonshot-v1-128k | |
| temperature | FLOAT | 0.30–2 | — |
| max_tokens | INT | 10001–128000 | — |
| system_messageopt | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| response | STRING | — |