Open
Description
When we access the API, by POST /openai/chat
, we return an object that looks like this
interface ChatHttpResponse {
reply: string;
defenceReport: DefenceReport;
transformedMessage?: TransformedChatMessage;
wonLevel: boolean;
isError: boolean;
openAIErrorMessage: string | null;
sentEmails: EmailInfo[];
transformedMessageInfo?: string;
}
After #873 we add wonLevelMessage
as well.
What's the problem? Well all of the following properties represent something that might be added to the chat history: reply
, transformedMessage
, wonLevelMessage
, openAIErrorMessage
, transformedMessageInfo
, or at least displayed on the frontend's chatHistory. We should think about perhaps just returning a list of ChatMessage
s
This will require some investigation (about when, where and how the above messages get added to the font/backend chats), and a bit of poking around on both the front and back end, and then probably lots of test changes.