feat: sync message translation support

This commit is contained in:
A 2026-07-12 14:20:26 +08:00
parent cbccd6a8d9
commit ea6cc72886
26 changed files with 1189 additions and 0 deletions

View file

@ -131,6 +131,17 @@ TELESRV_AI_RATE_LIMIT=20
TELESRV_AI_RATE_WINDOW=1m
TELESRV_AI_LOG_CONTENT=false
# Chat/message translation reuses the remote providers declared above. The
# deterministic "local" AI provider is excluded because it cannot translate.
# Leave TRANSLATION_PROVIDERS empty to use all configured remote AI providers,
# or provide a comma-separated subset such as "openai,gemini".
TELESRV_TRANSLATION_ENABLED=true
TELESRV_TRANSLATION_PROVIDERS=
TELESRV_TRANSLATION_TIMEOUT=15s
# Counts translated text items, not RPC envelopes (one RPC may contain 20).
TELESRV_TRANSLATION_RATE_LIMIT=60
TELESRV_TRANSLATION_RATE_WINDOW=1m
# External providers are optional. Keep API keys in TELESRV_* variables here;
# the loader rejects non-TELESRV keys from .env files by design.
# TELESRV_AI_OPENAI_KIND=openai_responses