langservice
The langservice module in garak is designed to handle text language tasks using various translation services and models.
It provides an entry point to translation support backed by translators, each implementing different translation strategies and models, including both cloud-based services,
like DeepL and NVIDIA Riva, and local models like facebook/m2m100 available on Hugging Face.
Centralized language specific service to support plugins.
- get_langprovider(source: str, *, reverse: bool = False)Source
Provides a singleton runtime language provider consumed in probes and detectors.
returns a single direction langprovider for the _config.run.target_lang to encapsulate target language outside plugins