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
@doc("To update an existing Call, you send a `PUT` request to the Call resource with a payload including an `update` command and additional nested `params`.")
28
-
@putupdate(...CallUpdateRequest):
28
+
@doc("To update an existing call, you send a `PUT` request to the Call resource with a payload including a `command` and additional nested `params`.")
29
+
@opExample(#{parameters:holdCallExample}, #{title:"Hold active call", description:"Put an active AI call on hold, pausing the conversation"})
30
+
@opExample(#{parameters:unholdCallExample}, #{title:"Unhold active call", description:"Resume an AI call that was previously put on hold"})
31
+
@opExample(#{parameters:aiMessageExample}, #{title:"Inject AI message", description:"Send a message to the AI conversation to modify behavior or add context"})
32
+
//@opExample(#{parameters: #{request: #{command: "update", params: #{id: "3fa85f64-5717-4562-b3fc-2c963f66afa6", url: "https://example.com/swml", fallback_url: "https://example.com/fallback"}}}}, #{title: "Update active call", description: "Modify an active call's behavior using new SWML instructions"})
@doc("The `calling.end` command is used to hang up a call.")
34
+
@example("calling.end")
35
+
command:"calling.end";
36
+
37
+
@doc(paramsDescription)
38
+
params: {
39
+
@doc("Set the reason why the call was hung up.")
40
+
@example("hangup")
41
+
reason?:"hangup" | "busy"
42
+
};
43
+
}
44
+
@summary("Hold call")
45
+
modelCallHoldRequest {
46
+
@doc(uuidDescription)
47
+
@example(CallIdExample)
48
+
id:uuid;
49
+
50
+
@doc("The `calling.ai_hold` command is used to hold a call.")
51
+
@example("calling.ai_hold")
52
+
command:"calling.ai_hold";
53
+
54
+
@doc(paramsDescription)
55
+
params: {}
56
+
}
57
+
58
+
@summary("Unhold call")
59
+
modelCallUnholdRequest {
60
+
@doc(uuidDescription)
61
+
@example(CallIdExample)
62
+
id:uuid;
63
+
64
+
@doc("The `calling.ai_unhold` command is used to unhold a call.")
65
+
@example("calling.ai_unhold")
66
+
command:"calling.ai_unhold";
67
+
68
+
@doc(paramsDescription)
69
+
params: {};
70
+
}
71
+
72
+
@summary("Inject AI message")
73
+
modelCallAIMessageRequest {
74
+
@doc(uuidDescription)
75
+
@example(CallIdExample)
76
+
id:uuid;
77
+
78
+
@doc("The `calling.ai_message` command is used to inject a message into the AI conversation.")
79
+
@example("calling.ai_message")
80
+
command:"calling.ai_message";
81
+
82
+
@doc(paramsDescription)
83
+
params: {
84
+
@doc("""
85
+
The role that the message is from. Each role type has a different purpose and will influence how the AI will interpret the message.
86
+
- `system`: Inject instructions or context that modify the AI's behavior mid-conversation without the caller hearing it. This could change the AI's personality, add new constraints, provide context about the conversation, or give the AI information it should know going forward.
87
+
- `user`: Inject a message as if the caller said it. This would appear in the conversation history as coming from the caller, and the AI would respond to it as if the caller just spoke it.
88
+
- `assistant`: Inject a message as if the AI said it. This would appear as an AI response in the conversation history. The AI would treat this as its own previous response when generating future replies.
89
+
""")
90
+
@example("system")
91
+
role:"system" | "user" | "assistant",
92
+
93
+
94
+
@doc("""
95
+
The text content that will be sent to the AI.
96
+
""")
97
+
@example("You are now in expert mode. Provide detailed technical responses.")
98
+
message_text:string
99
+
}
100
+
}
101
+
102
+
103
+
104
+
@summary("Create call")
20
105
modelCallCreateRequest {
106
+
@doc("The `dial` command is used to create a new call.")
107
+
@example("dial")
21
108
command:"dial";
109
+
110
+
111
+
@doc(paramsDescription)
22
112
params:CallCreateRequestAlias;
23
113
}
24
114
@@ -42,7 +132,7 @@ model CallCreateParamsBase {
42
132
43
133
}
44
134
45
-
@summary("Create a call with a URL")
135
+
@summary("Create call (URL)")
46
136
modelCallCreateParamsURLisCallCreateParamsBase {
47
137
48
138
@doc("""
@@ -54,17 +144,18 @@ model CallCreateParamsURL is CallCreateParamsBase {
54
144
55
145
}
56
146
57
-
@summary("Create a call with SWML")
147
+
@summary("Create call (SWML)")
58
148
modelCallCreateParamsSWMLisCallCreateParamsBase {
59
149
60
150
@doc("Inline SWML, passed as a string, containing SWML instructions for handling the call. Either `url` or `swml` must be included for a new call.")
61
151
@example(CallSWMLExample)
62
152
swml:string;
63
153
}
64
154
155
+
@summary("Update call")
65
156
modelCallUpdateParamsBase {
66
157
67
-
@doc("The id of an existing call.")
158
+
@doc(uuidDescription)
68
159
@example(CallIdExample)
69
160
id:string;
70
161
@@ -82,15 +173,15 @@ model CallUpdateParamsBase {
82
173
}
83
174
84
175
85
-
@summary("Update a call with SWML")
176
+
@summary("Update call (SWML)")
86
177
modelCallUpdateParamsSWMLisCallUpdateParamsBase {
87
178
88
179
@doc("Inline SWML, passed as a string, containing SWML instructions for handling the call. Either `url` or `swml` must be included for a new call.")
89
180
@example(CallSWMLExample)
90
181
swml:string;
91
182
}
92
183
93
-
@summary("Update a call with a URL")
184
+
@summary("Update call (URL)")
94
185
modelCallUpdateParamsURLisCallUpdateParamsBase {
95
186
96
187
@doc("""
@@ -102,10 +193,40 @@ model CallUpdateParamsURL is CallUpdateParamsBase {
0 commit comments