pyrit.models.SeedGroup#
- class SeedGroup(*, prompts: Sequence[Seed] | Sequence[Dict[str, Any]])[source]#
Bases:
YamlLoadableA group of prompts that need to be sent together, along with an objective. This can include multiturn and multimodal prompts. This class is useful when a target requires multiple message pieces to be grouped and sent together. All prompts in the group should share the same prompt_group_id.
Methods
__init__(*, prompts)from_yaml_file(file)Creates a new object from a YAML file.
render_template_value(**kwargs)Renders self.value as a template, applying provided parameters in kwargs
Attributes
- prompts: Sequence[SeedPrompt]#
- render_template_value(**kwargs)[source]#
Renders self.value as a template, applying provided parameters in kwargs
- Parameters:
kwargs – Key-value pairs to replace in the SeedGroup value.
- Returns:
None
- Raises:
ValueError – If parameters are missing or invalid in the template.