pyrit.prompt_converter.get_converter_modalities

pyrit.prompt_converter.get_converter_modalities#

get_converter_modalities() list[tuple[str, list[Literal['text', 'image_path', 'audio_path', 'video_path', 'url', 'reasoning', 'error', 'function_call', 'tool_call', 'function_call_output']], list[Literal['text', 'image_path', 'audio_path', 'video_path', 'url', 'reasoning', 'error', 'function_call', 'tool_call', 'function_call_output']]]][source]#

Retrieves a list of all converter classes and their supported input/output modalities by reading the SUPPORTED_INPUT_TYPES and SUPPORTED_OUTPUT_TYPES class attributes.

Returns:

A sorted list of tuples containing:
  • Converter class name (str)

  • List of supported input modalities (list[PromptDataType])

  • List of supported output modalities (list[PromptDataType])

Sorted by input modality, then output modality, then converter name.

Return type:

list[tuple[str, list[PromptDataType], list[PromptDataType]]]