Ben
01/01/2025, 5:24 PMjson
{
"type": "conversation-update",
"conversation": [
{
"role": "system",
"content": "Content content"
},
{
"role": "assistant",
"content": "Hello. This is Eva. How may I assist you today?"
}
],
"messages": [
{
"role": "system",
"message": "Message content",
"time": 1735751620978,
"secondsFromStart": 0
},
{
"role": "bot",
"message": "Hello. This is Eva.",
"time": 1735751622442,
"endTime": 1735751623722,
"secondsFromStart": 1.3199999,
"duration": 1280,
"source": ""
},
{
"role": "bot",
"message": "How may I assist you today?",
"time": 1735751624688.724,
"endTime": 1735751626042.862,
"secondsFromStart": 3.566724,
"duration": 1354.137939453125,
"source": ""
}
],
"messagesOpenAIFormatted": []
}
However the typing seems to instead suggest we would expect a structure with just type
and messagesOpenAIFormatted
being an array of OpenAI messages
https://github.com/VapiAI/client-sdk-web/blob/c7e188c827dec1f7d56025aa18c6e308b3c6384d/api.ts#L6714
Please can you inform me how can I find the correct types to be expected from a given message?
Futhermore, the role is defined as 'bot' whereas it seems that the docs imply [here](https://docs.vapi.ai/sdk/web#send) and [here](https://github.com/VapiAI/client-sdk-web/blob/c7e188c827dec1f7d56025aa18c6e308b3c6384d/api.ts#L896) that this is not a valid role name - how can I find the list of valid role names?
Thanks for your helpVapi
01/01/2025, 5:26 PMVapi
01/01/2025, 5:26 PMVapi
01/01/2025, 5:27 PM