Files
open-webui/backend/open_webui/utils
Timothy Jaeryang Baek 9d8f590fc5 feat: support pipe filters for per-message content truncation in task templates
Add |middletruncate:n, |start:n, and |end:n pipe filters to the
{{MESSAGES}} template variable, enabling per-message character
truncation for task models (title, tags, follow-up, etc.).

Example: {{MESSAGES:END:2|middletruncate:500}}

This optimizes task model prompt size for conversations with very
long messages (e.g. pasted documents), reducing latency for local
models and API costs.

Closes #21499
2026-03-08 17:43:23 -05:00
..
2026-03-02 17:26:18 -06:00
2026-02-11 16:40:40 -06:00
2026-02-21 15:35:34 -06:00
2026-02-11 16:24:11 -06:00
2026-02-19 16:29:19 -06:00
2026-02-16 15:32:28 -06:00
2026-02-11 16:24:11 -06:00
2026-02-11 16:24:11 -06:00
2026-01-28 01:18:39 +04:00
2025-12-29 00:21:18 +04:00
2026-02-06 03:23:37 +04:00
2026-03-07 20:43:45 -06:00
2026-02-27 16:03:12 -06:00
2026-03-07 20:14:32 -06:00
2026-02-22 17:11:50 -06:00
2026-02-21 15:35:34 -06:00
2025-12-02 03:52:38 -05:00
2026-02-23 18:23:34 -06:00
2026-02-11 16:24:11 -06:00
2026-02-24 14:47:28 -06:00
2026-02-11 16:24:11 -06:00