Richard
05/03/2025, 7:48 AMVapi Support Bot
05/03/2025, 7:50 AMmessages array instead of the deprecated systemPrompt property:
javascript
const assistant = {
model: {
messages: [
{
role: 'system',
content: 'Hello {{name}}!' // Use double curly braces
}
]
}
};
// When starting the call
vapi.start("assistantId", {
variableValues: {
name: "John" // Ensure variable names match exactly
}
});
According to [Vapi documentation](https://docs.vapi.ai/assistants/dynamic-variables), variable names must match exactly between your system prompt and variableValues object.
Sources:
- [Vapi Dynamic Variables Documentation](https://docs.vapi.ai/assistants/dynamic-variables)
- [Discord Discussion](https://discord.com/channels/1211482211119796234/1337126843790397591)Vapi Support Bot
05/03/2025, 7:50 AMmessages array instead of the deprecated systemPrompt property:
javascript
const assistant = {
model: {
messages: [
{
role: 'system',
content: 'Hello {{name}}!' // Use double curly braces
}
]
}
};
// When starting the call
vapi.start("assistantId", {
variableValues: {
name: "John" // Ensure variable names match exactly
}
});
According to [Vapi documentation](https://docs.vapi.ai/assistants/dynamic-variables), variable names must match exactly between your system prompt and variableValues object.
Sources:
- [Vapi Dynamic Variables Documentation](https://docs.vapi.ai/assistants/dynamic-variables)
- [Discord Discussion](https://discord.com/channels/1211482211119796234/1337126843790397591)Kings_big💫
05/03/2025, 10:02 AM{{variableName}} syntax and consistently passed with assistant overrides to avoid issues in subsequent messages.Richard
05/03/2025, 1:53 PMRichard
05/03/2025, 1:57 PMKings_big💫
05/03/2025, 3:01 PMKings_big💫
05/03/2025, 3:12 PMconfig
"firstMessage": "Hello Abraham Richard I'm Josh Bersin, and I'll be conducting your interview today, Shall we begin",
"firstMessageInterruptionsEnabled": false,
"firstMessageMode": "assistant-speaks-first",
current
({{candidateProfile}})
expected
{{candidateProfile}}
Use the dynamic variables in the expected format. Due to its current format, the parsing ignores them considering non-dynamic variable syntax, and that's why it's not getting applied.