Skip to content

Commit 75f0169

Browse files
humfordskeptrunedev
authored andcommitted
VAP-2041 [Docs] Update endCall documentation to reflect changes in tools (#197)
* fix function calling guide * restructure tools sections
1 parent a5ea290 commit 75f0169

File tree

3 files changed

+80
-59
lines changed

3 files changed

+80
-59
lines changed

fern/tools-calling.mdx renamed to fern/assistants/custom-tools.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
2-
title: Tools Calling
3-
subtitle: Learn how to create and configure Tools Calling with Vapi.
4-
slug: tools-calling
2+
title: Custom Tools
3+
subtitle: Learn how to create and configure Custom Tools for use by your Vapi assistants.
4+
slug: assistants/custom-tools
55
---
66

77

fern/assistants/function-calling.mdx

Lines changed: 36 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
---
2-
title: Function Calling
3-
subtitle: 'Additional Capabilities for Your Assistants '
4-
slug: assistants/function-calling
2+
title: Default Tools
3+
subtitle: 'Adding Transfer Call, End Call, and Dial Keypad capabilities to your assistants.'
4+
slug: assistants/default-tools
55
---
66

7-
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.
7+
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.
88

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

1111
#### Transfer Call
1212

13-
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`.
13+
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)).
1414

1515
```json
1616
{
@@ -22,15 +22,25 @@ When a `forwardingPhoneNumber` is present on an assistant, the assistant will be
2222
"role": "system",
2323
"content": "You are an assistant at a law firm. When the user asks to be transferred, use the transferCall function."
2424
}
25+
],
26+
"tools": [
27+
{
28+
"type": "transferCall".
29+
"destinations" : {
30+
{
31+
"type": "number",
32+
"number": "+16054440129"
33+
}
34+
}
35+
}
2536
]
26-
},
27-
"forwardingPhoneNumber": "+16054440129"
37+
}
2838
}
2939
```
3040

3141
#### End Call
3242

33-
This function is provided when `endCallFunctionEnabled` is enabled on the assistant. The assistant can use this function to end the call.
43+
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.
3444

3545
```json
3646
{
@@ -42,15 +52,19 @@ This function is provided when `endCallFunctionEnabled` is enabled on the assist
4252
"role": "system",
4353
"content": "You are an assistant at a law firm. If the user is being mean, use the endCall function."
4454
}
55+
],
56+
"tools": [
57+
{
58+
"type": "endCall"
59+
}
4560
]
46-
},
47-
"endCallFunctionEnabled": true
61+
}
4862
}
4963
```
5064

51-
#### Dial Keypad
65+
#### Dial Keypad (DTMF)
5266

53-
This function is provided when `dialKeypadFunctionEnabled` is enabled on the assistant. The assistant will be able to enter digits on the keypad.
67+
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.
5468

5569
```json
5670
{
@@ -60,14 +74,18 @@ This function is provided when `dialKeypadFunctionEnabled` is enabled on the ass
6074
"messages": [
6175
{
6276
"role": "system",
63-
"content": "You are an assistant at a law firm. When you hit a menu, use the dialKeypad function to enter the digits."
77+
"content": "You are an assistant at a law firm. When you hit a menu, use the dtmf function to enter the digits."
78+
}
79+
],
80+
"tools": [
81+
{
82+
"type": "dtmf"
6483
}
6584
]
66-
},
67-
"dialKeypadFunctionEnabled": true
85+
}
6886
}
6987
```
70-
88+
<Accordion title="Custom Functions: Deprecated">
7189
### Custom Functions
7290

7391
<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>
@@ -111,3 +129,4 @@ At the assistant level, the `serverUrl` can be specified in the assistant config
111129
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.
112130

113131
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.
132+
</Accordion>

fern/docs.yml

Lines changed: 41 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -162,48 +162,18 @@ navigation:
162162
path: quickstart/billing.mdx
163163
- page: Code Resources
164164
path: resources.mdx
165-
- section: Customization
166-
contents:
167-
- page: Provider Keys
168-
path: customization/provider-keys.mdx
169-
- section: Custom LLM
170-
contents:
171-
- page: Fine-tuned OpenAI models
172-
path: customization/custom-llm/fine-tuned-openai-models.mdx
173-
- page: Custom LLM
174-
path: customization/custom-llm/using-your-server.mdx
175-
- page: Custom LLM Tool Calling Integration
176-
path: customization/custom-llm/tool-calling-integration.mdx
177-
- section: Custom Voices
178-
contents:
179-
- page: Introduction
180-
path: customization/custom-voices/custom-voice.mdx
181-
- page: Elevenlabs
182-
path: customization/custom-voices/elevenlabs.mdx
183-
- page: PlayHT
184-
path: customization/custom-voices/playht.mdx
185-
- page: Tavus
186-
path: customization/custom-voices/tavus.mdx
187-
- page: Custom Keywords
188-
path: customization/custom-keywords.mdx
189-
- section: Bring your own vectors
190-
contents:
191-
- page: Trieve
192-
path: customization/bring-your-own-vectors/trieve.mdx
193-
- page: Multilingual
194-
path: customization/multilingual.mdx
195-
- page: JWT Authentication
196-
path: customization/jwt-authentication.mdx
197-
- page: Speech Configuration
198-
path: customization/speech-configuration.mdx
199165
- section: Core Concepts
200166
contents:
167+
- page: Prompting Guide
168+
path: prompting-guide.mdx
201169
- section: Assistants
202170
contents:
203171
- page: Introduction
204172
path: assistants.mdx
205-
- page: Function Calling
173+
- page: Default Tools
206174
path: assistants/function-calling.mdx
175+
- page: Custom Tools
176+
path: assistants/custom-tools.mdx
207177
- page: Persistent Assistants
208178
path: assistants/persistent-assistants.mdx
209179
- page: Dynamic Variables
@@ -268,14 +238,44 @@ navigation:
268238
path: advanced/sip/sip-telnyx.mdx
269239
- page: Make & GHL Integration
270240
path: GHL.mdx
271-
- page: Tools Calling
272-
path: tools-calling.mdx
273-
- page: Prompting Guide
274-
path: prompting-guide.mdx
275241
- page: Voice Fallback Plan
276242
path: voice-fallback-plan.mdx
277243
- page: OpenAI Realtime
278244
path: openai-realtime.mdx
245+
- section: Customization
246+
contents:
247+
- page: Provider Keys
248+
path: customization/provider-keys.mdx
249+
- section: Custom LLM
250+
contents:
251+
- page: Fine-tuned OpenAI models
252+
path: customization/custom-llm/fine-tuned-openai-models.mdx
253+
- page: Custom LLM
254+
path: customization/custom-llm/using-your-server.mdx
255+
- page: Custom LLM Tool Calling Integration
256+
path: customization/custom-llm/tool-calling-integration.mdx
257+
- section: Custom Voices
258+
contents:
259+
- page: Introduction
260+
path: customization/custom-voices/custom-voice.mdx
261+
- page: Elevenlabs
262+
path: customization/custom-voices/elevenlabs.mdx
263+
- page: PlayHT
264+
path: customization/custom-voices/playht.mdx
265+
- page: Tavus
266+
path: customization/custom-voices/tavus.mdx
267+
- page: Custom Keywords
268+
path: customization/custom-keywords.mdx
269+
- section: Bring your own vectors
270+
contents:
271+
- page: Trieve
272+
path: customization/bring-your-own-vectors/trieve.mdx
273+
- page: Multilingual
274+
path: customization/multilingual.mdx
275+
- page: JWT Authentication
276+
path: customization/jwt-authentication.mdx
277+
- page: Speech Configuration
278+
path: customization/speech-configuration.mdx
279279
- section: Glossary
280280
contents:
281281
- page: Definitions
@@ -566,3 +566,5 @@ redirects:
566566
destination: "/community/appointment-scheduling"
567567
- source: "/enterprise"
568568
destination: "/enterprise/plans"
569+
- source: "/tools-calling"
570+
destination: "/assistants/custom-tools"

0 commit comments

Comments
 (0)