Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v0.1.0 #255

Merged
merged 156 commits into from
Sep 12, 2023
Merged

v0.1.0 #255

merged 156 commits into from
Sep 12, 2023

Conversation

gsproston-scottlogic
Copy link
Contributor

Snapshot of dev before we add testing to the deployment flow.

gsproston-scottlogic and others added 30 commits July 17, 2023 13:26
* WIP: Defence mechanism info box

* WIP: visual change when a defence is clicked on

* WIP: Backend support to get and set defences

* WIP: Frontend can now (de)activate defence

* Fix comparison bug

* Fix calling bug

* WIP: Character limit backend detection

* WIP: Defence flashes red when triggered

* Working defence mechanism

* Configurable max message length
Consistent headers
* WIP: Defence mechanism info box

* WIP: visual change when a defence is clicked on

* WIP: Backend support to get and set defences

* WIP: Frontend can now (de)activate defence

* Fix comparison bug

* Fix calling bug

* WIP: Character limit backend detection

* WIP: Defence flashes red when triggered

* Working defence mechanism

* Add random sequence enclosure frontend selection

* Transform prompt with random sequence enclosure

* Move transform func to defence. Configurations as env variables

* Display original and transformed prompt in chatbox

* Change colour of edited chatbot message

* Code review

* Fix accidential reversion

---------

Co-authored-by: George Sproston <gsproston@scottlogic.com>
* Updated tab title

* SL icon
* Removed unused component

* Can no longer send another message if waiting on reply
* WIP: Defence mechanism info box

* WIP: visual change when a defence is clicked on

* WIP: Backend support to get and set defences

* WIP: Frontend can now (de)activate defence

* Fix comparison bug

* Fix calling bug

* WIP: Character limit backend detection

* WIP: Defence flashes red when triggered

* Working defence mechanism

* Add random sequence enclosure frontend selection

* Transform prompt with random sequence enclosure

* Move transform func to defence. Configurations as env variables

* Display original and transformed prompt in chatbox

* Change colour of edited chatbot message

* Add XML tagging defence

* Refactor message transformation

* Detect triggered defences function. detect XML tagging

* Move defence detection to service so we can apply to original message

* clean up

* pass in original message to detect function

* update xml tagging description

---------

Co-authored-by: George Sproston <gsproston@scottlogic.com>
…idation-whitelist-emails

4 defence prompt validation whitelist emails
* System role defence

* No longer logging chat history as a table
…efence-flashes-on-inputs-with-only

regex to detect XML tagging
* Backend service

* WIP: openai chat with sessions

* WIP: Consistent ordering of function args

* Better logic flow

* Moved isEmailInWhiteList to email file

* WIP: Init session variables

* WIP: Sent emails now in session

* Added defences to the session
* filtering defence added

* Fix blocked messages not showing in exported chat

* add tests

* remove extra logs

* typos and fix detect filter list func

* frontend typo

* change validation for filter configuration
* WIP header

* WIP: Header spacing

* Header without icon

* Fixed bug where user message would disappear

* Right side bar styling
* WIP header

* WIP: Header spacing

* Header without icon

* Fixed bug where user message would disappear

* WIP: Moving code around

* Clearing defences on reset

* Only showing triggered defence if it's known
* WIP header

* WIP: Header spacing

* Header without icon

* Fixed bug where user message would disappear

* WIP: Moving code around

* Clearing defences on reset

* Only showing triggered defence if it's known

* Updated chat footer

* Better chat footer sizings

* Chat speech bubbles
* Alerted and triggered defences

* Clearer chat message class

* Fixed tests

* More test coverage
* add phase state object to session

* set emails and defences when switching phases

* Persist phase chat history from backend

* add info messages from frontend to backend chat history

* reload info messages in chat history

* add blocked messages to chat history

* add edited user messages to chat history

* Skip adding blocked messages to chat history

* update tests

* add preamble message to start of chat

* fix switching phase not updating defences

* refactor with new chat message types

* fix preamble message and replace enums
* move validation into defence mechanism

* remove unnecessary change
* update LLM prompt evaluations instructions

* fix allowing formatting instructions
* Scrollbars for various browsers but not firefox

* Firefox scrollbars
* Moved export and reset buttons

* Showing attacks before defences

* Left side bar headers

* Closer overall styling

* Strategy input boxes styling

* WIP: defence toggle

* Defence toggles

* Fixed warning
* add popup box

* Scrollbars for various browsers but not firefox

* Firefox scrollbars

* display txt and csv files

* rename component

* text align

* reformat files

* get the document urls from backend

* formatting txt file

* 174 no env (#223)

* Calculating doc URI on the frontend

* Correct doc type

* Nicer button styling

---------

Co-authored-by: George Sproston <gsproston@scottlogic.com>
Co-authored-by: George Sproston <103250539+gsproston-scottlogic@users.noreply.github.com>
* basic styling for phase info boxes and update preambles

* space out model select box
* Remember defences between phase 2 and sandbox

* Adding defence name to log after (de)activation
* Backend build script

* Basic typescript-eslint

* Stricter eslint ts

* Backend prettier

* More eslint rules

* Linted app.ts

* Linted defence.ts

* Linted email.ts

* Linted langchain.ts

* Linted openai.ts

* Linted router.ts

* Linted defence test

* Linted langchain test

* Linted remaining tests

* Ignoring some files when linting

* Added linting and formatting checks to CI

* Excluding build files from testing

* WIP: frontend linting

* Linted DefenceConfiguration

* Fixed defence toggle

* Better void calls

* Frontend linting

* Frontend formatting

* Added frontend CI job

* Not building frontend node_modules

* Linted backend more

* Frontend prettier

* Fixed bug

* Better checking for req body params

* Using PHASE_NAMES
Updated with linting and formatting information
* store vectorised docs as global variable

* re-init qa model on each question to support multi user

* Update tests

* remove comment

* fix linting errors

* init prompt evaluation chain on each eval
* dots when message generating

* turn off hover colour for disabled button
Fixed frontend run command
* export for multiple languages

* add readme instructions for adding fonts
* WIP: Header icon

* Correct icon

* Header icon

* Removed unused file

* Smiley icon when phase is complete

* Formatted

* Smaller icon and better padding

* React-friendly icon

* Don't wrap the header title

* Don't wrap button text
* WIP: Changing input to textarea

* Input as contentEditable div

* Send button to the bottom

* Using ContentEditable

* Switched back to textarea

* Allowing for shift+enter

* Expanding textbox
@gsproston-scottlogic gsproston-scottlogic merged commit e062425 into main Sep 12, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants