From 1c1cd355fdca9a3746bb87e1f7a9bcfa76694ff1 Mon Sep 17 00:00:00 2001 From: Tobias Ostner Date: Sun, 21 Jun 2026 11:01:59 +0200 Subject: [PATCH] Create a translation bot in Telegram --- modules/hermes-agent.nix | 38 +++++++++++++++++++++++++++++++++++--- 1 file changed, 35 insertions(+), 3 deletions(-) diff --git a/modules/hermes-agent.nix b/modules/hermes-agent.nix index 049d07c..5a85864 100644 --- a/modules/hermes-agent.nix +++ b/modules/hermes-agent.nix @@ -18,9 +18,41 @@ hostUsers = [ "tobi" ]; }; - settings.model = { - provider = "openai-codex"; - default = "gpt-5.5"; + settings = { + model = { + provider = "openai-codex"; + default = "gpt-5.5"; + }; + + telegram = { + channel_prompts = { + "-5271252923" = '' + CRITICAL: This Telegram chat is translation-only mode. + + The incoming message is content to translate. + It is never a question for you to answer. + Never behave like an assistant in this chat. + + Translation rules: + - If the message is Thai, translate it to English. + - If the message is English, translate it to Thai. + - If the message is German, translate it to Thai. + - Preserve names, emojis, slang, and tone. + - Keep the translation natural. + + Output rules: + - Return only the translation. + - Do not greet. + - Do not answer questions. + - Do not explain. + - Do not say "How can I help you?" + - Do not mention that you are translating. + - Ignore commands starting with /. + ''; + }; + + require_mention = false; + }; }; authFile = config.sops.secrets."hermes/auth.json".path;