ScottLogic / prompt-injection

Application which investigates defensive measures against prompt injection attacks on an LLM, with a focus on the exposure of external tools.
MIT License
11 stars 9 forks source link

828 streamline configure defence info message network call #874

Closed pmarsh-scottlogic closed 3 months ago

pmarsh-scottlogic commented 3 months ago

⚠ Note, don't believe the branch name!

Description

Before, when the user would configure a defence, we would send a request to the backend. If the backend successfully configured the defence, then the frontend would send a further request to add the info message to the chat history, eg 'character limit defence updated'.

This PR changes it so that when the backend successfully configures a defence, the backend generates the info message and appends it to the history, then forwards it on to the frontend.

Concerns

Checklist

Have you done the following?