Skip to content

Commit 3f97e39

Browse files
committed
remove unused files
1 parent aa8ded6 commit 3f97e39

File tree

10 files changed

+270
-54
lines changed

10 files changed

+270
-54
lines changed

docs/phrase-triggers.mdx renamed to docs/action-triggers.mdx

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
---
2-
title: "[Beta] Phrase Triggers"
3-
description: "Configure Vocode actions to run based on spoken phrases by the agent"
2+
title: "Action Triggers"
3+
description: "Configure Vocode actions to run based on different triggers"
44
---
55

6+
# Phrase Triggers
7+
68
Phrase triggers allow users to more explicitly control the behavior of their agents by configuring actions to run only once a bot has spoken a particular phrase. For example, you can configure an agent to transfer a call to a human agent only after the bot has said "I will transfer now".
79

8-
# Creating a phrase trigger
10+
## Creating a phrase trigger
911

1012
You can create a phrase trigger as follows:
1113

@@ -36,7 +38,7 @@ In this example, the action that this phrase trigger is attached to will fire on
3638

3739
`"phrase_condition_type_contains"` is the only condition type supported at this time, and does not match case, so in the above example, if the bot said "Okay, you can speak to a human now", the phrase trigger would still fire.
3840

39-
# Configuring your action
41+
## Configuring your action
4042

4143
```python
4244
from vocode import (
@@ -57,7 +59,11 @@ vocode_client.agents.update_agent(
5759
)
5860
```
5961

60-
To switch back to the default behavior, use a `FunctionCallActionTrigger`.
62+
# [Default] Function Call Triggers
63+
64+
To switch back to the default behavior, use a `FunctionCallActionTrigger`. These are open ended, meaning the
65+
Agent will decide when to use the action based on its prompting. Note that is is primarily achieved via the [Prompt](/prompts)
66+
but for [External Actions](/external-actions), it is also dependent on the description field.
6167

