feat(telegram): add overflow split mode (#101)

This commit is contained in:
banteg
2026-01-12 18:17:12 +04:00
committed by GitHub
parent 04671593aa
commit 9d5fccab92
9 changed files with 363 additions and 8 deletions
+14
View File
@@ -40,6 +40,20 @@ example, `http://localhost:8000/v1`) and a dummy `OPENAI_API_KEY` if your server
ignores it. If your server requires a specific model name, set
`voice_transcription_model` (for example, `whisper-1`).
## Message overflow
By default, takopi trims long final responses to ~3500 characters to stay under
Telegram's 4096 character limit after entity parsing. You can opt into splitting
instead:
```toml
[transports.telegram]
message_overflow = "split" # trim | split
```
Split mode sends multiple messages. Each chunk includes the footer; follow-up
chunks add a "continued (N/M)" header.
## Forum topics (optional)
Takopi can bind Telegram forum topics to a project/branch and persist resume tokens
+7
View File
@@ -64,6 +64,13 @@ bot_token = "123456789:ABCdefGHIjklMNOpqrsTUVwxyz"
chat_id = 123456789
```
Optional: split long final responses instead of trimming them:
```toml
[transports.telegram]
message_overflow = "split" # trim | split
```
---
## 2. Your first handoff