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
16 stars 11 forks source link

Have chatGptSendMessage only return new chat messages #756

Open gsproston-scottlogic opened 9 months ago

gsproston-scottlogic commented 9 months ago

Feature Request

Description

ONLY DO AFTER #705 #707 #708 Currently, the chatGptSendMessage in openai.ts returns the entire chat history for the level. Instead, just have it return any new chat messages, and have the chat controller append them to the chat history.

Additional context

Acceptance criteria

Refactor ticket, so regression testing. Especially around chatting with the bot and getting the right replies. Also worth checking that the history is as expected after refreshing and changing levels.