diff --git a/fern/tools-calling.mdx b/fern/assistants/custom-tools.mdx similarity index 97% rename from fern/tools-calling.mdx rename to fern/assistants/custom-tools.mdx index 1eb3494d2..85c517f77 100644 --- a/fern/tools-calling.mdx +++ b/fern/assistants/custom-tools.mdx @@ -1,7 +1,7 @@ --- -title: Tools Calling -subtitle: Learn how to create and configure Tools Calling with Vapi. -slug: tools-calling +title: Custom Tools +subtitle: Learn how to create and configure Custom Tools for use by your Vapi assistants. +slug: assistants/custom-tools --- diff --git a/fern/assistants/function-calling.mdx b/fern/assistants/function-calling.mdx index 8a27d861f..fac7794ec 100644 --- a/fern/assistants/function-calling.mdx +++ b/fern/assistants/function-calling.mdx @@ -1,16 +1,16 @@ --- -title: Function Calling -subtitle: 'Additional Capabilities for Your Assistants ' -slug: assistants/function-calling +title: Default Tools +subtitle: 'Adding Transfer Call, End Call, and Dial Keypad capabilities to your assistants.' +slug: assistants/default-tools --- -Vapi voice assistants are given three additional functions: `transferCall`,`endCall`, and `dialKeypad`. These functions can be used to transfer calls, hang up calls, and enter digits on the keypad. +Vapi voice assistants are given additional functions: `transferCall`,`endCall`, and `dtmf` (to dial a keypad with [DTMF](https://en.wikipedia.org/wiki/DTMF)). These functions can be used to transfer calls, hang up calls, and enter digits on the keypad. -You **do not** need to add these functions to your model's `functions` array. +You **need** to add these tools to your model's `tools` array. #### Transfer Call -When a `forwardingPhoneNumber` is present on an assistant, the assistant will be given a `transferCall` function. This function can be used to transfer the call to the `forwardingPhoneNumber`. +This function is provided when `transferCall` is included in the assistant's list of available tools (see configuration options [here](/api-reference/assistants/create#request.body.model.openai.tools.transferCall)). This function can be used to transfer the call to any of the `destinations` defined in the tool configuration (see details on destination options [here](/api-reference/assistants/create#request.body.model.openai.tools.transferCall.destinations)). ```json { @@ -22,15 +22,25 @@ When a `forwardingPhoneNumber` is present on an assistant, the assistant will be "role": "system", "content": "You are an assistant at a law firm. When the user asks to be transferred, use the transferCall function." } + ], + "tools": [ + { + "type": "transferCall". + "destinations" : { + { + "type": "number", + "number": "+16054440129" + } + } + } ] - }, - "forwardingPhoneNumber": "+16054440129" + } } ``` #### End Call -This function is provided when `endCallFunctionEnabled` is enabled on the assistant. The assistant can use this function to end the call. +This function is provided when `endCall` is included in the assistant's list of available tools (see configuration options [here](/api-reference/assistants/create#request.body.model.openai.tools.endCall)). The assistant can use this function to end the call. ```json { @@ -42,15 +52,19 @@ This function is provided when `endCallFunctionEnabled` is enabled on the assist "role": "system", "content": "You are an assistant at a law firm. If the user is being mean, use the endCall function." } + ], + "tools": [ + { + "type": "endCall" + } ] - }, - "endCallFunctionEnabled": true + } } ``` -#### Dial Keypad +#### Dial Keypad (DTMF) -This function is provided when `dialKeypadFunctionEnabled` is enabled on the assistant. The assistant will be able to enter digits on the keypad. +This function is provided when `dtmf` is included in the assistant's list of available tools (see configuration options [here](/api-reference/assistants/create#request.body.model.openai.tools.dtmf)). The assistant will be able to enter digits on the keypad. ```json { @@ -60,14 +74,18 @@ This function is provided when `dialKeypadFunctionEnabled` is enabled on the ass "messages": [ { "role": "system", - "content": "You are an assistant at a law firm. When you hit a menu, use the dialKeypad function to enter the digits." + "content": "You are an assistant at a law firm. When you hit a menu, use the dtmf function to enter the digits." + } + ], + "tools": [ + { + "type": "dtmf" } ] - }, - "dialKeypadFunctionEnabled": true + } } ``` - + ### Custom Functions The **Custom Functions** feature is being deprecated in favor of [Tools](/tools-calling). Please refer to the **Tools** section instead. We're working on a solution to migrate your existing functions over to make this a seamless transtion. @@ -111,3 +129,4 @@ At the assistant level, the `serverUrl` can be specified in the assistant config If the `serverUrl` is not defined either at the account level or the assistant level, the function call will simply be added to the chat history. This can be particularly useful when you want a function call to trigger an action on the frontend. For instance, the frontend can listen for specific function calls in the chat history and respond by updating the user interface or performing other actions. This allows for a dynamic and interactive user experience, where the frontend can react to changes in the conversation in real time. + \ No newline at end of file diff --git a/fern/docs.yml b/fern/docs.yml index d09181116..9278b679b 100644 --- a/fern/docs.yml +++ b/fern/docs.yml @@ -160,48 +160,18 @@ navigation: path: quickstart/billing.mdx - page: Code Resources path: resources.mdx - - section: Customization - contents: - - page: Provider Keys - path: customization/provider-keys.mdx - - section: Custom LLM - contents: - - page: Fine-tuned OpenAI models - path: customization/custom-llm/fine-tuned-openai-models.mdx - - page: Custom LLM - path: customization/custom-llm/using-your-server.mdx - - page: Custom LLM Tool Calling Integration - path: customization/custom-llm/tool-calling-integration.mdx - - section: Custom Voices - contents: - - page: Introduction - path: customization/custom-voices/custom-voice.mdx - - page: Elevenlabs - path: customization/custom-voices/elevenlabs.mdx - - page: PlayHT - path: customization/custom-voices/playht.mdx - - page: Tavus - path: customization/custom-voices/tavus.mdx - - page: Custom Keywords - path: customization/custom-keywords.mdx - - section: Bring your own vectors - contents: - - page: Trieve - path: customization/bring-your-own-vectors/trieve.mdx - - page: Multilingual - path: customization/multilingual.mdx - - page: JWT Authentication - path: customization/jwt-authentication.mdx - - page: Speech Configuration - path: customization/speech-configuration.mdx - section: Core Concepts contents: + - page: Prompting Guide + path: prompting-guide.mdx - section: Assistants contents: - page: Introduction path: assistants.mdx - - page: Function Calling + - page: Default Tools path: assistants/function-calling.mdx + - page: Custom Tools + path: assistants/custom-tools.mdx - page: Persistent Assistants path: assistants/persistent-assistants.mdx - page: Dynamic Variables @@ -266,14 +236,44 @@ navigation: path: advanced/sip/sip-telnyx.mdx - page: Make & GHL Integration path: GHL.mdx - - page: Tools Calling - path: tools-calling.mdx - - page: Prompting Guide - path: prompting-guide.mdx - page: Voice Fallback Plan path: voice-fallback-plan.mdx - page: OpenAI Realtime path: openai-realtime.mdx + - section: Customization + contents: + - page: Provider Keys + path: customization/provider-keys.mdx + - section: Custom LLM + contents: + - page: Fine-tuned OpenAI models + path: customization/custom-llm/fine-tuned-openai-models.mdx + - page: Custom LLM + path: customization/custom-llm/using-your-server.mdx + - page: Custom LLM Tool Calling Integration + path: customization/custom-llm/tool-calling-integration.mdx + - section: Custom Voices + contents: + - page: Introduction + path: customization/custom-voices/custom-voice.mdx + - page: Elevenlabs + path: customization/custom-voices/elevenlabs.mdx + - page: PlayHT + path: customization/custom-voices/playht.mdx + - page: Tavus + path: customization/custom-voices/tavus.mdx + - page: Custom Keywords + path: customization/custom-keywords.mdx + - section: Bring your own vectors + contents: + - page: Trieve + path: customization/bring-your-own-vectors/trieve.mdx + - page: Multilingual + path: customization/multilingual.mdx + - page: JWT Authentication + path: customization/jwt-authentication.mdx + - page: Speech Configuration + path: customization/speech-configuration.mdx - section: Glossary contents: - page: Definitions @@ -564,3 +564,5 @@ redirects: destination: "/community/appointment-scheduling" - source: "/enterprise" destination: "/enterprise/plans" + - source: "/tools-calling" + destination: "/assistants/custom-tools"