Nodes/ComfyUI_LiteLLM/ShowMessages
ComfyUI Node

ShowMessages

ShowMessages prints every message on the node

By Hopping-Mad-Games·Created 2 years ago·Updated 11 months ago· 7
ShowMessages
  • messages
  • messages
list_display

When your conversation is five messages deep, "what's in there again?" stops being a trivia question and starts being a debugging problem. ShowMessages renders your entire LLLM_MESSAGES chain on the node itself - every role and every piece of content - so you can actually read the state of the conversation before it goes anywhere.

It's the full-transcript sibling of ShowLastMessage: same design, same passthrough behavior, but instead of printing just the tail, it prints the whole list. If you've built a chat history from a chain of LiteLLMMessage nodes, this is how you verify the system prompt is actually first, the user turns are in order, and nothing got mangled on the way through.

How it works

Required input: messages (LLLM_MESSAGES). Optional: list_display (STRING, multiline) - the widget the pack's JavaScript writes the formatted output into after each run. The handler walks every message and formats it as ROLE: on one line, content on the next, blank line between messages - then returns that as UI text. The complete, unchanged message list comes back as the output (named messages, type LLLM_MESSAGES).

That passthrough is the whole reason you can drop it mid-chain. It's an inspection point, not a terminal node: the list you feed in is the list you get out, byte for byte. Use it anywhere you want to check state and keep flowing.

LiteLLMMessage (system) → LiteLLMMessage (user) → LiteLLMMessage (assistant)
  → ShowMessages → LiteLLMCompletion

Because it's an output node, the graph treats the chain as complete here - so you can run just the message-building half of the workflow, read the transcript on the canvas, and only then connect and run the completion. That's the "check before you spend tokens" workflow, and it's a good habit.

Installing

Pack-level install like every node in this repo: ComfyUI Manager → search "LiteLLM" (repo Hopping-Mad-Games/ComfyUI_LiteLLM) → Install → Restart, or clone into ComfyUI/custom_nodes and pip install -r requirements.txt. The requirements are heavy (litellm, boto3, sentence-transformers, a LightRAG fork), though this node itself is pure formatting - no keys, no API calls. The on-node display comes from the pack's bundled js/ extension, so a full ComfyUI restart after install is required for the rendering to work.

Gotchas

  • An empty chain errors. The handler indexes the list directly; feed it nothing and you'll get an index error rather than a graceful empty display. Give it at least one message.
  • It's a lot of text. For a long conversation the node gets tall fast. If you only care about the latest turn, ShowLastMessage keeps the canvas tidy; if you need the transcript as a string to save or reuse, MessagesToText is the converter.
  • list_display is write-only. It's a UI widget the JS fills in; don't try to wire content into it expecting it to feed the output - the output is always your input, passed through.

Bottom line

The difference between building LLM workflows blind and actually knowing what's in the conversation. It's the node you'll keep on the canvas out of habit - cheap to run, impossible to regret.

CategoryETK/LLM/LiteLLM

Inputs (2)

NameTypeDefaultDescription
messagesLLLM_MESSAGESSomething to show...
list_displayoptSTRING

Outputs (1)

NameTypeDescription
messagesLLLM_MESSAGES