Ollama Debug History
See what the model actually 'remembers'
- history
- debug_string
Multi-turn chat in ComfyUI is a black box until it isn't. Ollama Debug: History is the inspection tool for that box: feed it the history output from an Ollama Chat Completion and it hands you a readable, numbered transcript of every message the model is currently carrying - system prompt, user turns, assistant replies, in order.
It exists because conversation history in this pack is a structured list of message dicts, and squinting at raw JSON in the middle of debugging is miserable. This node turns that into text you can actually read at a glance.
How it works
It takes the OLLAMA_HISTORY list and formats each message as a numbered role block - something like a header showing the message count, then [1] SYSTEM:, [2] USER:, [3] ASSISTANT: and so on. Empty history returns a polite "(Empty history)". It's an output node, so you don't have to wire its result anywhere - it renders in the UI when the workflow runs.
The inputs and outputs
- history (required) - the
OLLAMA_HISTORYoutput from a Chat Completion node. - formatted_history (output) - the formatted STRING transcript.
Installing it
It's part of the ComfyUI Ollama Model Manager pack: Manager → search "Ollama Manager" → Install → restart, or git clone https://github.com/darth-veitcher/comfyui-ollama-model-manager into ComfyUI/custom_nodes and run python install.py. Python 3.12+, deps auto-installed.
When you'll actually reach for it
Two situations. First, "why did the model answer as if it forgot what I said?" - the answer is usually that the history chain got broken (a chat node not wired to the previous one's history output), and this node shows you exactly what the model received. Second, context management: if your multi-turn workflow keeps degrading after a few exchanges, checking the history tells you how much baggage you're shoving into the context window. It's a debug utility, so it earns its keep exactly once, when you're stuck - but that once is worth having.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| history | OLLAMA_HISTORY | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| debug_string | STRING | — |