Skip to content

Commit 43958af

Browse files
authored
Release v3.3.0 (#156)
* Bump version to 3.3.0 * Enhance test cases and add default handling for num_attempts parameter * Update Run Tests section in CONTRIBUTING.md for clearer test instructions.
1 parent d0e0229 commit 43958af

13 files changed

+294
-143
lines changed

.bumpversion.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[bumpversion]
2-
current_version = 3.2.0
2+
current_version = 3.3.0
33
commit = False
44
tag = False
55
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\-(?P<release>[a-z]+))?

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ pre-commit install
4848

4949
### Run Tests
5050

51-
1. Navigate to `tests/test_local_llamator.py`.
51+
1. Navigate to the `tests` directory.
5252
2. Create `.env` from `.env.example` and fill in the necessary fields.
53-
3. Run the test function based on your LLM client setup.
53+
3. Run an appropriate test file for your LLM client configuration.
5454

5555
## Making Changes
5656

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Red Teaming python-framework for testing chatbots and GenAI systems
1414
## Install 🚀
1515

1616
```bash
17-
pip install llamator==3.2.0
17+
pip install llamator==3.3.0
1818
```
1919

2020
## Documentation 📚

docs/howtos.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
## Installation Guide
1414

1515
```bash
16-
pip install llamator==3.2.0
16+
pip install llamator==3.3.0
1717
```
1818

1919
## Usage Guide (using LM Studio)

examples/llamator-api.ipynb

