garak.generators.anthropic
Support Anthropic hosted Claude models
- class AnthropicGenerator(name='', config_root=<module 'garak._config' from '/home/docs/checkouts/readthedocs.org/user_builds/garak/checkouts/latest/garak/_config.py'>)Source
Bases:
GeneratorInterface for Claude models served via the Anthropic API (api.anthropic.com).
Expects an API key in the
ANTHROPIC_API_KEYenvironment variable. Keys are issued at https://console.anthropic.com/.Configurable parameters:
DEFAULT_PARAMScontents:max_tokens=150temperature=Nonetop_k=Nonecontext_len=Noneskip_seq_start=Noneskip_seq_end=Noneuri=Nonesuppressed_params=set()
Default values are listed
See also Configuring garak for how to set these values.
Other attributes:
- ENV_VAR = 'ANTHROPIC_API_KEY'
- extra_dependency_names = ['anthropic']
- fullname = 'Anthropic'
- generator_family_name = 'anthropic'
- supports_multiple_generations = False