diff --git a/frontend/src/Attacks.js b/frontend/src/Attacks.ts similarity index 58% rename from frontend/src/Attacks.js rename to frontend/src/Attacks.ts index 0f2129e53..aac7640ce 100644 --- a/frontend/src/Attacks.js +++ b/frontend/src/Attacks.ts @@ -1,7 +1,9 @@ -const ATTACKS = [ +import { ATTACK_TYPES, AttackInfo } from "./models/attack"; + +const ATTACKS: AttackInfo[] = [ { + id: ATTACK_TYPES.JAILBREAK_PROMPT, name: "jailbreak prompt", - id: "JAILBREAK_PROMPT", info: "using prompt injection, get the chat bot in a state where it no longer follows its original instructions.", }, ]; diff --git a/frontend/src/models/attack.ts b/frontend/src/models/attack.ts new file mode 100644 index 000000000..cf0b51d9d --- /dev/null +++ b/frontend/src/models/attack.ts @@ -0,0 +1,12 @@ +enum ATTACK_TYPES { + JAILBREAK_PROMPT = "JAILBREAK_PROMPT", +} + +interface AttackInfo { + id: ATTACK_TYPES; + name: string; + info: string; +} + +export { ATTACK_TYPES }; +export type { AttackInfo };