Ben
03/05/2026, 10:32 AMts
await httpClient.post(
`${retellApiUrl}/create-chat-completion`,
{
chat_id: existingRetellChatId,
content: followUpMessage,
role: 'agent',
}
The problem is that their isn't actually a "role" parameter that you can pass in, and I guess since the last message sent was by the agent, the next chat-completion automatically gets sent from the user role? So I get this mess where the agent is replying to itself(see screenshot).
First I don't know if the completion should ever be sending as a user message? Or if there is a use case for that, then adding an optional agent param would be useful.
https://cdn.discordapp.com/attachments/1479063975772819478/1479063977467183134/image.png?ex=69aaad2b&is=69a95bab&hm=97fc11d312a4cd328a5bb5bfd2342cda2b975d83356af9f9482bd26f89945623&Shah - support @ Retell AI
03/05/2026, 2:36 PMShah - support @ Retell AI
03/05/2026, 2:36 PMShah - support @ Retell AI
03/05/2026, 2:38 PMBen
03/05/2026, 4:13 PM