Oliver Thomas
Results
2
comments of
Oliver Thomas
Try this out: ``` const updateLastMessage = (message) => { setState((prev) => { return { ...prev, messages: [...prev.messages.slice(0, -1), { ...prev.messages.at(-1), message }]}; }); }; ```
This is how my setup works. I use a streaming response from FastAPI: I have this function in my action provider for updating an existing message ``` const updateLastMessage =...