nodes / builtin / ai / localai
Summarize
Condense long text on-device
Condense long text into a short summary with a model that runs in your browser, so the text never leaves your device.
What it does
Section titled “What it does”Summarize runs the Text through a summarization model such as DistilBART CNN (summarize), aiming for the size set by Length. It handles long text for you: text over about 2,500 characters is split into pieces at sentence ends, each piece is summarized in turn, and if the joined summaries are still long they are summarized once more.
There is no cost per run and no API key.
When to use it
Section titled “When to use it”- Get the gist of an article, a long email thread or meeting notes before you store or forward it.
- Shorten scraped page text before passing it to another step.
To summarize with a chat model and your own instructions, use Summarization instead.
Inputs and settings
Section titled “Inputs and settings”| Setting | Type | What it does |
|---|---|---|
| Text | Long text | Long input is split into chunks and summarized piece by piece. |
| Length | Choice | Short ≈ 20–60 words · Medium ≈ 60–130 · Detailed ≈ 130–250. Options: Short, Medium, Detailed. Default: Medium |
| Model | Model picker | Only summarization models are listed here. |
| Min tokens (advanced) | Number | Overrides the length preset minimum. |
| Max tokens (advanced) | Number | Overrides the length preset maximum. |
Lengths count tokens, roughly one per word in English. Use Min tokens (advanced) and Max tokens (advanced) only when the presets do not fit; if the minimum is larger than the maximum, the maximum wins. On very long text the length applies to each piece, then to the final pass.
Outputs
Section titled “Outputs”-
Output
Each output item has these fields:
| Field | Type | What it holds |
|---|---|---|
| summary | Text | |
| words | Number | Words in the summary |
{ "summary": "…", "words": 0}summary is the summary text. Use it as {{ $input.summary }} in the next node.
Dependencies and credentials
Section titled “Dependencies and credentials”None. This node needs no connection and has no slots for other nodes.
The Model picker lists your installed summarization models first, then ones that download on first use. Manage them on the Local AI page.
Example workflow
Section titled “Example workflow”Get a short summary of the page you are reading:
- Get All Text with Output field name
pageTextand Visible text only on. - Summarize with Text
{{ $input.pageText }}, Length Short and Model DistilBART CNN (summarize). - Show Notification with Title
Summaryand Message{{ $input.summary }}.
Common issues
Section titled “Common issues”- “Choose a summarization model.” Model is empty. Pick one.
- “Provide some text to summarize.” Text is empty after expressions run. Check the field name in your expression.
- It takes a long time on very long text. Each piece is a separate model run, one after another. Pass only the part you need, for example with a DOM Selector on Get All Text.
- The summary is too short or too long. Change Length, or set Min tokens (advanced) and Max tokens (advanced).
Related nodes
Section titled “Related nodes”- Summarization: summarize with a chat model.
- Translate: translate the summary on-device.
- Classify Text: sort the text into your own labels.
- Get All Text: read the text of the current page.