Skip to content

Commit 0d7fd09

Browse files
authored
Merge pull request #116 from LLAMATOR-Core/main-3-0-0
Pre-release v3.0.0
2 parents b1a993c + 67613b1 commit 0d7fd09

File tree

11 files changed

+21
-49
lines changed

11 files changed

+21
-49
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 = 2.3.1
2+
current_version = 3.0.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: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -105,18 +105,24 @@ from ..client.client_config import ClientConfig
105105
logger = logging.getLogger(__name__)
106106
107107
@register_test
108-
class NewAttack(TestBase):
108+
class TestNewAttack(TestBase):
109109
"""Your attack description here."""
110110
111111
info = {
112112
"name": "New Attack",
113113
"code_name": "new_attack",
114-
"tags": [],
114+
"tags": [
115+
"lang:en", # languages of available tested models
116+
"dialog:single-stage", # type of dialogs: single-stage or multi-stage
117+
"owasp:llm01", # OWASP TOP 10 for LLM risks
118+
"eval:heuristic", # type of resilience evaluation
119+
"arxiv:2504.11111", # original paper if exists
120+
],
115121
"description": {
116122
"en": "Description in English.",
117123
"ru": "Описание на русском.",
118124
},
119-
"github_link": "Link to original paper/repository, if available",
125+
"github_link": "Link to attack in release branch",
120126
}
121127
122128
def __init__(
@@ -125,15 +131,13 @@ class NewAttack(TestBase):
125131
attack_config: AttackConfig,
126132
artifacts_path: Optional[str] = None,
127133
num_attempts: int = 0,
128-
*args,
129134
**kwargs,
130135
):
131136
super().__init__(
132137
client_config,
133138
attack_config,
134139
artifacts_path=artifacts_path,
135140
num_attempts=num_attempts,
136-
*args,
137141
**kwargs,
138142
)
139143

README.md

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

1515
```bash
16-
pip install llamator==2.3.1
16+
pip install llamator==3.0.0
1717
```
1818

1919
## Documentation 📚

docs/attack_descriptions.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -164,11 +164,6 @@ For managing a multi-stage interaction between an attacker and tested chat clien
164164
* `current_step` is the current step of the attacker.
165165
* `refine_args` are additional positional arguments for the `tested_client_response_handler`.
166166
* `refine_kwargs` are additional keyword arguments for the `tested_client_response_handler`.
167-
168-
The `multistage_depth` parameter for using in `history_limit` can be extracted from the attack's kwargs as follows:
169-
```python
170-
self.multistage_depth = kwargs.get("multistage_depth", 20)
171-
```
172167
</details>
173168

174169
### OWASP [LLM01:2025](https://genai.owasp.org/llmrisk/llm01-prompt-injection/) Continuous Prompt Injection

docs/howtos.md

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

1414
```bash
15-
pip install llamator==2.3.1
15+
pip install llamator==3.0.0
1616
```
1717

1818
## Usage Guide (using LM Studio)

examples/.env.example

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
1-
OPENAI_CLIENT_API_KEY=lm-studio
2-
OPENAI_CLIENT_BASEURL=http://localhost:1234/v1
3-
OPENAI_CLIENT_MODEL=model-identifier
4-
5-
MISTRAL_API_KEY=zzzzz
6-
MISTRAL_BASEURL=https://api.mistral.ai/v1
7-
MISTRAL_MODEL=mistral-large-2411
8-
9-
GIGACHAT_KEY=xxxs
1+
OPENAI_API_KEY=lm-studio
2+
OPENAI_BASEURL=http://localhost:1234/v1
3+
OPENAI_MODEL=model-identifier
104

115
TELEGRAM_APP_ID=12345678
126
TELEGRAM_API_HASH=yyyyy

requirements-dev.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,6 @@ jupyter==1.1.1
3838

3939
# Publish package
4040
build==1.2.2
41-
twine==5.1.1
42-
furo==2024.8.6
41+
twine==6.1.0
42+
furo==2024.8.6
43+
pkginfo==1.12.1.2

src/llamator/__version__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""Version information."""
22

33
# fmt: off
4-
__version__ = '2.3.1' # noqa
4+
__version__ = '3.0.0' # noqa
55
# fmt: on

tests/langchain_client_test.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,6 @@
11
def langchain_client_openai_backend_test():
22
"""
33
Tests OpenAI client from local llamator lib.
4-
5-
Environment variables
6-
----------
7-
OPENAI_CLIENT_API_KEY : str
8-
API key for OpenAI compatible API
9-
OPENAI_CLIENT_BASEURL : str
10-
URL of OpenAI compatible API
11-
OPENAI_CLIENT_MODEL : str
12-
Type of model
134
"""
145
from llamator.client.specific_chat_clients import ClientLangChain
156

tests/openai_client_lm_studio_test.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,6 @@
11
def openai_client_lm_studio_test():
22
"""
33
Tests OpenAI client from local llamator lib.
4-
5-
Environment variables
6-
----------
7-
OPENAI_CLIENT_API_KEY : str
8-
API key for OpenAI compatible API
9-
OPENAI_CLIENT_BASEURL : str
10-
URL of OpenAI compatible API
11-
OPENAI_CLIENT_MODEL : str
12-
Type of model
134
"""
145
from llamator.client.specific_chat_clients import ClientOpenAI
156

0 commit comments

Comments
 (0)