garak.buffs.low_resource_languages

Buff that converts prompts with different encodings.

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

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/abs/2310.02446'
transform(attempt: Attempt) Iterable[Attempt]

attempt copying is handled elsewhere. isn’t that nice

untransform(attempt: Attempt) Attempt

Only necessary if buff requires a post buff hook