VAPI WebSDK tool use response
# support
a
When using Vapi's web SDK and function calling/tools, how do I pass the response of the triggered function back to the LLM/model so it is available for the model? Or will I have to use the server function calling for that?
v
@avi.osi When using Vapi's web SDK, the response from a triggered function is typically handled by your server. Your server will receive an HTTP request with the information about the tool call, process the request, execute the desired function, and then send back a response in the specified JSON format. To make the response available to the LLM/model, you would need to ensure that your server-side logic captures the response and then passes it to the LLM/model as part of the input context or through an API call that the LLM/model can access. If you're using server function calling, the process is similar. Your server handles the function execution and must communicate the results back to the LLM/model. In both cases, the key is to have server-side logic that can handle the response and provide it to the LLM/model in a way that it can use for further processing or output generation. If you need more detailed guidance on how to implement this, please ask support for more info on this.
You can continue this conversation by mentioning me in the message.
@avi.osi Sweet. Have a great day!
@Vapi Sweet. Have a great day!
2 Views