pyrit.executor.attack.AttackResultPrinter#
- class AttackResultPrinter[source]#
Bases:
ABCAbstract base class for printing attack results.
This interface defines the contract for printing attack results in various formats. Implementations can render results to console, logs, files, or other outputs.
- __init__()#
Methods
__init__()print_conversation_async(result, *[, ...])Print only the conversation history.
print_result_async(result, *[, ...])Print the complete attack result.
print_summary_async(result)Print a summary of the attack result without the full conversation.
- abstract async print_conversation_async(result: AttackResult, *, include_scores: bool = False) None[source]#
Print only the conversation history.
- Parameters:
result (AttackResult) – The attack result containing the conversation to print
include_scores (bool) – Whether to include scores in the output. Defaults to False.
- abstract async print_result_async(result: AttackResult, *, include_auxiliary_scores: bool = False) None[source]#
Print the complete attack result.
- Parameters:
result (AttackResult) – The attack result to print
include_auxiliary_scores (bool) – Whether to include auxiliary scores in the output. Defaults to False.
- abstract async print_summary_async(result: AttackResult) None[source]#
Print a summary of the attack result without the full conversation.
- Parameters:
result (AttackResult) – The attack result to summarize