Function call Client SDK
# support
a
Is it possible to receive the function call in the client SDK. I have integrated mobile with Vapi AI which will call the assitant in configured in the console. We have a custom LLM which will receive the events and the meta data for the call like userId. We are looking for a way communicate between the custom LLM to the mobile on specific events so that the iOS app could update the UI. Is there a way to achieve this using function call or could we send the JSON object from custom LLM to mobile Vapi SDK?
v
@Anand Yes, it is possible to facilitate communication between your custom LLM and the mobile app using VAPI. When specific events occur, you can use VAPI's capabilities to send data, such as JSON objects, to the mobile SDK, which can then update the UI accordingly. To achieve this, you would typically use webhooks to receive call events and metadata, such as
userId
, in your custom LLM. Once the LLM processes the event, it can trigger a function call that sends the necessary information back to the mobile app through the VAPI SDK. Here's a high-level overview of how you might set this up: 1. Configure your VAPI to send call events to your custom LLM via webhooks. 2. Your custom LLM processes these events and determines the appropriate response or UI update needed on the mobile app. 3. The custom LLM triggers a function call that sends a message or JSON object to the mobile SDK. 4. The mobile SDK receives this data and uses it to update the UI. If you need more detailed guidance on how to implement this or if you have any specific questions about the function calls or JSON object transmission, please let me know, and I can provide further assistance. If there are any particular events or metadata you want to handle, please provide more details so I can tailor the response to your needs.
You can continue this conversation by mentioning me in the message.
a
How to create function call from the custom LLM
@Vapi Could you please provide a sample for this/
s
@Anand You cannot make function calls directly from the client-side SDK. Instead, you can use client-side events for function calls such as ClientMessageToolCalls and ClientMessageToolCallsResult to update the UI. If you can let me know the specific events you need for updating the iOS app UI, I can try my best to help you. Please share more details about your usage requirements to better understand the problem and provide appropriate solutions.
a
@Shubham Bajaj We are trying to create a voice assistant which will be active all the time to help the users. We are getting to know about the users by asking around 30 onboarding questions which are configured in the prompt. Once the onboarding questions have been answered the voice assistant should trigger a custom function call for the iOS app client to know that the onboarding has been completed. This would help the iOS app to change UI accordingly
@Anand Do let me know if you require further help or has more doubts.
3 Views