-
Notifications
You must be signed in to change notification settings - Fork 10
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
Stop adding messages to backend history via frontend 🛠🛠 #828
Open
Labels
Milestone
Comments
pmarsh-scottlogic
changed the title
Stop adding messages to backend history via frontend.
Stop adding messages to backend history via frontend 🛠
Feb 6, 2024
pmarsh-scottlogic
changed the title
Stop adding messages to backend history via frontend 🛠
Stop adding messages to backend history via frontend 🛠🛠
Feb 6, 2024
pmarsh-scottlogic
added
frontend
Requires work on the frontend
backend
Requires work on the backend
refactor
Improve code quality
labels
Feb 6, 2024
This was
linked to
pull requests
Mar 21, 2024
3 tasks
3 tasks
Three usages remaining:
Once these have been tackled, the service call can be removed from frontend and backend code. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I note that there is an endpoint to add a message to the backend's chat history. We only every do this as a direct result of something that happened in the backend. Therefore this endpoint and all its associated network calls don't need to exist.
🔧 Remove the endpoint
/openai/addHistory
and add messages to history in the backend instead. Delete the frontend methods that use this endpoint, includingaddInfoMessageToChatHistory
,addResetMessage
,addInfoMessage
, and other methods tat only exist to add stuff to backend history.The user actions that would result in a change in chat history and thus a superfluous API call are:
level resethandled in Streamline network calls for resetting level progress 🛠🛠 #645ACCEPTANCE CRITERIA
The following acceptance criteria boil down to doing the above listed actions, checking that the actions work and the info messages are added, and there is only one network call
WHEN user wins a level
THEN level completion message appears as normal in chat
AND only one network call of type fetch
WHEN user sends a message that triggers a defence (e.g. configure character limit to be super small, then send a long message)
THEN the defence triggered message appears as normal in chat
AND only one network call of type fetch
WHEN user sends a message that alerts a defence (e.g. configure a character limit to be small, then disable the defence again and send a long message)
THEN the defence alerted message appears as normal in chat
AND only one network call of type fetch
WHEN user configures a defence (i.e. changes the character limit)
THEN the defence configured message appears as normal in chat
AND only one network call of type fetch
WHEN user toggles a defence on or off
THEN the defence enabled / disabled message appears as normal in chat
AND only one network call of type fetch
WHEN user changes the chat model (under model configuration)
THEN the model changed message appears as normal in chat
AND only one network call of type fetch
WHEN user changes a configuration of the chat model (under model configuration)
THEN the model configured message appears as normal in chat
AND only one network call of type fetch
Here's how you quickly find out what api calls are being made that are fetch type. Note that the CombinedFonts call is of type xhr, therefore we ignore it.
The text was updated successfully, but these errors were encountered: