Reduce ingestion buffering and improve author metadata fallback.

Flush context blocks faster to avoid delayed indexing and use sender_id-based labels when Telegram sender objects are unavailable in historical messages.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-26 12:46:24 +03:00
parent 12b9992079
commit b2874ff580
3 changed files with 21 additions and 12 deletions

View File

@@ -232,11 +232,11 @@ docker compose logs -f tg-userbot
## Параметры склейки сообщений в n8n
В узле `Build Context Block`:
- `WINDOW_MS = 20 минут`
- `MAX_MESSAGES = 12`
- `MIN_MESSAGES_TO_FLUSH = 3`
- `WINDOW_MS = 5 минут`
- `MAX_MESSAGES = 3`
- `MIN_MESSAGES_TO_FLUSH = 1`
Рекомендации:
- меньше блоки: `MAX_MESSAGES = 8-10`;
- шире контекст: `WINDOW_MS = 30-40 минут`.
- если всё ещё есть задержка индексации: `MAX_MESSAGES = 1-2`;
- если нужен более широкий контекст: `WINDOW_MS = 10-20 минут`, `MAX_MESSAGES = 5-8`.