pyrit.models.data_serializer_factory#
- data_serializer_factory(*, data_type: Literal['text', 'image_path', 'audio_path', 'video_path', 'url', 'error'], value: str | None = None, extension: str | None = None, category: Literal['seed-prompt-entries', 'prompt-memory-entries'])[source]#
Factory method to create a DataTypeSerializer instance.
- Parameters:
- Returns:
An instance of the appropriate serializer.
- Return type:
- Raises:
ValueError – If the category is not provided or invalid.