For my application, I normally post to /v1/chat/completions a list of messages containing both User and Assistant messages. I often edit the most recent response from the Assistant, and then resubmit this edit with a new User message. For example, if I’m writing a short story, I may make some edits to the response from the assistant, and then ask it to continue with the story. More importantly, this is used for caching. It is an essential feature.
I want to do the exact same thing with the Assistant/Message/Thread apis. However, it seems like there is no way for us to set the role to Assistant. I don’t want to simply allow the assistant to respond, I need to be able to edit the assistants response before sending the next user message.
Is there any work around since this is not available?
Indeed, this is not yet possible. But it’s critical if you want to implement any type of caching of assistant responses. I’ve a placeholder for this in my code for now, waiting for it to be possible. Currently only “user” role seems to be supported, as this code shows: