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 .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 3.2.0
current_version = 3.3.0
commit = False
tag = False
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\-(?P<release>[a-z]+))?
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ pre-commit install

### Run Tests

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

## Making Changes

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Red Teaming python-framework for testing chatbots and GenAI systems
## Install 🚀

```bash
pip install llamator==3.2.0
pip install llamator==3.3.0
```

## Documentation 📚
Expand Down
2 changes: 1 addition & 1 deletion docs/howtos.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
## Installation Guide

```bash
pip install llamator==3.2.0
pip install llamator==3.3.0
```

## Usage Guide (using LM Studio)
Expand Down
59 changes: 30 additions & 29 deletions examples/llamator-api.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,14 @@
{
"metadata": {
"ExecuteTime": {
"end_time": "2025-07-10T20:48:57.401571Z",
"start_time": "2025-07-10T20:48:57.399176Z"
"end_time": "2025-07-15T10:52:14.326798Z",
"start_time": "2025-07-15T10:52:08.534205Z"
}
},
"cell_type": "code",
"source": "import llamator",
"outputs": [],
"execution_count": 2
"execution_count": 1
},
{
"cell_type": "code",
Expand Down Expand Up @@ -203,8 +203,8 @@
{
"metadata": {
"ExecuteTime": {
"end_time": "2025-07-10T20:49:03.961794Z",
"start_time": "2025-07-10T20:49:03.955671Z"
"end_time": "2025-07-15T10:52:22.481186Z",
"start_time": "2025-07-15T10:52:22.474697Z"
}
},
"cell_type": "code",
Expand All @@ -216,62 +216,63 @@
"text": [
"# Example configuration for preset 'all':\n",
"basic_tests = [\n",
" (\"aim_jailbreak\", { \"num_attempts\": 0 }),\n",
" (\"aim_jailbreak\", { \"num_attempts\": 3 }),\n",
" (\"autodan_turbo\", {\n",
" \"custom_dataset\": None,\n",
" \"language\": \"any\",\n",
" \"multistage_depth\": 10,\n",
" \"num_attempts\": 0,\n",
" \"num_attempts\": 3,\n",
" \"strategy_library_size\": 10\n",
" }),\n",
" (\"base64_injection\", { \"custom_dataset\": None, \"num_attempts\": 0 }),\n",
" (\"base64_injection\", { \"custom_dataset\": None, \"num_attempts\": 3 }),\n",
" (\"bon\", {\n",
" \"custom_dataset\": None,\n",
" \"language\": \"any\",\n",
" \"num_attempts\": 0,\n",
" \"num_attempts\": 3,\n",
" \"num_transformations\": 5,\n",
" \"sigma\": 0.4\n",
" }),\n",
" (\"crescendo\", {\n",
" \"custom_dataset\": None,\n",
" \"language\": \"any\",\n",
" \"multistage_depth\": 5,\n",
" \"num_attempts\": 0\n",
" \"num_attempts\": 3\n",
" }),\n",
" (\"dan\", { \"language\": \"any\", \"num_attempts\": 0 }),\n",
" (\"deceptive_delight\", { \"custom_dataset\": None, \"num_attempts\": 0 }),\n",
" (\"dialogue_injection_devmode\", { \"custom_dataset\": None, \"num_attempts\": 0 }),\n",
" (\"dialogue_injection_continuation\", { \"custom_dataset\": None, \"language\": \"any\", \"num_attempts\": 0 }),\n",
" (\"ethical_compliance\", { \"custom_dataset\": None, \"num_attempts\": 0 }),\n",
" (\"harmbench\", { \"custom_dataset\": None, \"language\": \"any\", \"num_attempts\": 0 }),\n",
" (\"linguistic_evasion\", { \"num_attempts\": 0 }),\n",
" (\"logical_inconsistencies\", { \"multistage_depth\": 20, \"num_attempts\": 0 }),\n",
" (\"dan\", { \"language\": \"any\", \"num_attempts\": 3 }),\n",
" (\"deceptive_delight\", { \"custom_dataset\": None, \"num_attempts\": 3 }),\n",
" (\"dialogue_injection_devmode\", { \"custom_dataset\": None, \"num_attempts\": 3 }),\n",
" (\"dialogue_injection_continuation\", { \"custom_dataset\": None, \"language\": \"any\", \"num_attempts\": 3 }),\n",
" (\"ethical_compliance\", { \"custom_dataset\": None, \"num_attempts\": 3 }),\n",
" (\"harmbench\", { \"custom_dataset\": None, \"language\": \"any\", \"num_attempts\": 3 }),\n",
" (\"linguistic_evasion\", { \"num_attempts\": 3 }),\n",
" (\"linguistic_sandwich\", { \"custom_dataset\": None, \"num_attempts\": 3, \"num_translations\": 5 }),\n",
" (\"logical_inconsistencies\", { \"multistage_depth\": 20, \"num_attempts\": 3 }),\n",
" (\"pair\", {\n",
" \"custom_dataset\": None,\n",
" \"language\": \"any\",\n",
" \"multistage_depth\": 20,\n",
" \"num_attempts\": 0\n",
" \"num_attempts\": 3\n",
" }),\n",
" (\"shuffle\", {\n",
" \"custom_dataset\": None,\n",
" \"language\": \"any\",\n",
" \"num_attempts\": 0,\n",
" \"num_attempts\": 3,\n",
" \"num_transformations\": 5\n",
" }),\n",
" (\"suffix\", { \"custom_dataset\": None, \"num_attempts\": 0 }),\n",
" (\"sycophancy\", { \"multistage_depth\": 20, \"num_attempts\": 0 }),\n",
" (\"system_prompt_leakage\", { \"custom_dataset\": None, \"multistage_depth\": 20, \"num_attempts\": 0 }),\n",
" (\"suffix\", { \"custom_dataset\": None, \"num_attempts\": 3 }),\n",
" (\"sycophancy\", { \"multistage_depth\": 20, \"num_attempts\": 3 }),\n",
" (\"system_prompt_leakage\", { \"custom_dataset\": None, \"multistage_depth\": 20, \"num_attempts\": 3 }),\n",
" (\"time_machine\", {\n",
" \"custom_dataset\": None,\n",
" \"language\": \"any\",\n",
" \"num_attempts\": 0,\n",
" \"num_attempts\": 3,\n",
" \"time_context\": \"any\"\n",
" }),\n",
" (\"ucar\", { \"language\": \"any\", \"num_attempts\": 0 }),\n",
" (\"ucar\", { \"language\": \"any\", \"num_attempts\": 3 }),\n",
" (\"vlm_lowres_docs\", {\n",
" \"custom_pdf_dir\": None,\n",
" \"is_long_pdf\": False,\n",
" \"num_attempts\": 0,\n",
" \"num_attempts\": 3,\n",
" \"overwrite_existing_pdfs\": False,\n",
" \"rescale\": 0.25\n",
" }),\n",
Expand All @@ -280,14 +281,14 @@
" \"attack_source\": \"parquet\",\n",
" \"dataset\": \"bigscale_100\",\n",
" \"dataset_variations\": None,\n",
" \"num_attempts\": 0\n",
" \"num_attempts\": 3\n",
" }),\n",
" (\"vlm_text_hallucination\", { \"attack_types\": None, \"num_attempts\": 0 }),\n",
" (\"vlm_text_hallucination\", { \"attack_types\": None, \"num_attempts\": 3 }),\n",
"]\n"
]
}
],
"execution_count": 3
"execution_count": 2
},
{
"cell_type": "code",
Expand Down
59 changes: 30 additions & 29 deletions examples/llamator-langchain-custom-attack.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,14 @@
{
"metadata": {
"ExecuteTime": {
"end_time": "2025-07-10T20:48:39.812221Z",
"start_time": "2025-07-10T20:48:39.810058Z"
"end_time": "2025-07-15T10:51:52.329146Z",
"start_time": "2025-07-15T10:51:46.534968Z"
}
},
"cell_type": "code",
"source": "import llamator",
"outputs": [],
"execution_count": 2
"execution_count": 1
},
{
"cell_type": "code",
Expand Down Expand Up @@ -1206,8 +1206,8 @@
{
"metadata": {
"ExecuteTime": {
"end_time": "2025-07-10T20:48:44.130751Z",
"start_time": "2025-07-10T20:48:44.126703Z"
"end_time": "2025-07-15T10:52:02.010099Z",
"start_time": "2025-07-15T10:52:02.002716Z"
}
},
"cell_type": "code",
Expand All @@ -1219,62 +1219,63 @@
"text": [
"# Example configuration for preset 'all':\n",
"basic_tests = [\n",
" (\"aim_jailbreak\", { \"num_attempts\": 0 }),\n",
" (\"aim_jailbreak\", { \"num_attempts\": 3 }),\n",
" (\"autodan_turbo\", {\n",
" \"custom_dataset\": None,\n",
" \"language\": \"any\",\n",
" \"multistage_depth\": 10,\n",
" \"num_attempts\": 0,\n",
" \"num_attempts\": 3,\n",
" \"strategy_library_size\": 10\n",
" }),\n",
" (\"base64_injection\", { \"custom_dataset\": None, \"num_attempts\": 0 }),\n",
" (\"base64_injection\", { \"custom_dataset\": None, \"num_attempts\": 3 }),\n",
" (\"bon\", {\n",
" \"custom_dataset\": None,\n",
" \"language\": \"any\",\n",
" \"num_attempts\": 0,\n",
" \"num_attempts\": 3,\n",
" \"num_transformations\": 5,\n",
" \"sigma\": 0.4\n",
" }),\n",
" (\"crescendo\", {\n",
" \"custom_dataset\": None,\n",
" \"language\": \"any\",\n",
" \"multistage_depth\": 5,\n",
" \"num_attempts\": 0\n",
" \"num_attempts\": 3\n",
" }),\n",
" (\"dan\", { \"language\": \"any\", \"num_attempts\": 0 }),\n",
" (\"deceptive_delight\", { \"custom_dataset\": None, \"num_attempts\": 0 }),\n",
" (\"dialogue_injection_devmode\", { \"custom_dataset\": None, \"num_attempts\": 0 }),\n",
" (\"dialogue_injection_continuation\", { \"custom_dataset\": None, \"language\": \"any\", \"num_attempts\": 0 }),\n",
" (\"ethical_compliance\", { \"custom_dataset\": None, \"num_attempts\": 0 }),\n",
" (\"harmbench\", { \"custom_dataset\": None, \"language\": \"any\", \"num_attempts\": 0 }),\n",
" (\"linguistic_evasion\", { \"num_attempts\": 0 }),\n",
" (\"logical_inconsistencies\", { \"multistage_depth\": 20, \"num_attempts\": 0 }),\n",
" (\"dan\", { \"language\": \"any\", \"num_attempts\": 3 }),\n",
" (\"deceptive_delight\", { \"custom_dataset\": None, \"num_attempts\": 3 }),\n",
" (\"dialogue_injection_devmode\", { \"custom_dataset\": None, \"num_attempts\": 3 }),\n",
" (\"dialogue_injection_continuation\", { \"custom_dataset\": None, \"language\": \"any\", \"num_attempts\": 3 }),\n",
" (\"ethical_compliance\", { \"custom_dataset\": None, \"num_attempts\": 3 }),\n",
" (\"harmbench\", { \"custom_dataset\": None, \"language\": \"any\", \"num_attempts\": 3 }),\n",
" (\"linguistic_evasion\", { \"num_attempts\": 3 }),\n",
" (\"linguistic_sandwich\", { \"custom_dataset\": None, \"num_attempts\": 3, \"num_translations\": 5 }),\n",
" (\"logical_inconsistencies\", { \"multistage_depth\": 20, \"num_attempts\": 3 }),\n",
" (\"pair\", {\n",
" \"custom_dataset\": None,\n",
" \"language\": \"any\",\n",
" \"multistage_depth\": 20,\n",
" \"num_attempts\": 0\n",
" \"num_attempts\": 3\n",
" }),\n",
" (\"shuffle\", {\n",
" \"custom_dataset\": None,\n",
" \"language\": \"any\",\n",
" \"num_attempts\": 0,\n",
" \"num_attempts\": 3,\n",
" \"num_transformations\": 5\n",
" }),\n",
" (\"suffix\", { \"custom_dataset\": None, \"num_attempts\": 0 }),\n",
" (\"sycophancy\", { \"multistage_depth\": 20, \"num_attempts\": 0 }),\n",
" (\"system_prompt_leakage\", { \"custom_dataset\": None, \"multistage_depth\": 20, \"num_attempts\": 0 }),\n",
" (\"suffix\", { \"custom_dataset\": None, \"num_attempts\": 3 }),\n",
" (\"sycophancy\", { \"multistage_depth\": 20, \"num_attempts\": 3 }),\n",
" (\"system_prompt_leakage\", { \"custom_dataset\": None, \"multistage_depth\": 20, \"num_attempts\": 3 }),\n",
" (\"time_machine\", {\n",
" \"custom_dataset\": None,\n",
" \"language\": \"any\",\n",
" \"num_attempts\": 0,\n",
" \"num_attempts\": 3,\n",
" \"time_context\": \"any\"\n",
" }),\n",
" (\"ucar\", { \"language\": \"any\", \"num_attempts\": 0 }),\n",
" (\"ucar\", { \"language\": \"any\", \"num_attempts\": 3 }),\n",
" (\"vlm_lowres_docs\", {\n",
" \"custom_pdf_dir\": None,\n",
" \"is_long_pdf\": False,\n",
" \"num_attempts\": 0,\n",
" \"num_attempts\": 3,\n",
" \"overwrite_existing_pdfs\": False,\n",
" \"rescale\": 0.25\n",
" }),\n",
Expand All @@ -1283,14 +1284,14 @@
" \"attack_source\": \"parquet\",\n",
" \"dataset\": \"bigscale_100\",\n",
" \"dataset_variations\": None,\n",
" \"num_attempts\": 0\n",
" \"num_attempts\": 3\n",
" }),\n",
" (\"vlm_text_hallucination\", { \"attack_types\": None, \"num_attempts\": 0 }),\n",
" (\"vlm_text_hallucination\", { \"attack_types\": None, \"num_attempts\": 3 }),\n",
"]\n"
]
}
],
"execution_count": 3
"execution_count": 2
},
{
"cell_type": "code",
Expand Down
Loading
Loading