garak.generators.bedrock
AWS Bedrock generator
Supports foundation models available through AWS Bedrock using standard AWS authentication.
To get started with this generator:
Visit https://docs.aws.amazon.com/bedrock/latest/userguide/models-supported.html to see available models
Set up AWS credentials: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html or a Bedrock API Key
Run garak with –target_type bedrock and –target_name <model-id>
- class BedrockGenerator(name='', config_root=<module 'garak._config' from '/home/docs/checkouts/readthedocs.org/user_builds/garak/checkouts/stable/garak/_config.py'>)Source
Bases:
GeneratorInterface for AWS Bedrock foundation models using Converse API
Configurable parameters:
DEFAULT_PARAMScontents:max_tokens=150temperature=0.7top_k=Nonecontext_len=Noneskip_seq_start=Noneskip_seq_end=Nonetop_p=1.0stop=[]region='us-east-1'
Default values are listed
See also Configuring garak for how to set these values.
Other attributes:
- active = True
- extra_dependency_names = ['boto3', 'botocore']
- generator_family_name = 'Bedrock'
- supports_multiple_generations = False