Re-generate a message
Hi, I am trying to implement a regeneration mechanism. The user should be able to re-generate any message from the history.
Right now, I am deleting the message to regenerate + all messages after that one but for some reason, this query always returns all messages:
3 Replies
š Created GitHub issue: https://github.com/mastra-ai/mastra/issues/10276
š If you're experiencing an error, please provide a minimal reproducible example to help us resolve it quickly.
š Thank you @Nic for helping us improve Mastra!
Thanks for reporting this! We have a new query format in 1.0.0-beta that fixes quirks here. But let me see if we can have a fix in the 0.x version
My solution:
Only works for regenerating the last message. You could probably update it to work for regenerating any message but I wouldn't suggest that without also implementing history trees.