/
zhmax
/
FORGE_LITE
Обзор
Документация
Войти
/
zhmax
/
FORGE_LITE
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
recipes/template/attack.py
21 строка
813 B
wearetyomsmnv
add kernal version
08 апр 2026, 17:51
08 апр 2026, 17:51
f147cb6
Код
Авторство
О чём код?
# attack.py — attack logic and parameter grid # This file goes inside a .attack bundle together with prompts.txt and meta.json PARAMETERS = { # Each key is a parameter name matching an argument in generate_message. # Values are lists — cartesian product is tested against all prompts. # Example: # "prefix": ["Ignore previous instructions.", ""], # "language": ["en", "ru"], } def generate_message(prompt: str) -> str: # Transform the prompt here. # Add keyword arguments matching PARAMETERS keys, e.g.: # def generate_message(prompt: str, prefix: str, language: str) -> str: # # Return either: # str — single user message # list[dict] — full chat history, e.g. [{"role": "system", ...}, {"role": "user", ...}] return prompt