pyrit.executor.promptgen.FuzzerResult#

class FuzzerResult(successful_templates: ~typing.List[str] = <factory>, jailbreak_conversation_ids: ~typing.List[str | ~uuid.UUID] = <factory>, total_queries: int = 0, templates_explored: int = 0)[source]#

Bases: PromptGeneratorStrategyResult

Result of the Fuzzer prompt generation strategy execution.

This result includes the standard prompt generator result information with fuzzer-specific concrete fields for tracking MCTS exploration and successful templates.

__init__(successful_templates: ~typing.List[str] = <factory>, jailbreak_conversation_ids: ~typing.List[str | ~uuid.UUID] = <factory>, total_queries: int = 0, templates_explored: int = 0) None#

Methods

__init__([successful_templates, ...])

duplicate()

Create a deep copy of the result.

print_formatted(*[, enable_colors, width])

Print the result using FuzzerResultPrinter with custom formatting options.

print_templates()

Print only the successful templates (equivalent to original attack method).

Attributes

jailbreak_conversation_ids: List[str | UUID]#
print_formatted(*, enable_colors: bool = True, width: int = 100) None[source]#

Print the result using FuzzerResultPrinter with custom formatting options.

Parameters:
  • enable_colors (bool) – Whether to enable ANSI color output. Defaults to True.

  • width (int) – Maximum width for text wrapping. Defaults to 100.

print_templates() None[source]#

Print only the successful templates (equivalent to original attack method).

successful_templates: List[str]#
templates_explored: int = 0#
total_queries: int = 0#