zpayab
05/14/2024, 1:05 AMVapi Support
05/14/2024, 1:05 AMVapi Support
05/14/2024, 1:05 AMassistantOverrides
with variableValues
passed to the API or SDK. For example:
json
{
"variableValues": {
"name": "John"
}
}
In your prompt templates, you can use variables like {{name}}
which will be replaced dynamically during the call [(1)]() .
2. **Sharing Assistant URL with Custom Prompt**: Vapi allows creating temporary assistants with custom configurations on the fly via the Web SDK. You can customize properties from the frontend dynamically without creating new assistants for each applicant. Here is a brief example:
javascript
const assistantOptions = {
name: "Interview Assistant",
firstMessage: "Hello, let's start your interview.",
transcriber: {
provider: "deepgram",
model: "nova-2",
language: "en-US",
},
voice: {
provider: "playht",
voiceId: "jennifer",
},
model: {
provider: "openai",
model: "gpt-4",
messages: [
{
role: "system",
content: `You are an interview assistant. The candidate is {{name}}.`,
},
],
},
};
vapi.start(assistantOptions);
This allows you to send a unique URL for each applicant with their respective prompts/questions without needing to create a new assistant each time [(2)]() .Vapi Support
05/14/2024, 1:12 AMSahil
05/14/2024, 8:40 AM