pyrit.common.print_chat_messages_with_color#
- print_chat_messages_with_color(messages: list[ChatMessage], max_content_character_width: int = 80, left_padding_width: int = 20, custom_colors: dict[str, Literal['black', 'grey', 'red', 'green', 'yellow', 'blue', 'magenta', 'cyan', 'light_grey', 'dark_grey', 'light_red', 'light_green', 'light_yellow', 'light_blue', 'light_magenta', 'light_cyan', 'white']] = None) None [source]#
Print chat messages with color to console.
- Parameters:
messages – List of chat messages.
max_content_character_width – Maximum character width for the content.
left_padding_width – Maximum character width for the left padding.
custom_colors – Custom colors for the roles, in the format {“ROLE”: “COLOR”}. If None, default colors will be used.
- Returns:
None