Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion doc/code/scenarios/0_scenarios.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@
"logging.getLogger(\"pyrit\").setLevel(logging.ERROR)\n",
"\n",
"response = await get_scenario_service().list_scenarios_async(limit=200) # type: ignore\n",
"print_scenario_list(items=[s.model_dump() for s in response.items])"
"print_scenario_list(items=response.items)"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion doc/code/scenarios/0_scenarios.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ async def _build_atomic_attacks_async(self, *, context):
logging.getLogger("pyrit").setLevel(logging.ERROR)

response = await get_scenario_service().list_scenarios_async(limit=200) # type: ignore
print_scenario_list(items=[s.model_dump() for s in response.items])
print_scenario_list(items=response.items)

# %% [markdown]
#
Expand Down
2 changes: 1 addition & 1 deletion doc/code/scenarios/2_custom_scenario_parameters.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@
"# Supported Parameters section is visible in one and absent in the other.\n",
"demo_names = {\"airt.scam\", \"foundry.red_team_agent\"}\n",
"response = await get_scenario_service().list_scenarios_async(limit=200) # type: ignore\n",
"print_scenario_list(items=[s.model_dump() for s in response.items if s.scenario_name in demo_names])"
"print_scenario_list(items=[s for s in response.items if s.scenario_name in demo_names])"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion doc/code/scenarios/2_custom_scenario_parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@
# Supported Parameters section is visible in one and absent in the other.
demo_names = {"airt.scam", "foundry.red_team_agent"}
response = await get_scenario_service().list_scenarios_async(limit=200) # type: ignore
print_scenario_list(items=[s.model_dump() for s in response.items if s.scenario_name in demo_names])
print_scenario_list(items=[s for s in response.items if s.scenario_name in demo_names])

# %% [markdown]
# Notice the `Supported Parameters:` section under `airt.scam`. It's absent
Expand Down
2 changes: 1 addition & 1 deletion doc/code/targets/6_custom_targets.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@
")\n",
"adversarial_config = AttackAdversarialConfig(\n",
" target=aoai_chat,\n",
" seed_prompt=initial_red_teaming_prompt,\n",
" first_message=initial_red_teaming_prompt,\n",
")\n",
"\n",
"gandalf_target = GandalfTarget(level=gandalf_level)\n",
Expand Down
2 changes: 1 addition & 1 deletion doc/code/targets/6_custom_targets.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
)
adversarial_config = AttackAdversarialConfig(
target=aoai_chat,
seed_prompt=initial_red_teaming_prompt,
first_message=initial_red_teaming_prompt,
)

gandalf_target = GandalfTarget(level=gandalf_level)
Expand Down
Loading