garak.buffs.low_resource_languages

Buff that converts prompts with different encodings.

class LRLBuff(config_root=<module 'garak._config' from '/home/docs/checkouts/readthedocs.org/user_builds/garak/checkouts/latest/docs/source/../../garak/_config.py'>)Source

Bases: Buff

Low Resource Language buff

Uses the DeepL API to translate prompts into low-resource languages

ENV_VAR = 'DEEPL_API_KEY'
doc_uri = 'https://arxiv.org/html/2310.02446v1'
transform(attempt: Attempt) Iterable[Attempt]Source

attempt copying is handled elsewhere. isn’t that nice

untransform(attempt: Attempt) AttemptSource

Only necessary if buff requires a post buff hook