[Assistants] Is there a way to delete message or modify message content for a given thread?

We are developing an agent.

We are thinking about the possibility of deleting an existing message.
Why? so that existing responses do not interfere if we want to create a new message that is similar.

We are also wondering if it’s possible to modify the content an existing message and rerun it.


yes it is, it would have been quicker to just try it

I’ve been looking over the Assistants playground and the API documentation and it does not look like this is possible with the Assistants API. It’s disappointing that using the Assistants API means that you can’t support this feature when both ChatGPT itself and the Chats API are capable of it. I plan on sticking with the Chats API now because of this and the lack of streaming output support.


how did you use it? You can only update metadata from what I looked at.

I’d like to know the answer too. Can’t seem to get a result if I change the message in the same thread.

I don’t think it’s possible to delete a message from a thread. A workaround might be to just create a new thread with the messages, minus the one you want to delete.

Deletion of messages is very useful for “one-off” question scenarios where an agent passes a simple one-round question to the other helper agent, and the helper agent should not be accumulating the whole conv history.

1 Like

You can’t recreate the thread with the assistant’s messages though. You can only manually create messages from the user, not the assistant.


Yes you’re right of course. I missed that .

1 Like



At the moment it is already possible. Maybe it’s not relevant for you now, but just for the community - It is possible solution to recreate a thread with only needed messages. Just checked it now.

How? I just checked the threads section and it just shows the log of the conversation that was had? No option to add or remove anything.