alexrb1
04/10/2025, 1:15 AMVapi Support Bot
04/10/2025, 1:17 AMadd-message
are processed in the conversation buffer and sent to the LLM stream. If the triggerResponseEnabled
flag is not set correctly, it might cause unexpected behavior. As noted in [Discord discussions](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1338730919904673853), this flag controls whether a message should trigger an LLM response.
3. **Different call configurations**: The two calls might have different configurations for monitoring. For Live Call Control to work properly, both listenEnabled
and controlEnabled
need to be set to true
in the monitorPlan
.
## Possible solutions:
1. **Check your message format**: Ensure your add-message
call includes the correct role and content format:
javascript
{
type: 'add-message',
message: {
role: 'system', // or 'tool' depending on your use case
content: 'Your content here'
},
triggerResponseEnabled: false // Set to false to update silently
}
Vapi Support Bot
04/10/2025, 1:17 AMjavascript
const assistant = {
model: {
messages: [
{
role: 'system',
content: 'Current user: {{userName}}'
}
]
}
};
// Update variables
const variables = {
userName: 'Alex'
};
3. **Check for microphone permissions**: If microphone permission is not granted within 10 seconds, the call might end prematurely, affecting the add-message
function.
Would you be able to share more details about how you're implementing the add-message
function in your code? That might help narrow down the issue further.
Sources:
- [Discord discussions on add-message behavior](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1338730919904673853)
- [Discord discussions on caching issues](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1342338583721414677)
- [Discord discussions on variable substitution](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1343457322072145950)alexrb1
04/10/2025, 1:49 AMalexrb1
04/10/2025, 2:58 AMalexrb1
04/10/2025, 5:05 AMSahil
04/11/2025, 3:12 PMalexrb1
04/11/2025, 5:00 PMSahil
04/11/2025, 11:04 PMcurl -X POST "https://api.vapi.ai/call" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"squad": {
"name": "Transient Squad Example",
"members": [
{
"assistant": {
"name": "First Assistant",
"firstMessage": "Hello, how can I help you today?",
"model": {
"provider": "openai",
"model": "gpt-4"
},
"voice": {
"provider": "vapi",
"voiceId": "echo"
}
}
},
{
"assistant": {
"name": "Second Assistant",
"firstMessage": "I'm the second assistant, how can I assist?",
"model": {
"provider": "openai",
"model": "gpt-4"
},
"voice": {
"provider": "vapi",
"voiceId": "nova"
}
}
}
],
"membersOverrides": {
"firstMessage": "Hello, this is an overridden first message for all assistants.",
"voice": {
"provider": "vapi",
"voiceId": "alloy"
}
}
},
"customer": {
"number": "+1234567890",
"name": "John Doe"
},
"phoneNumber": {
"number": "+0987654321"
}
}'
Sahil
04/11/2025, 11:04 PMalexrb1
04/12/2025, 12:03 AMSahil
04/12/2025, 7:39 AMalexrb1
04/12/2025, 1:38 PMalexrb1
04/12/2025, 5:09 PMShubham Bajaj
04/14/2025, 6:50 AMalexrb1
04/14/2025, 1:46 PMalexrb1
04/14/2025, 1:58 PMSahil
04/15/2025, 10:35 PM