-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* WIP: Phase rework * Phase syncing between frontend and backend * Better backend phase transitions
- Loading branch information
1 parent
90397ce
commit 5d2a1ed
Showing
11 changed files
with
115 additions
and
273 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,34 @@ | ||
import { Phase, PHASE_NAMES } from "./models/phase"; | ||
|
||
const DEFAULT_SANDBOX_PHASE: Phase = new Phase( | ||
PHASE_NAMES.SANDBOX, | ||
3, | ||
"app sandbox. ask the model questions and try get sensitive information", | ||
"preamble", | ||
"path_to_documents", | ||
false, | ||
true | ||
); | ||
|
||
const PHASES: Phase[] = [ | ||
new Phase( | ||
PHASE_NAMES.PHASE_0, | ||
0, | ||
"easy phase to see how to ask the model question and get answers", | ||
"preamble", | ||
"path_to_documents", | ||
false, | ||
false | ||
), | ||
new Phase( | ||
PHASE_NAMES.PHASE_1, | ||
1, | ||
"harder prompt to try and trick the model into telling you the secret", | ||
"preamble", | ||
"path_to_documents", | ||
false, | ||
false | ||
), | ||
new Phase( | ||
PHASE_NAMES.PHASE_2, | ||
2, | ||
"even harder and you can use any feature on the app to try and trick the model into telling you the secret", | ||
"preamble", | ||
"path_to_documents", | ||
false, | ||
false | ||
), | ||
DEFAULT_SANDBOX_PHASE, | ||
{ | ||
id: PHASE_NAMES.PHASE_0, | ||
name: "phase 0", | ||
preamble: "preamble", | ||
isComplete: false, | ||
isCurrent: false, | ||
}, | ||
{ | ||
id: PHASE_NAMES.PHASE_1, | ||
name: "phase 1", | ||
preamble: "preamble", | ||
isComplete: false, | ||
isCurrent: false, | ||
}, | ||
{ | ||
id: PHASE_NAMES.PHASE_2, | ||
name: "phase 2", | ||
preamble: "preamble", | ||
isComplete: false, | ||
isCurrent: false, | ||
}, | ||
{ | ||
id: PHASE_NAMES.SANDBOX, | ||
name: "sandbox", | ||
preamble: "preamble", | ||
isComplete: false, | ||
isCurrent: false, | ||
}, | ||
]; | ||
|
||
function getPhaseByName(phaseName: string): Phase { | ||
return ( | ||
PHASES.find((phase) => phase.name === phaseName) || DEFAULT_SANDBOX_PHASE | ||
); | ||
} | ||
|
||
export { PHASES, getPhaseByName }; | ||
export { PHASES }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.