pyrit.prompt_normalizer.PromptResponseConverterConfiguration#

class PromptResponseConverterConfiguration(converters: list[PromptConverter], indexes_to_apply: list[int] = None, prompt_data_types_to_apply: list[Literal['text', 'image_path', 'audio_path', 'url', 'error']] = None)[source]#

Bases: object

Represents the configuration for a prompt response converter.

The list of converters are applied to a response, which can have multiple response pieces. indexes_to_apply are which pieces to apply to. By default, all indexes are applied. prompt_data_types_to_apply are the types of the responses to apply the converters.

__init__(converters: list[PromptConverter], indexes_to_apply: list[int] = None, prompt_data_types_to_apply: list[Literal['text', 'image_path', 'audio_path', 'url', 'error']] = None) None#

Methods

__init__(converters[, indexes_to_apply, ...])

Attributes

converters: list[PromptConverter]#
indexes_to_apply: list[int] = None#
prompt_data_types_to_apply: list[Literal['text', 'image_path', 'audio_path', 'url', 'error']] = None#