pyrit.executor.promptgen.FuzzerContext#
- class FuzzerContext(prompts: ~typing.List[str], prompt_templates: ~typing.List[str], max_query_limit: int | None = None, total_target_query_count: int = 0, total_jailbreak_count: int = 0, jailbreak_conversation_ids: ~typing.List[str | ~uuid.UUID] = <factory>, executed_turns: int = 0, initial_prompt_nodes: ~typing.List[~pyrit.executor.promptgen.fuzzer._PromptNode] = <factory>, new_prompt_nodes: ~typing.List[~pyrit.executor.promptgen.fuzzer._PromptNode] = <factory>, mcts_selected_path: ~typing.List[~pyrit.executor.promptgen.fuzzer._PromptNode] = <factory>, last_choice_node: ~pyrit.executor.promptgen.fuzzer._PromptNode | None = None, memory_labels: ~typing.Dict[str, str] = <factory>)[source]#
Bases:
PromptGeneratorStrategyContext
Context for the Fuzzer prompt generation strategy.
This context contains all execution-specific state for a Fuzzer prompt generation instance, ensuring thread safety by isolating state per execution.
- __init__(prompts: ~typing.List[str], prompt_templates: ~typing.List[str], max_query_limit: int | None = None, total_target_query_count: int = 0, total_jailbreak_count: int = 0, jailbreak_conversation_ids: ~typing.List[str | ~uuid.UUID] = <factory>, executed_turns: int = 0, initial_prompt_nodes: ~typing.List[~pyrit.executor.promptgen.fuzzer._PromptNode] = <factory>, new_prompt_nodes: ~typing.List[~pyrit.executor.promptgen.fuzzer._PromptNode] = <factory>, mcts_selected_path: ~typing.List[~pyrit.executor.promptgen.fuzzer._PromptNode] = <factory>, last_choice_node: ~pyrit.executor.promptgen.fuzzer._PromptNode | None = None, memory_labels: ~typing.Dict[str, str] = <factory>) None #
Methods
__init__
(prompts, prompt_templates[, ...])duplicate
()Create a deep copy of the context.
Attributes