You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: fern/examples/inbound-support.mdx
+14-3Lines changed: 14 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,18 +29,29 @@ As a bonus, we also want the assistant to remember by the phone number of the ca
29
29
"role": "system",
30
30
"content": "You're a technical support assistant. You're helping a customer troubleshoot their Apple device. You can ask the customer questions, and you can use the following troubleshooting guides to help the customer solve their issue: ..."
31
31
}
32
-
]
32
+
],
33
+
"tools": [
34
+
{
35
+
"type": "transferCall",
36
+
"destinations": [
37
+
{
38
+
"type": "number",
39
+
"number": "+16054440129",
40
+
"message": "I am forwarding your call to Department A. Please stay on the line."
41
+
}
42
+
]
43
+
}
44
+
]
33
45
},
34
-
"forwardingPhoneNumber": "+16054440129",
35
46
"firstMessage": "Hey, I'm an A.I. assistant for Apple. I can help you troubleshoot your Apple device. What's the issue?",
36
47
"recordingEnabled": true,
37
48
}
38
49
```
39
50
<Cardtitle="Let's break this down">
40
51
-`transcriber` - We're defining this to make sure the transcriber picks up the custom words related to our devices.
41
52
-`model` - We're using the OpenAI GPT-3.5-turbo model. It's much faster and preferred if we don't need GPT-4.
53
+
-`transferCall` tool in `model.tools` - Since we've added this, the assistant will be provided the [transferCall](/assistants#transfer-call) function to use if the caller asks to be transferred to a person.
42
54
-`messages` - We're defining the assistant's instructions for how to run the call.
43
-
-`forwardingPhoneNumber` - Since we've added this, the assistant will be provided the [transferCall](/assistants#transfer-call) function to use if the caller asks to be transferred to a person.
44
55
-`firstMessage` - This is the first message the assistant will say when the user picks up.
45
56
-`recordingEnabled` - We're recording the call so we can hear the conversation later.
Copy file name to clipboardExpand all lines: fern/examples/outbound-sales.mdx
+17-8Lines changed: 17 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,8 +28,8 @@ We want this agent to be able to call a list of leads and schedule appointments.
28
28
"content": "You're a sales agent for a Bicky Realty. You're calling a list of leads to schedule appointments to show them houses..."
29
29
}
30
30
],
31
-
"functions": [
32
-
{
31
+
"tools": [
32
+
{
33
33
"name": "bookAppointment",
34
34
"description": "Used to book the appointment.",
35
35
"parameters": {
@@ -41,14 +41,23 @@ We want this agent to be able to call a list of leads and schedule appointments.
41
41
}
42
42
}
43
43
}
44
-
}
45
-
]
44
+
}
45
+
{
46
+
"type": "transferCall",
47
+
"destinations": [
48
+
{
49
+
"type": "number",
50
+
"number": "+16054440129",
51
+
"message": "I am forwarding your call. Please stay on the line."
52
+
}
53
+
]
54
+
}
55
+
]
46
56
},
47
57
"voice": {
48
58
"provider": "openai",
49
59
"voiceId": "onyx"
50
60
},
51
-
"forwardingPhoneNumber": "+16054440129",
52
61
"voicemailMessage": "Hi, this is Jennifer from Bicky Realty. We were just calling to let you know...",
53
62
"firstMessage": "Hi, this Jennifer from Bicky Realty. We're calling to schedule an appointment to show you a house. When would be a good time for you?",
54
63
"endCallMessage": "Thanks for your time.",
@@ -60,9 +69,9 @@ We want this agent to be able to call a list of leads and schedule appointments.
60
69
- `transcriber` - We're defining this to make sure the transcriber picks up the custom word "Bicky"
61
70
- `model` - We're using the OpenAI GPT-4 model, which is better at function calling.
62
71
- `messages` - We're defining the assistant's instructions for how to run the call.
63
-
- `functions` - We're providing a bookAppointment function with a datetime parameter. The assistant can call this during the conversation to book the appointment.
72
+
- `bookAppointment` in `model.tools` - We're providing a bookAppointment function with a datetime parameter. The assistant can call this during the conversation to book the appointment.
73
+
- `transferCall` in `model.tools` - Since we've added this, the assistant will be provided the [transferCall](/assistants#transfer-call) function to use.
64
74
- `voice` - We're using the Onyx voice from OpenAI.
65
-
- `forwardingPhoneNumber` - Since we've added this, the assistant will be provided the [transferCall](/assistants#transfer-call) function to use.
66
75
- `voicemailMessage` - If the call goes to voicemail, this message will be played.
67
76
- `firstMessage` - This is the first message the assistant will say when the user picks up.
68
77
- `endCallMessage` - This is the message the assistant will deciding to hang up.
@@ -141,7 +150,7 @@ We want this agent to be able to call a list of leads and schedule appointments.
141
150
}
142
151
```
143
152
144
-
Since we also defined a `forwardingPhoneNumber`, when the user asks to speak to a human, the assistant will transfer the call to that number automatically.
153
+
Since we also defined a `transferCall` tool, when the user asks to speak to a human, the assistant will transfer the call to that number automatically.
145
154
146
155
We can then check the [Dashboard](https://dashboard.vapi.ai) to see the call logs and read the transcripts.
0 commit comments