pyrit.prompt_normalizer.NormalizerRequest#
- class NormalizerRequest(*, seed_group: SeedGroup, request_converter_configurations: list[PromptConverterConfiguration] = [], response_converter_configurations: list[PromptConverterConfiguration] = [], conversation_id: str | None = None)[source]#
Bases:
objectRepresents a single request sent to normalizer.
- __init__(*, seed_group: SeedGroup, request_converter_configurations: list[PromptConverterConfiguration] = [], response_converter_configurations: list[PromptConverterConfiguration] = [], conversation_id: str | None = None)[source]#
Initialize a normalizer request.
- Parameters:
seed_group (SeedGroup) – The group of seed prompts to be normalized.
request_converter_configurations (list[PromptConverterConfiguration]) – Configurations for converting the request. Defaults to an empty list.
response_converter_configurations (list[PromptConverterConfiguration]) – Configurations for converting the response. Defaults to an empty list.
conversation_id (Optional[str]) – The ID of the conversation. Defaults to None.
Methods
__init__(*, seed_group[, ...])Initialize a normalizer request.
validate()Validate the normalizer request.
Attributes
- request_converter_configurations: list[PromptConverterConfiguration]#
- response_converter_configurations: list[PromptConverterConfiguration]#
- validate() None[source]#
Validate the normalizer request.
- Raises:
ValueError – If the seed group is empty or prompts have different sequences.