nœuds / builtin / ai / localai
Generate Text
Summarize, translate or transform text on-device
Ce contenu n’est pas encore disponible dans votre langue.
Turn one piece of text into another (a summary, a translation, a rewrite) with a small model that runs in your browser.
What it does
Section titled “What it does”Generate Text sends the Text to the text-generation model you pick and returns what the model writes. What happens depends on the model:
- DistilBART CNN (summarize) condenses the text.
- NLLB-200 distilled (translate) translates it, using Source language and Target language.
- T5-small follows an instruction at the start of the text, such as
summarize:ortranslate English to German:.
The whole text goes through the model in one pass, so long input can be cut short. There is no cost per run and no API key.
When to use it
Section titled “When to use it”- Run a custom model, or T5-small with your own instruction, that the dedicated nodes do not cover.
- Add a quick offline text transform to a workflow without an API key.
For everyday summaries and translations, prefer Summarize and Translate: they split long text into pieces and offer length and language pickers. For free-form writing, use a chat model with Basic LLM Chain.
Inputs and settings
Section titled “Inputs and settings”| Réglage | Type | Ce que cela fait |
|---|---|---|
| Model | Model picker | Any installed text-generation model, across engines. |
| Text | Text | |
| Source language | Text | For translation models (e.g. eng_Latn). |
| Target language | Text | For translation models (e.g. fra_Latn). |
Source language and Target language are sent to the model only when both are filled in. Use the codes the model expects: for NLLB-200 that is the xxx_Yyyy form, such as eng_Latn, fra_Latn, deu_Latn or spa_Latn. Other models ignore them.
Outputs
Section titled “Outputs”-
Output
Each output item has these fields:
| Field | Type | What it holds |
|---|---|---|
| text | Text |
{ "text": "…"}text is what the model wrote. Use it as {{ $input.text }} 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 models first, then models that download on first use. Manage them, or add a custom model, on the Local AI page.
Example workflow
Section titled “Example workflow”Translate selected text to German with T5:
- Context Menu with Menu Contexts set to Selection.
- Generate Text with Model T5-small and Text
translate English to German: {{ $input.selectionText }}. - Clipboard Write with Text
{{ $input.text }}.
Common issues
Section titled “Common issues”- “Choose a text-generation model.” Model is empty. Pick one.
- “Provide some text.” Text is empty after expressions run.
- An NLLB translation comes out wrong or in the wrong language. Fill in both Source language and Target language with NLLB codes, or use Translate, which picks the codes for you.
- The output stops early or skips the end of the text. These small models read and write a limited amount of text. Use Summarize or Translate, which split long text, or split it upstream.
- “Model “…” isn’t available. Install it from Local AI.“ The saved model is no longer in your list, for example a removed custom model. Pick another model.
Related nodes
Section titled “Related nodes”- Summarize: summaries with length presets and long-text support.
- Translate: translation with language pickers.
- Basic LLM Chain: free-form prompts with a chat model.
- Run Local Model: run any installed model for any task.