Function calling hit or miss
# support
s
Hi, As the title says function calling is really temperamental for me. I'm capturing really basic information which is the customers name, phone number and the nature of the call. Sometimes the function just doesn't trigger so no apparent reason and it's not an issue with make. I'm asking a set amount of questions then prompting the function to run like this:
Copy code
You: Thanks for providing your details, please give me a second.

### Function:
Now run the ‘getCustomerDetails’ function with the result.

You: Paul. Could you describe the issue with the charger in more detail please?
Is there a better way of doing this or an explanation as to why sometimes it just doesn't trigger the function even though all the info has been provided? Any assistance appreciated! Steve
v
@SteveB | IntelleSync.ai Hi Steve, I'm sorry to hear that you're experiencing issues with the function calls. It's important to ensure that the function is being called correctly with all the required parameters. If the function 'getCustomerDetails' requires specific parameters such as the customer's name, phone number, and the nature of the call, you need to make sure that these are being passed correctly to the function. Here's a more structured way to call the function:
Copy code
You: Thanks for providing your details, please give me a second.

### Function:
Now run the ‘getCustomerDetails’ function with the following parameters:
- Name: [Customer's Name]
- Phone Number: [Customer's Phone Number]
- Nature of Call: [Nature of Call]

You: Paul. Could you describe the issue with the charger in more detail please?
Make sure that the placeholders
[Customer's Name]
,
[Customer's Phone Number]
, and
[Nature of Call]
are replaced with the actual information provided by the customer. If the function still fails to trigger, it could be due to a number of reasons such as network issues, incorrect parameters, or an issue with the function itself. It might be helpful to add error handling or logging to the function to capture any failures and understand why it's not being triggered. If you continue to face difficulties, please provide more details or reach out to the support team for further assistance.
You can continue this conversation by mentioning me in the message.
s
@Vapi Now my voice agent is reading the function call to the caller? and does not call the function.
v
@SteveB | IntelleSync.ai It sounds like there may be an issue with the way the function call is being integrated into the voice agent's workflow. To prevent the voice agent from reading the function call out loud, you should ensure that the function call is not included in the text that the voice agent is meant to speak. Instead, the function call should be handled programmatically in the background. Here's what you can do: 1. Check the script or the configuration of your voice agent to ensure that the function call is not part of the spoken script. 2. Make sure that the function call is being triggered by the backend system or the voice application logic after the necessary information has been collected. 3. Review the voice agent's settings to confirm that it's configured to execute functions silently and not include them in the dialogue. If you're using a specific platform or tool to manage your voice agent, you may need to consult the documentation or support for that platform to understand how to properly configure function calls. If you need further assistance with this, please provide more details about the voice agent platform you're using, and I'll do my best to help you resolve the issue.
s
@Vapi "Review the voice agent's settings to confirm that it's configured to execute functions silently and not include them in the dialogue." Please tell where i can enable this in the settings?
v
@SteveB | IntelleSync.ai To ensure that your voice agent executes functions silently and does not include them in the dialogue, you will need to review the settings specific to your voice agent platform. Since I don't have the details of the platform you're using, I'll provide a general approach: 1. **Access the Voice Agent Settings**: Navigate to the settings or configuration section of your voice agent platform. 2. **Check for Input Preprocessing**: Look for an option related to input preprocessing or similar, which might control whether certain text is treated as commands or spoken out loud. 3. **Enable Silent Execution**: If there is an option to enable silent execution of functions or to exclude certain text from being spoken, make sure it is enabled. 4. **Script Configuration**: Ensure that the script or dialogue flow is configured in such a way that function calls are not included in the spoken text. 5. **Documentation**: Refer to the platform's documentation for specific instructions on how to configure function execution. 6. **Support**: If you're unable to find the setting, reach out to the platform's support team for assistance. If you're referring to the VAPI settings and there is an option like
inputPreprocessingEnabled
, you would typically find it in the voice agent's settings or configuration panel. Toggle this option according to your needs. If you provide the name of the voice agent platform or any specific details, I can give you more precise instructions.
c
what does your automation look like?
s
@SteveB | IntelleSync.ai can you please share the call id.
s
Thanks for the responses guys @Chowderr @Shubham Bajaj, I believe it was down to my prompting interfering. All seems to be working consistently now.
2 Views