Skip to content

factflow-translator

LLM-based content translation pipeline adapter. One adapter, one config class — translates content between languages while preserving markdown formatting.

Simplest workflow package in the tree. Used as an optional intermediate stage in pipelines that need to translate scraped web content (typically Norwegian ↔ English) before further processing.

Translation happens against LLMClientProtocol via factflow-llm. Config determines source/target language, model, and whether to preserve markdown structure. Output is a new message with translated content on the same lineage chain.

from factflow_translator import (
LLMTranslatorAdapter, # type: llm_translator
LLMTranslatorConfig,
)

Two exports. The config class defines source_language, target_language, provider, model, plus prompt-template overrides.

  • Workspace: factflow-protocols, factflow-foundation, factflow-engine, factflow-llm
  • External services: an LLM provider configured in factflow-llm

Tests at backend/packages/workflows/factflow-translator/tests/. Uses mocked LLM clients; see .claude/skills/backend/llm-unit-testing/.