Unable to create messages as “assistant” role in assistant api

It appears that when using the Assistants API, the assistantsClient.createMessage(assistantThread.id,'user', content); method only functions with the role parameter set to “user” and not “assistant.” This means you can only create messages as if they were sent by a user, rather than an assistant. As for adding previous message history directly as in the chat API, it seems that this capability may not be directly available within the Assistants API

Welcome to the dev forum @hjk.arab47

The Assistants API is a stateful API where messages are managed by the Assistant and not the dev/client/user.

Simply put, you don’t need to manage the conversation history as this is one of the utilities/advantages of assistants.

Currently, assistant messages can’t be injected into the conversation history.

1 Like

if at a later point of time the user restarts the conversation then how will that happen? Does assistants api have a solution for this?
I know about thread but it can only store messages for 60 days …What if i need same conversation later…