Lines changed: 30 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,14 @@
4545
{
4646
"metadata": {
4747
"ExecuteTime": {
48-
"end_time": "2025-07-10T20:48:57.401571Z",
49-
"start_time": "2025-07-10T20:48:57.399176Z"
48+
"end_time": "2025-07-15T10:52:14.326798Z",
49+
"start_time": "2025-07-15T10:52:08.534205Z"
5050
}
5151
},
5252
"cell_type": "code",
5353
"source": "import llamator",
5454
"outputs": [],
55-
"execution_count": 2
55+
"execution_count": 1
5656
},
5757
{
5858
"cell_type": "code",
@@ -203,8 +203,8 @@
203203
{
204204
"metadata": {
205205
"ExecuteTime": {
206-
"end_time": "2025-07-10T20:49:03.961794Z",
207-
"start_time": "2025-07-10T20:49:03.955671Z"
206+
"end_time": "2025-07-15T10:52:22.481186Z",
207+
"start_time": "2025-07-15T10:52:22.474697Z"
208208
}
209209
},
210210
"cell_type": "code",
@@ -216,62 +216,63 @@
216216
"text": [
217217
"# Example configuration for preset 'all':\n",
218218
"basic_tests = [\n",
219-
" (\"aim_jailbreak\", { \"num_attempts\": 0 }),\n",
219+
" (\"aim_jailbreak\", { \"num_attempts\": 3 }),\n",
220220
" (\"autodan_turbo\", {\n",
221221
" \"custom_dataset\": None,\n",
222222
" \"language\": \"any\",\n",
223223
" \"multistage_depth\": 10,\n",
224-
" \"num_attempts\": 0,\n",
224+
" \"num_attempts\": 3,\n",
225225
" \"strategy_library_size\": 10\n",
226226
" }),\n",
227-
" (\"base64_injection\", { \"custom_dataset\": None, \"num_attempts\": 0 }),\n",
227+
" (\"base64_injection\", { \"custom_dataset\": None, \"num_attempts\": 3 }),\n",
228228
" (\"bon\", {\n",
229229
" \"custom_dataset\": None,\n",
230230
" \"language\": \"any\",\n",
231-
" \"num_attempts\": 0,\n",
231+
" \"num_attempts\": 3,\n",
232232
" \"num_transformations\": 5,\n",
233233
" \"sigma\": 0.4\n",
234234
" }),\n",
235235
" (\"crescendo\", {\n",
236236
" \"custom_dataset\": None,\n",
237237
" \"language\": \"any\",\n",
238238
" \"multistage_depth\": 5,\n",
239-
" \"num_attempts\": 0\n",
239+
" \"num_attempts\": 3\n",
240240
" }),\n",
241-
" (\"dan\", { \"language\": \"any\", \"num_attempts\": 0 }),\n",
242-
" (\"deceptive_delight\", { \"custom_dataset\": None, \"num_attempts\": 0 }),\n",
243-
" (\"dialogue_injection_devmode\", { \"custom_dataset\": None, \"num_attempts\": 0 }),\n",
244-
" (\"dialogue_injection_continuation\", { \"custom_dataset\": None, \"language\": \"any\", \"num_attempts\": 0 }),\n",
245-
" (\"ethical_compliance\", { \"custom_dataset\": None, \"num_attempts\": 0 }),\n",
246-
" (\"harmbench\", { \"custom_dataset\": None, \"language\": \"any\", \"num_attempts\": 0 }),\n",
247-
" (\"linguistic_evasion\", { \"num_attempts\": 0 }),\n",
248-
" (\"logical_inconsistencies\", { \"multistage_depth\": 20, \"num_attempts\": 0 }),\n",
241+
" (\"dan\", { \"language\": \"any\", \"num_attempts\": 3 }),\n",
242+
" (\"deceptive_delight\", { \"custom_dataset\": None, \"num_attempts\": 3 }),\n",
243+
" (\"dialogue_injection_devmode\", { \"custom_dataset\": None, \"num_attempts\": 3 }),\n",
244+
" (\"dialogue_injection_continuation\", { \"custom_dataset\": None, \"language\": \"any\", \"num_attempts\": 3 }),\n",
245+
" (\"ethical_compliance\", { \"custom_dataset\": None, \"num_attempts\": 3 }),\n",
246+
" (\"harmbench\", { \"custom_dataset\": None, \"language\": \"any\", \"num_attempts\": 3 }),\n",
247+
" (\"linguistic_evasion\", { \"num_attempts\": 3 }),\n",
248+
" (\"linguistic_sandwich\", { \"custom_dataset\": None, \"num_attempts\": 3, \"num_translations\": 5 }),\n",
249+
" (\"logical_inconsistencies\", { \"multistage_depth\": 20, \"num_attempts\": 3 }),\n",
249250
" (\"pair\", {\n",
250251
" \"custom_dataset\": None,\n",
251252
" \"language\": \"any\",\n",
252253
" \"multistage_depth\": 20,\n",
253-
" \"num_attempts\": 0\n",
254+
" \"num_attempts\": 3\n",
254255
" }),\n",
255256
" (\"shuffle\", {\n",
256257
" \"custom_dataset\": None,\n",
257258
" \"language\": \"any\",\n",
258-
" \"num_attempts\": 0,\n",
259+
" \"num_attempts\": 3,\n",
259260
" \"num_transformations\": 5\n",
260261
" }),\n",
261-
" (\"suffix\", { \"custom_dataset\": None, \"num_attempts\": 0 }),\n",
262-
" (\"sycophancy\", { \"multistage_depth\": 20, \"num_attempts\": 0 }),\n",
263-
" (\"system_prompt_leakage\", { \"custom_dataset\": None, \"multistage_depth\": 20, \"num_attempts\": 0 }),\n",
262+
" (\"suffix\", { \"custom_dataset\": None, \"num_attempts\": 3 }),\n",
263+
" (\"sycophancy\", { \"multistage_depth\": 20, \"num_attempts\": 3 }),\n",
264+
" (\"system_prompt_leakage\", { \"custom_dataset\": None, \"multistage_depth\": 20, \"num_attempts\": 3 }),\n",
264265
" (\"time_machine\", {\n",
265266
" \"custom_dataset\": None,\n",
266267
" \"language\": \"any\",\n",
267-
" \"num_attempts\": 0,\n",
268+
" \"num_attempts\": 3,\n",
268269
" \"time_context\": \"any\"\n",
269270
" }),\n",
270-
" (\"ucar\", { \"language\": \"any\", \"num_attempts\": 0 }),\n",
271+
" (\"ucar\", { \"language\": \"any\", \"num_attempts\": 3 }),\n",
271272
" (\"vlm_lowres_docs\", {\n",
272273
" \"custom_pdf_dir\": None,\n",
273274
" \"is_long_pdf\": False,\n",
274-
" \"num_attempts\": 0,\n",
275+
" \"num_attempts\": 3,\n",
275276
" \"overwrite_existing_pdfs\": False,\n",
276277
" \"rescale\": 0.25\n",
277278
" }),\n",
@@ -280,14 +281,14 @@
280281
" \"attack_source\": \"parquet\",\n",
281282
" \"dataset\": \"bigscale_100\",\n",
282283
" \"dataset_variations\": None,\n",
283-
" \"num_attempts\": 0\n",
284+
" \"num_attempts\": 3\n",
284285
" }),\n",
285-
" (\"vlm_text_hallucination\", { \"attack_types\": None, \"num_attempts\": 0 }),\n",
286+
" (\"vlm_text_hallucination\", { \"attack_types\": None, \"num_attempts\": 3 }),\n",
286287
"]\n"
287288
]
288289
}
289290
],
290-
"execution_count": 3
291+
"execution_count": 2
291292
},
292293
{
293294
"cell_type": "code",

examples/llamator-langchain-custom-attack.ipynb

Lines changed: 30 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,14 @@
4545
{
4646
"metadata": {
4747
"ExecuteTime": {
48-
"end_time": "2025-07-10T20:48:39.812221Z",
49-
"start_time": "2025-07-10T20:48:39.810058Z"
48+
"end_time": "2025-07-15T10:51:52.329146Z",
49+
"start_time": "2025-07-15T10:51:46.534968Z"
5050
}
5151
},
5252
"cell_type": "code",
5353
"source": "import llamator",
5454
"outputs": [],
55-
"execution_count": 2
55+
"execution_count": 1
5656
},
5757
{
5858
"cell_type": "code",
@@ -1206,8 +1206,8 @@
12061206
{
12071207
"metadata": {
12081208
"ExecuteTime": {
1209-
"end_time": "2025-07-10T20:48:44.130751Z",
1210-
"start_time": "2025-07-10T20:48:44.126703Z"
1209+
"end_time": "2025-07-15T10:52:02.010099Z",
1210+
"start_time": "2025-07-15T10:52:02.002716Z"
12111211
}
12121212
},
12131213
"cell_type": "code",
@@ -1219,62 +1219,63 @@
12191219
"text": [
12201220
"# Example configuration for preset 'all':\n",
12211221
"basic_tests = [\n",
1222-
" (\"aim_jailbreak\", { \"num_attempts\": 0 }),\n",
1222+
" (\"aim_jailbreak\", { \"num_attempts\": 3 }),\n",
12231223
" (\"autodan_turbo\", {\n",
12241224
" \"custom_dataset\": None,\n",
12251225
" \"language\": \"any\",\n",
12261226
" \"multistage_depth\": 10,\n",
1227-
" \"num_attempts\": 0,\n",
1227+
" \"num_attempts\": 3,\n",
12281228
" \"strategy_library_size\": 10\n",
12291229
" }),\n",
1230-
" (\"base64_injection\", { \"custom_dataset\": None, \"num_attempts\": 0 }),\n",
1230+
" (\"base64_injection\", { \"custom_dataset\": None, \"num_attempts\": 3 }),\n",
12311231
" (\"bon\", {\n",
12321232
" \"custom_dataset\": None,\n",
12331233
" \"language\": \"any\",\n",
1234-
" \"num_attempts\": 0,\n",
1234+
" \"num_attempts\": 3,\n",
12351235
" \"num_transformations\": 5,\n",
12361236
" \"sigma\": 0.4\n",
12371237
" }),\n",
12381238
" (\"crescendo\", {\n",
12391239
" \"custom_dataset\": None,\n",
12401240
" \"language\": \"any\",\n",
12411241
" \"multistage_depth\": 5,\n",
1242-
" \"num_attempts\": 0\n",
1242+
" \"num_attempts\": 3\n",
12431243
" }),\n",
1244-
" (\"dan\", { \"language\": \"any\", \"num_attempts\": 0 }),\n",
1245-
" (\"deceptive_delight\", { \"custom_dataset\": None, \"num_attempts\": 0 }),\n",
1246-
" (\"dialogue_injection_devmode\", { \"custom_dataset\": None, \"num_attempts\": 0 }),\n",
1247-
" (\"dialogue_injection_continuation\", { \"custom_dataset\": None, \"language\": \"any\", \"num_attempts\": 0 }),\n",
1248-
" (\"ethical_compliance\", { \"custom_dataset\": None, \"num_attempts\": 0 }),\n",
1249-
" (\"harmbench\", { \"custom_dataset\": None, \"language\": \"any\", \"num_attempts\": 0 }),\n",
1250-
" (\"linguistic_evasion\", { \"num_attempts\": 0 }),\n",
1251-
" (\"logical_inconsistencies\", { \"multistage_depth\": 20, \"num_attempts\": 0 }),\n",
1244+
" (\"dan\", { \"language\": \"any\", \"num_attempts\": 3 }),\n",
1245+
" (\"deceptive_delight\", { \"custom_dataset\": None, \"num_attempts\": 3 }),\n",
1246+
" (\"dialogue_injection_devmode\", { \"custom_dataset\": None, \"num_attempts\": 3 }),\n",
1247+
" (\"dialogue_injection_continuation\", { \"custom_dataset\": None, \"language\": \"any\", \"num_attempts\": 3 }),\n",
1248+
" (\"ethical_compliance\", { \"custom_dataset\": None, \"num_attempts\": 3 }),\n",
1249+
" (\"harmbench\", { \"custom_dataset\": None, \"language\": \"any\", \"num_attempts\": 3 }),\n",
1250+
" (\"linguistic_evasion\", { \"num_attempts\": 3 }),\n",
1251+
" (\"linguistic_sandwich\", { \"custom_dataset\": None, \"num_attempts\": 3, \"num_translations\": 5 }),\n",
1252+
" (\"logical_inconsistencies\", { \"multistage_depth\": 20, \"num_attempts\": 3 }),\n",
12521253
" (\"pair\", {\n",
12531254
" \"custom_dataset\": None,\n",
12541255
" \"language\": \"any\",\n",
12551256
" \"multistage_depth\": 20,\n",
1256-
" \"num_attempts\": 0\n",
1257+
" \"num_attempts\": 3\n",
12571258
" }),\n",
12581259
" (\"shuffle\", {\n",
12591260
" \"custom_dataset\": None,\n",
12601261
" \"language\": \"any\",\n",
1261-
" \"num_attempts\": 0,\n",
1262+
" \"num_attempts\": 3,\n",
12621263
" \"num_transformations\": 5\n",
12631264
" }),\n",
1264-
" (\"suffix\", { \"custom_dataset\": None, \"num_attempts\": 0 }),\n",
1265-
" (\"sycophancy\", { \"multistage_depth\": 20, \"num_attempts\": 0 }),\n",
1266-
" (\"system_prompt_leakage\", { \"custom_dataset\": None, \"multistage_depth\": 20, \"num_attempts\": 0 }),\n",
1265+
" (\"suffix\", { \"custom_dataset\": None, \"num_attempts\": 3 }),\n",
1266+
" (\"sycophancy\", { \"multistage_depth\": 20, \"num_attempts\": 3 }),\n",
1267+
" (\"system_prompt_leakage\", { \"custom_dataset\": None, \"multistage_depth\": 20, \"num_attempts\": 3 }),\n",
12671268
" (\"time_machine\", {\n",
12681269
" \"custom_dataset\": None,\n",
12691270
" \"language\": \"any\",\n",
1270-
" \"num_attempts\": 0,\n",
1271+
" \"num_attempts\": 3,\n",
12711272
" \"time_context\": \"any\"\n",
12721273
" }),\n",
1273-
" (\"ucar\", { \"language\": \"any\", \"num_attempts\": 0 }),\n",
1274+
" (\"ucar\", { \"language\": \"any\", \"num_attempts\": 3 }),\n",
12741275
" (\"vlm_lowres_docs\", {\n",
12751276
" \"custom_pdf_dir\": None,\n",
12761277
" \"is_long_pdf\": False,\n",
1277-
" \"num_attempts\": 0,\n",
1278+
" \"num_attempts\": 3,\n",
12781279
" \"overwrite_existing_pdfs\": False,\n",
12791280
" \"rescale\": 0.25\n",
12801281
" }),\n",
@@ -1283,14 +1284,14 @@
12831284
" \"attack_source\": \"parquet\",\n",
12841285
" \"dataset\": \"bigscale_100\",\n",
12851286
" \"dataset_variations\": None,\n",
1286-
" \"num_attempts\": 0\n",
1287+
" \"num_attempts\": 3\n",
12871288
" }),\n",
1288-
" (\"vlm_text_hallucination\", { \"attack_types\": None, \"num_attempts\": 0 }),\n",
1289+
" (\"vlm_text_hallucination\", { \"attack_types\": None, \"num_attempts\": 3 }),\n",
12891290
"]\n"
12901291
]
12911292
}
12921293
],
1293-
"execution_count": 3
1294+
"execution_count": 2
12941295
},
12951296
{
12961297
"cell_type": "code",

0 commit comments

Comments
 (0)