How to Trigger the transferCall Function in a Cust...
# support
f
Has anyone created a working custom LLM outside of Vapi (for example, on Replit)? The custom LLM must trigger the transferCall function at some point, using a phone number that is already defined in the assistant’s settings. Is there a template for a custom LLM with a transferCall function inside, so we can build around it? I can’t find an answer on how to trigger the transferCall function from outside of Vapi.
a
HeyFelix WIlliam Thank you for creating the ticket! A member of our team will reach out to you shortly.
v
message has been deleted
@Felix WIlliam It's great to hear that you're interested in integrating a custom LLM with Vapi to support your call center staff. While I don't have access to external resources or the ability to confirm if someone has created a working custom LLM on platforms like Replit, I can certainly guide you on how to proceed with triggering functions like
transferCall
from your custom LLM. To trigger the
transferCall
function from your custom LLM, you would typically need to use Vapi's API or SDK to send a request to the Vapi platform, which would then handle the call transfer. The
transferCall
function would be part of the voice assistant's capabilities, and you would invoke it by sending the appropriate command or API call from your custom LLM when certain conditions are met. Unfortunately, there isn't a template available through this support channel, but here's a general approach you can take: 1. Ensure your custom LLM can communicate with Vapi's API endpoints. 2. Define the conditions under which the
transferCall
function should be triggered within your LLM's logic. 3. When the condition is met, send an API request to Vapi with the necessary information, such as the
transferCall
command and the predefined phone number from the assistant's settings. If you need detailed documentation or specific code examples on how to implement this, please reach out to Vapi's developer support or consult the API documentation provided by Vapi. They should be able to provide you with the necessary resources and guidance to integrate your custom LLM with the Vapi platform. If you have any further questions or need assistance with other functions, feel free to ask!
You can continue this conversation by mentioning me in the message.
s
> I can’t find an answer on how to trigger the transferCall function from outside of Vapi. @Felix WIlliam When you refer to being outside of Vapi, I assume you are indicating the use of LLM native tools. If this is indeed the case, and you are attempting to utilize LLM native tool calling, you are expected to return the generated message content(so transfer here won't work). Conversely, if this is not the case, you simply need to yield the 'done' response back to Vapi, provided that the tool is included within the assistant.
@Felix WIlliam If your trying to implement tools defined as custom-tools, they will operate as anticipated, and no additional actions are required on your part. You can find the custom tools and custom LLM code here. Please correct me if I have misunderstood your intentions. https://replit.com/@shubham138/Vapi-Snippets fileName: customLLM.ts endpointName: /chat/tools
@Felix WIlliam Closing duplicate thread.
a
I'm experiencing issues with generating calls using VAPI AI. Although I can successfully make calls to some contact numbers, I'm encountering an error indicating that I'm not connected. Additionally, there is no caller ID being generated.
s
@Arsh can you please create a new #1211483291191083018 ticket, share more details and ping me over there.
2 Views