Chat Translation Service

app.services.chat_translation contains the standalone and server-backed chat translation orchestration helpers used by app.routes_chat.

Chat translation and chat-save orchestration helpers.

This module contains the business logic previously embedded inside app.main for POST /api/translate_chat and POST /api/save_chat. The route layer delegates here for translation-mode selection, standalone and mud-server translation flows, and chat save-package creation.

app.services.chat_translation.translate_chat(req, prompt_root)[source]

Translate one or two OOC chat messages using either the mud server’s canonical pipeline or the local standalone Ollama pipeline.

app.services.chat_translation.save_chat(req, data_dir, prompt_root)[source]

Save an in-game chat log session to a timestamped folder under data_dir.