pyrit.message_normalizer.MessageStringNormalizer#

class MessageStringNormalizer[source]#

Bases: ABC

Abstract base class for normalizers that return a string representation.

Use this for formatting messages into text for non-chat targets or context strings.

__init__()#

Methods

__init__()

normalize_string_async(messages)

Normalize the list of messages into a string representation.

abstract async normalize_string_async(messages: List[Message]) str[source]#

Normalize the list of messages into a string representation.

Parameters:

messages – The list of Message objects to normalize.

Returns:

A string representation of the messages.