Discussions

Ask a Question
Back to All

Can't send message to a chat with "system" role.

When sending a message to a chat - POST https://api.d-id.com/agents/{agentId}/chat/{chatId} , with the role "system", the d-id platform answer: BadRequestError - Latest message is not from user.

Request:

{
  "messages": [
    {
      "role": "system",
      "content": "You are Rambo, the friendly hero assistant. Kindly greet the user and ask for his email address.",
      "created_at": "025-01-28T19:40:10.788Z"
    }
  ],
  "streamId": "my_current_stream_id",
   "session_id": "my_current_session_id"
}

Response:

{
    "kind": "BadRequestError",
    "description": "Latest message is not from user"
}

Is there some way to send system messages to interact with the user before, or multiple times before the first or next user's answer?

I need some way to maintain my context supervisors acting and guiding the conversation.