pyrit.models.ErrorDataTypeSerializer#
- class ErrorDataTypeSerializer(*, prompt_text: str)[source]#
Bases:
DataTypeSerializerMethods
__init__(*, prompt_text)Returns True if the data is stored on disk.
get_data_filename([file_name])Generates or retrieves a unique filename for the data file.
get_extension(file_path)Get the file extension from the file path.
get_mime_type(file_path)Get the MIME type of the file path.
get_sha256()read_data()Reads the data from the storage.
read_data_base64()Reads the data from the storage.
save_b64_image(data[, output_filename])Saves the base64 encoded image to storage.
save_data(data[, output_filename])Saves the data to storage.
save_formatted_audio(data[, num_channels, ...])Saves the PCM16 of other specially formatted audio data to storage.
Attributes