6268
```python
6369
from vocode import FunctionCallActionTrigger

docs/actions.mdx

Lines changed: 217 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,221 @@
11
---
22
title: "Actions"
3-
description: "🚧 Under construction"
3+
description: "Give your agents the ability to execute actions"
44
---
55

6-
#
6+
Vocode agents can decide to take actions synchronously during calls. There are two ways to configure actions:
7+
8+
1. Phrase Triggers
9+
2. Function Call Triggers (default)
10+
11+
See [Action Triggers](/action-triggers) for information on how to configure triggers. Below is the list of actions that an agent can perform:
12+
13+
#### EndConversation
14+
15+
`EndConversation` allows the agent to end the call, e.g. if the user says "Goodbye!"
16+
17+
<CodeGroup>
18+
19+
```python Python
20+
vocode_client.actions.create_action(
21+
request={
22+
"type": "action_end_conversation",
23+
}
24+
)
25+
```
26+
27+
```typescript TypeScript
28+
const number = await vocode.actions.createAction({
29+
type: "action_end_conversation",
30+
});
31+
```
32+
33+
```bash cURL
34+
curl --request POST \
35+
--url https://api.vocode.dev/v1/actions/create \
36+
--header 'Content-Type: application/json' \
37+
--header 'Authorization: Bearer <API_KEY>'
38+
--data '{
39+
"type": "action_end_conversation"
40+
}'
41+
```
42+
43+
</CodeGroup>
44+
45+
#### DTMF
46+
47+
`DTMF` allows the agent to hit dial tones during a call, e.g. navigating a phone tree
48+
49+
<CodeGroup>
50+
51+
```python Python
52+
vocode_client.actions.create_action(
53+
request={
54+
"type":"action_dtmf",
55+
}
56+
)
57+
```
58+
59+
```typescript TypeScript
60+
const number = await vocode.actions.createAction({
61+
type: "action_dtmf",
62+
});
63+
```
64+
65+
```bash cURL
66+
curl --request POST \
67+
--url https://api.vocode.dev/v1/actions/create \
68+
--header 'Content-Type: application/json' \
69+
--header 'Authorization: Bearer <API_KEY>'
70+
--data '{
71+
"type": "action_dtmf"
72+
}'
73+
```
74+
75+
</CodeGroup>
76+
77+
#### TransferCall
78+
79+
`TransferCall` allows the agent to transfer the call to another phone number
80+
81+
<CodeGroup>
82+
83+
```python Python
84+
vocode_client.actions.create_action(
85+
request={
86+
"type":"action_transfer_call",
87+
"config":{
88+
"phone_number":"11234567890"
89+
}
90+
}
91+
)
92+
```
93+
94+
```typescript TypeScript
95+
const number = await vocode.actions.createAction({
96+
type: "action_transfer_call",
97+
config: {
98+
phoneNumber: "11234567890",
99+
},
100+
});
101+
```
102+
103+
```bash cURL
104+
curl --request POST \
105+
--url https://api.vocode.dev/v1/actions/create \
106+
--header 'Content-Type: application/json' \
107+
--header 'Authorization: Bearer <API_KEY>'
108+
--data '{
109+
"type": "action_transfer_call",
110+
"config": {
111+
"phone_number": "11234567890"
112+
}
113+
}'
114+
```
115+
116+
</CodeGroup>
117+
118+
You can attach these as IDs to your phone number agent as follows:
119+
120+
<CodeGroup>
121+
122+
```python Python
123+
from vocode import AgentUpdateParams
124+
125+
vocode_client.numbers.update_number(
126+
phone_number="11234567890",
127+
inbound_agent=AgentUpdateParams(
128+
actions=["<ACTION UUID>"]
129+
)
130+
)
131+
```
132+
133+
```typescript TypeScript
134+
vocode.numbers.updateNumber({
135+
phoneNumber: "11234567890",
136+
inboundAgent: {
137+
actions: ["<ACTION UUID>"],
138+
},
139+
});
140+
```
141+
142+
```bash cURL
143+
curl --request POST \
144+
--url https://api.vocode.dev/v1/numbers/update?phone_number=11234567890 \
145+
--header 'Content-Type: application/json' \
146+
--header 'Authorization: Bearer <API_KEY>'
147+
--data '{
148+
"inbound_agent": {
149+
"actions": ["<ACTION UUID>"]
150+
}
151+
}'
152+
```
153+
154+
</CodeGroup>
155+
156+
You can also add these as actions as raw payloads as follows:
157+
158+
<CodeGroup>
159+
160+
```python Python
161+
from vocode import AgentUpdateParams, TransferCallActionUpdateParams
162+
163+
vocode_client.numbers.update_number(
164+
phone_number="11234567890",
165+
inbound_agent=AgentUpdateParams(
166+
actions=[TransferCallActionUpdateParams(
167+
type="action_transfer_call",
168+
config={
169+
"phone_number":"11234567890"
170+
}
171+
)]
172+
)
173+
)
174+
```
175+
176+
```typescript TypeScript
177+
vocode.numbers.updateNumber({
178+
phoneNumber: "11234567890",
179+
inboundAgent: {
180+
actions: [
181+
{
182+
type: "action_transfer_call",
183+
config: {
184+
phoneNumber: "11234567890",
185+
},
186+
},
187+
],
188+
},
189+
});
190+
```
191+
192+
```bash cURL
193+
curl --request POST \
194+
--url https://api.vocode.dev/v1/numbers/update?phone_number=11234567890 \
195+
--header 'Content-Type: application/json' \
196+
--header 'Authorization: Bearer <API_KEY>'
197+
--data '{
198+
"inbound_agent": {
199+
"actions": [{
200+
"type": "action_transfer_call",
201+
"config": {
202+
"phone_number": "11234567890"
203+
}
204+
}]
205+
}
206+
}'
207+
```
208+
209+
</CodeGroup>
210+
211+
#### [Beta] ExternalAction
212+
213+
`ExternalAction` allows your agent communicate with an External API and include the response as context in the conversation.
214+
215+
See [External Actions](/external-actions).
216+
217+
#### [Beta] Warm Transfer
218+
219+
Allows your agent to conference in another party into the call.
220+
221+
See [Warm Transfer](/warm-transfer).

docs/agents.mdx

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,5 @@ agent behavior:
3030
- `initial_message` controls the agents first utterance.
3131
- `initial_message_delay` adds a delay to the initial message from when the call begins
3232
- `ask_if_human_present_on_idle` allows the agent to speak when there is more than 4s of silence on the call
33-
- `llm_temperature` controls the behavior of the underlying language model. Values can range from X to Y, with higher
34-
values leading to more consistent replies.
35-
36-
# Example: creating an agent
37-
38-
# Example: updating an agent
33+
- `llm_temperature` controls the behavior of the underlying language model. Values can range from 0 to 1, with higher
34+
values leading to more diverse and creative results. Lower values generate more consistent outputs.

docs/call-object.mdx

Lines changed: 0 additions & 4 deletions
This file was deleted.

docs/inbound-calls.mdx

Lines changed: 0 additions & 8 deletions
This file was deleted.

docs/mint.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,10 +192,9 @@
192192
"voices",
193193
"webhooks",
194194
"actions",
195+
"action-triggers",
195196
"conversational-dials",
196197
"retrieve-call-data",
197-
"phrase-triggers",
198-
"warm-transfer",
199198
"machine-detection",
200199
"do-not-call-detection",
201200
"bring-your-own-telephony",
@@ -206,6 +205,7 @@
206205
"group": "Beta Features",
207206
"pages": [
208207
"external-actions",
208+
"warm-transfer",
209209
"multilingual",
210210
"injecting-context",
211211
"ivr-navigation",

docs/outbound-calls.mdx

Lines changed: 0 additions & 4 deletions
This file was deleted.

docs/setting-up-webhook.mdx

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -34,21 +34,7 @@ update_response = vocode_client.agents.update_agent(
3434
## Sample webhook server
3535

3636
In order to process the result of our webhook, we can set up a simple endpoint to receive
37-
webhook messages from Vocode. In this example, our webhook server will listen for `PHONE_CALL_ENDED`
38-
events and send notifications.
39-
40-
The webhook event body looks like this
41-
42-
```python
43-
{
44-
call_id: CALL_ID,
45-
event:
46-
}
47-
```
48-
49-
```python
50-
def process_webhook(event):
51-
send_notification(event.call_id)
52-
```
37+
webhook messages from Vocode. [Webhook.site](https://webhook.site) makes it very easy to set up
38+
a sample endpoint.
5339

5440
For a full list of webhook events and other capabilities, check out our guide on [Webhooks](/webhooks).

0 commit comments

Comments
 (0)