Skip to content

Commit d7c893f

Browse files
authored
[FIX Breaking]: PrependedConversationConfig and Attack Param Consistency (microsoft#1299)
1 parent 4125fb5 commit d7c893f

28 files changed

Lines changed: 3332 additions & 1790 deletions

doc/api.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,7 @@ API Reference
184184
MultiTurnAttackContext
185185
MultiTurnAttackStrategy
186186
ObjectiveEvaluator
187+
PrependedConversationConfig
187188
PromptSendingAttack
188189
RTASystemPromptPaths
189190
RedTeamingAttack

pyrit/executor/attack/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
AttackAdversarialConfig,
1313
AttackExecutor,
1414
AttackExecutorResult,
15+
PrependedConversationConfig,
1516
)
1617

1718
from pyrit.executor.attack.single_turn import (
@@ -93,6 +94,7 @@
9394
"AttackExecutor",
9495
"ObjectiveEvaluator",
9596
"AttackExecutorResult",
97+
"PrependedConversationConfig",
9698
"generate_simulated_conversation_async",
9799
"SimulatedConversationResult",
98100
"SimulatedTargetSystemPromptPaths",

pyrit/executor/attack/component/__init__.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66
from pyrit.executor.attack.component.conversation_manager import (
77
ConversationManager,
88
ConversationState,
9-
format_conversation_context,
9+
build_conversation_context_string_async,
10+
get_adversarial_chat_messages,
11+
get_prepended_turn_count,
1012
mark_messages_as_simulated,
1113
)
1214
from pyrit.executor.attack.component.objective_evaluator import ObjectiveEvaluator
@@ -17,9 +19,11 @@
1719
)
1820

1921
__all__ = [
22+
"build_conversation_context_string_async",
2023
"ConversationManager",
2124
"ConversationState",
22-
"format_conversation_context",
25+
"get_adversarial_chat_messages",
26+
"get_prepended_turn_count",
2327
"mark_messages_as_simulated",
2428
"ObjectiveEvaluator",
2529
"generate_simulated_conversation_async",

0 commit comments

Comments
 (0)