Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions fern/tools-calling.mdx → fern/assistants/custom-tools.mdx
Original file line number Diff line number Diff line change
@@ -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
---


Expand Down
53 changes: 36 additions & 17 deletions fern/assistants/function-calling.mdx
Original file line number Diff line number Diff line change
@@ -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.

<Note>You **do not** need to add these functions to your model's `functions` array.</Note>
<Note>You **need** to add these tools to your model's `tools` array.</Note>

#### 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
{
Expand All @@ -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
{
Expand All @@ -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
{
Expand All @@ -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
}
}
```

<Accordion title="Custom Functions: Deprecated">
### Custom Functions

<Warning>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.</Warning>
Expand Down Expand Up @@ -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.
</Accordion>
80 changes: 41 additions & 39 deletions fern/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -564,3 +564,5 @@ redirects:
destination: "/community/appointment-scheduling"
- source: "/enterprise"
destination: "/enterprise/plans"
- source: "/tools-calling"
destination: "/assistants/custom-tools"
Loading