GetInference
01/19/2025, 7:16 PMVapi
01/19/2025, 7:18 PMassistant_overrides
to the function parameters.
Here's a general approach you can take:
1. **Extract Metadata**: When the payload is received, extract the metadata
object from the assistant_overrides
.
2. **Map to Function Parameters**: Before calling the function, map the extracted metadata values to the corresponding function parameters. This mapping should be done programmatically within your VAPI system.
3. **Call the Function**: With the parameters now containing the necessary metadata, call the function using these parameters.
For example, if you have a function that requires jira_host
, jira_email
, and jira_project_key
as parameters, your VAPI system should automatically take the values from the metadata and pass them to the function call like this:
javascript
function callFunctionWithMetadata(metadata) {
const functionParameters = {
jira_host: metadata.jira_host,
jira_email: metadata.jira_email,
jira_project_key: metadata.jira_project_key,
// ... other parameters if needed
};
// Assuming 'functionToCall' is the function that needs these parameters
functionToCall(functionParameters);
}
This way, the user does not need to voice over complex information each time they want to connect to their systems. The VAPI system handles the mapping automatically based on the initial payload provided.
If you have a specific function in mind that you need to call with these parameters, please provide the function name and any additional context so I can assist you further. If this is a general inquiry, the approach above should guide you in the right direction.Vapi
01/19/2025, 7:18 PMShubham Bajaj
01/20/2025, 5:44 AMGetInference
01/20/2025, 8:57 AMDK
05/11/2025, 11:08 AMVapi Support Bot
05/11/2025, 11:09 AMVapi Support Bot
05/11/2025, 11:09 AMVapi Support Bot
05/11/2025, 11:09 AMemail
and name
) in your prompt template and ensure these are populated from the metadata when the assistant is triggered. This way, the values from your metadata payload will be available in the prompt and can be passed to any tool calls as needed.Vapi Support Bot
05/11/2025, 11:09 AMemail
and name
) in your prompt template and ensure these are populated from the metadata when the assistant is triggered. This way, the values from your metadata payload will be available in the prompt and can be passed to any tool calls as needed.DK
05/11/2025, 11:12 AMVapi Support Bot
05/11/2025, 11:12 AMVapi Support Bot
05/11/2025, 11:12 AMVapi Support Bot
05/11/2025, 11:13 AMVapi Support Bot
05/11/2025, 11:13 AMKyle
05/13/2025, 1:04 AM