phonic 0.32.0 → 0.32.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/cjs/BaseClient.js +2 -2
- package/dist/cjs/api/resources/agents/client/Client.d.ts +3 -0
- package/dist/cjs/api/resources/agents/client/Client.js +3 -0
- package/dist/cjs/api/resources/agents/client/requests/AgentsCreateRequest.d.ts +6 -1
- package/dist/cjs/api/resources/agents/client/requests/UpdateAgentRequest.d.ts +8 -2
- package/dist/cjs/api/resources/agents/client/requests/UpdateAgentRequest.js +2 -1
- package/dist/cjs/api/resources/agents/client/requests/UpsertAgentRequest.d.ts +1 -0
- package/dist/cjs/api/types/Agent.d.ts +7 -2
- package/dist/cjs/api/types/Agent.js +2 -1
- package/dist/cjs/api/types/ConfigOptions.d.ts +7 -2
- package/dist/cjs/api/types/ConfigOptions.js +2 -1
- package/dist/cjs/api/types/Conversation.d.ts +7 -4
- package/dist/cjs/api/types/Conversation.js +2 -1
- package/dist/cjs/api/types/CreateAgentRequest.d.ts +7 -2
- package/dist/cjs/api/types/CreateAgentRequest.js +2 -1
- package/dist/cjs/api/types/LanguageCode.d.ts +37 -4
- package/dist/cjs/api/types/LanguageCode.js +37 -4
- package/dist/cjs/api/types/OutboundCallConfig.d.ts +5 -2
- package/dist/cjs/api/types/OutboundCallConfig.js +2 -1
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.mjs +2 -2
- package/dist/esm/api/resources/agents/client/Client.d.mts +3 -0
- package/dist/esm/api/resources/agents/client/Client.mjs +3 -0
- package/dist/esm/api/resources/agents/client/requests/AgentsCreateRequest.d.mts +6 -1
- package/dist/esm/api/resources/agents/client/requests/UpdateAgentRequest.d.mts +8 -2
- package/dist/esm/api/resources/agents/client/requests/UpdateAgentRequest.mjs +2 -1
- package/dist/esm/api/resources/agents/client/requests/UpsertAgentRequest.d.mts +1 -0
- package/dist/esm/api/types/Agent.d.mts +7 -2
- package/dist/esm/api/types/Agent.mjs +2 -1
- package/dist/esm/api/types/ConfigOptions.d.mts +7 -2
- package/dist/esm/api/types/ConfigOptions.mjs +2 -1
- package/dist/esm/api/types/Conversation.d.mts +7 -4
- package/dist/esm/api/types/Conversation.mjs +2 -1
- package/dist/esm/api/types/CreateAgentRequest.d.mts +7 -2
- package/dist/esm/api/types/CreateAgentRequest.mjs +2 -1
- package/dist/esm/api/types/LanguageCode.d.mts +37 -4
- package/dist/esm/api/types/LanguageCode.mjs +37 -4
- package/dist/esm/api/types/OutboundCallConfig.d.mts +5 -2
- package/dist/esm/api/types/OutboundCallConfig.mjs +2 -1
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +3 -0
package/README.md
CHANGED
|
@@ -54,6 +54,7 @@ await client.agents.create({
|
|
|
54
54
|
audio_speed: 1,
|
|
55
55
|
background_noise_level: 0,
|
|
56
56
|
generate_welcome_message: false,
|
|
57
|
+
is_welcome_message_interruptible: true,
|
|
57
58
|
welcome_message: "Hi {{customer_name}}. How can I help you today?",
|
|
58
59
|
system_prompt: "You are an expert in {{subject}}. Be friendly, helpful and concise.",
|
|
59
60
|
template_variables: {
|
package/dist/cjs/BaseClient.js
CHANGED
|
@@ -43,8 +43,8 @@ function normalizeClientOptions(options) {
|
|
|
43
43
|
const headers = (0, headers_js_1.mergeHeaders)({
|
|
44
44
|
"X-Fern-Language": "JavaScript",
|
|
45
45
|
"X-Fern-SDK-Name": "phonic",
|
|
46
|
-
"X-Fern-SDK-Version": "0.
|
|
47
|
-
"User-Agent": "phonic/0.
|
|
46
|
+
"X-Fern-SDK-Version": "0.32.1",
|
|
47
|
+
"User-Agent": "phonic/0.32.1",
|
|
48
48
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
49
49
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
50
50
|
}, options === null || options === void 0 ? void 0 : options.headers);
|
|
@@ -45,6 +45,7 @@ export declare class AgentsClient {
|
|
|
45
45
|
* audio_speed: 1,
|
|
46
46
|
* background_noise_level: 0,
|
|
47
47
|
* generate_welcome_message: false,
|
|
48
|
+
* is_welcome_message_interruptible: true,
|
|
48
49
|
* welcome_message: "Hi {{customer_name}}. How can I help you today?",
|
|
49
50
|
* system_prompt: "You are an expert in {{subject}}. Be friendly, helpful and concise.",
|
|
50
51
|
* template_variables: {
|
|
@@ -99,6 +100,7 @@ export declare class AgentsClient {
|
|
|
99
100
|
* audio_speed: 1,
|
|
100
101
|
* background_noise_level: 0,
|
|
101
102
|
* generate_welcome_message: false,
|
|
103
|
+
* is_welcome_message_interruptible: true,
|
|
102
104
|
* welcome_message: "Hi {{customer_name}}. How can I help you today?",
|
|
103
105
|
* system_prompt: "You are an expert in {{subject}}. Be friendly, helpful and concise.",
|
|
104
106
|
* template_variables: {
|
|
@@ -189,6 +191,7 @@ export declare class AgentsClient {
|
|
|
189
191
|
* audio_speed: 1,
|
|
190
192
|
* background_noise_level: 0,
|
|
191
193
|
* generate_welcome_message: false,
|
|
194
|
+
* is_welcome_message_interruptible: true,
|
|
192
195
|
* welcome_message: "Hi {{customer_name}}. How can I help you today?",
|
|
193
196
|
* system_prompt: "You are an expert in {{subject}}. Be friendly, helpful and concise.",
|
|
194
197
|
* template_variables: {
|
|
@@ -143,6 +143,7 @@ class AgentsClient {
|
|
|
143
143
|
* audio_speed: 1,
|
|
144
144
|
* background_noise_level: 0,
|
|
145
145
|
* generate_welcome_message: false,
|
|
146
|
+
* is_welcome_message_interruptible: true,
|
|
146
147
|
* welcome_message: "Hi {{customer_name}}. How can I help you today?",
|
|
147
148
|
* system_prompt: "You are an expert in {{subject}}. Be friendly, helpful and concise.",
|
|
148
149
|
* template_variables: {
|
|
@@ -246,6 +247,7 @@ class AgentsClient {
|
|
|
246
247
|
* audio_speed: 1,
|
|
247
248
|
* background_noise_level: 0,
|
|
248
249
|
* generate_welcome_message: false,
|
|
250
|
+
* is_welcome_message_interruptible: true,
|
|
249
251
|
* welcome_message: "Hi {{customer_name}}. How can I help you today?",
|
|
250
252
|
* system_prompt: "You are an expert in {{subject}}. Be friendly, helpful and concise.",
|
|
251
253
|
* template_variables: {
|
|
@@ -465,6 +467,7 @@ class AgentsClient {
|
|
|
465
467
|
* audio_speed: 1,
|
|
466
468
|
* background_noise_level: 0,
|
|
467
469
|
* generate_welcome_message: false,
|
|
470
|
+
* is_welcome_message_interruptible: true,
|
|
468
471
|
* welcome_message: "Hi {{customer_name}}. How can I help you today?",
|
|
469
472
|
* system_prompt: "You are an expert in {{subject}}. Be friendly, helpful and concise.",
|
|
470
473
|
* template_variables: {
|
|
@@ -10,6 +10,7 @@ import type * as Phonic from "../../../../index.js";
|
|
|
10
10
|
* audio_speed: 1,
|
|
11
11
|
* background_noise_level: 0,
|
|
12
12
|
* generate_welcome_message: false,
|
|
13
|
+
* is_welcome_message_interruptible: true,
|
|
13
14
|
* welcome_message: "Hi {{customer_name}}. How can I help you today?",
|
|
14
15
|
* system_prompt: "You are an expert in {{subject}}. Be friendly, helpful and concise.",
|
|
15
16
|
* template_variables: {
|
|
@@ -68,6 +69,8 @@ export interface AgentsCreateRequest {
|
|
|
68
69
|
background_noise?: Phonic.CreateAgentRequest.BackgroundNoise | null;
|
|
69
70
|
/** When `true`, the welcome message will be automatically generated and the `welcome_message` field will be ignored. */
|
|
70
71
|
generate_welcome_message?: boolean;
|
|
72
|
+
/** When `false`, the welcome message will not be interruptible by the user. */
|
|
73
|
+
is_welcome_message_interruptible?: boolean;
|
|
71
74
|
/** Message to play when the conversation starts. Can contain template variables like `{{customer_name}}`. Ignored when `generate_welcome_message` is `true`. */
|
|
72
75
|
welcome_message?: string;
|
|
73
76
|
/** Instructions for the conversation. Can contain template variables like `{{subject}}`. */
|
|
@@ -92,7 +95,7 @@ export interface AgentsCreateRequest {
|
|
|
92
95
|
additional_languages?: Phonic.LanguageCode[];
|
|
93
96
|
/** Array of ISO 639-1 language codes that the agent should be able to recognize. This field is deprecated. Use `default_language` and `additional_languages` instead. */
|
|
94
97
|
languages?: Phonic.LanguageCode[];
|
|
95
|
-
/** If `"auto"`, each user audio is automatically identified for the language to respond in. If `"request"`, user must request to change language (recommended). */
|
|
98
|
+
/** If `"auto"`, each user audio is automatically identified for the language to respond in. If `"request"`, user must request to change language (recommended). If `"initial"` the first turn user audio determines the language for the rest of the conversation. */
|
|
96
99
|
multilingual_mode?: Phonic.CreateAgentRequest.MultilingualMode;
|
|
97
100
|
/** Push to talk mode. User must send mute/unmute messages to turn on/off listening to audio. Defaults to false. */
|
|
98
101
|
push_to_talk?: boolean;
|
|
@@ -116,4 +119,6 @@ export interface AgentsCreateRequest {
|
|
|
116
119
|
vad_min_silence_duration_ms?: number;
|
|
117
120
|
/** Voice activity detection threshold. */
|
|
118
121
|
vad_threshold?: number;
|
|
122
|
+
/** When `true`, PII and PHI are redacted from text transcripts (e.g. replaced with tags like `[PHONE NUMBER]`) and bleeped from audio recordings after the conversation ends. */
|
|
123
|
+
enable_redaction?: boolean;
|
|
119
124
|
}
|
|
@@ -10,6 +10,7 @@ import type * as Phonic from "../../../../index.js";
|
|
|
10
10
|
* audio_speed: 1,
|
|
11
11
|
* background_noise_level: 0,
|
|
12
12
|
* generate_welcome_message: false,
|
|
13
|
+
* is_welcome_message_interruptible: true,
|
|
13
14
|
* welcome_message: "Hi {{customer_name}}. How can I help you today?",
|
|
14
15
|
* system_prompt: "You are an expert in {{subject}}. Be friendly, helpful and concise.",
|
|
15
16
|
* template_variables: {
|
|
@@ -68,6 +69,8 @@ export interface UpdateAgentRequest {
|
|
|
68
69
|
background_noise?: UpdateAgentRequest.BackgroundNoise | null;
|
|
69
70
|
/** When `true`, the welcome message will be automatically generated and the `welcome_message` field will be ignored. */
|
|
70
71
|
generate_welcome_message?: boolean;
|
|
72
|
+
/** When `false`, the welcome message will not be interruptible by the user. */
|
|
73
|
+
is_welcome_message_interruptible?: boolean;
|
|
71
74
|
/** Message to play when the conversation starts. Can contain template variables like `{{customer_name}}`. Ignored when `generate_welcome_message` is `true`. */
|
|
72
75
|
welcome_message?: string;
|
|
73
76
|
/** Instructions for the conversation. Can contain template variables like `{{subject}}`. */
|
|
@@ -92,7 +95,7 @@ export interface UpdateAgentRequest {
|
|
|
92
95
|
additional_languages?: Phonic.LanguageCode[];
|
|
93
96
|
/** Array of ISO 639-1 language codes that the agent should be able to recognize. This field is deprecated. Use `default_language` and `additional_languages` instead. */
|
|
94
97
|
languages?: Phonic.LanguageCode[];
|
|
95
|
-
/** If `"auto"`, each user audio is automatically identified for the language to respond in. If `"request"`, user must request to change language (recommended). */
|
|
98
|
+
/** If `"auto"`, each user audio is automatically identified for the language to respond in. If `"request"`, user must request to change language (recommended). If `"initial"` the first turn user audio determines the language for the rest of the conversation. */
|
|
96
99
|
multilingual_mode?: UpdateAgentRequest.MultilingualMode;
|
|
97
100
|
/** Push to talk mode. User must send mute/unmute messages to turn on/off listening to audio. Defaults to false. */
|
|
98
101
|
push_to_talk?: boolean;
|
|
@@ -116,6 +119,8 @@ export interface UpdateAgentRequest {
|
|
|
116
119
|
vad_min_silence_duration_ms?: number;
|
|
117
120
|
/** Voice activity detection threshold. */
|
|
118
121
|
vad_threshold?: number;
|
|
122
|
+
/** When `true`, PII and PHI are redacted from text transcripts (e.g. replaced with tags like `[PHONE NUMBER]`) and bleeped from audio recordings after the conversation ends. */
|
|
123
|
+
enable_redaction?: boolean;
|
|
119
124
|
}
|
|
120
125
|
export declare namespace UpdateAgentRequest {
|
|
121
126
|
const PhoneNumber: {
|
|
@@ -151,10 +156,11 @@ export declare namespace UpdateAgentRequest {
|
|
|
151
156
|
* Custom tool */
|
|
152
157
|
| string;
|
|
153
158
|
}
|
|
154
|
-
/** If `"auto"`, each user audio is automatically identified for the language to respond in. If `"request"`, user must request to change language (recommended). */
|
|
159
|
+
/** If `"auto"`, each user audio is automatically identified for the language to respond in. If `"request"`, user must request to change language (recommended). If `"initial"` the first turn user audio determines the language for the rest of the conversation. */
|
|
155
160
|
const MultilingualMode: {
|
|
156
161
|
readonly Auto: "auto";
|
|
157
162
|
readonly Request: "request";
|
|
163
|
+
readonly Initial: "initial";
|
|
158
164
|
};
|
|
159
165
|
type MultilingualMode = (typeof MultilingualMode)[keyof typeof MultilingualMode];
|
|
160
166
|
type PronunciationDictionary = PronunciationDictionary.Item[];
|
|
@@ -21,9 +21,10 @@ var UpdateAgentRequest;
|
|
|
21
21
|
CallCenter: "call-center",
|
|
22
22
|
CoffeeShop: "coffee-shop",
|
|
23
23
|
};
|
|
24
|
-
/** If `"auto"`, each user audio is automatically identified for the language to respond in. If `"request"`, user must request to change language (recommended). */
|
|
24
|
+
/** If `"auto"`, each user audio is automatically identified for the language to respond in. If `"request"`, user must request to change language (recommended). If `"initial"` the first turn user audio determines the language for the rest of the conversation. */
|
|
25
25
|
UpdateAgentRequest.MultilingualMode = {
|
|
26
26
|
Auto: "auto",
|
|
27
27
|
Request: "request",
|
|
28
|
+
Initial: "initial",
|
|
28
29
|
};
|
|
29
30
|
})(UpdateAgentRequest || (exports.UpdateAgentRequest = UpdateAgentRequest = {}));
|
|
@@ -10,6 +10,7 @@ import type * as Phonic from "../../../../index.js";
|
|
|
10
10
|
* audio_speed: 1,
|
|
11
11
|
* background_noise_level: 0,
|
|
12
12
|
* generate_welcome_message: false,
|
|
13
|
+
* is_welcome_message_interruptible: true,
|
|
13
14
|
* welcome_message: "Hi {{customer_name}}. How can I help you today?",
|
|
14
15
|
* system_prompt: "You are an expert in {{subject}}. Be friendly, helpful and concise.",
|
|
15
16
|
* template_variables: {
|
|
@@ -24,6 +24,8 @@ export interface Agent {
|
|
|
24
24
|
background_noise: Agent.BackgroundNoise | null;
|
|
25
25
|
/** When `true`, the welcome message will be automatically generated and the `welcome_message` field will be ignored. */
|
|
26
26
|
generate_welcome_message: boolean;
|
|
27
|
+
/** When `false`, the welcome message will not be interruptible by the user. */
|
|
28
|
+
is_welcome_message_interruptible: boolean;
|
|
27
29
|
/** Message to play when the conversation starts. Ignored when `generate_welcome_message` is `true`. */
|
|
28
30
|
welcome_message: string | null;
|
|
29
31
|
/** Instructions for the conversation. */
|
|
@@ -48,7 +50,7 @@ export interface Agent {
|
|
|
48
50
|
additional_languages: Phonic.LanguageCode[];
|
|
49
51
|
/** Array of ISO 639-1 language codes that the agent should be able to recognize. This field is deprecated. Use `default_language` and `additional_languages` instead. */
|
|
50
52
|
languages?: Phonic.LanguageCode[] | undefined;
|
|
51
|
-
/** If `"auto"`, each user audio is automatically identified for the language to respond in. If `"request"`, user must request to change language (recommended). */
|
|
53
|
+
/** If `"auto"`, each user audio is automatically identified for the language to respond in. If `"request"`, user must request to change language (recommended). If `"initial"` the first turn user audio determines the language for the rest of the conversation. */
|
|
52
54
|
multilingual_mode: Agent.MultilingualMode;
|
|
53
55
|
/** Push to talk mode. User must send mute/unmute messages to turn on/off listening to audio. Defaults to false. */
|
|
54
56
|
push_to_talk: boolean;
|
|
@@ -72,6 +74,8 @@ export interface Agent {
|
|
|
72
74
|
vad_min_silence_duration_ms?: number | undefined;
|
|
73
75
|
/** Voice activity detection threshold. */
|
|
74
76
|
vad_threshold?: number | undefined;
|
|
77
|
+
/** When `true`, PII and PHI are redacted from text transcripts (e.g. replaced with tags like `[PHONE NUMBER]`) and bleeped from audio recordings after the conversation ends. */
|
|
78
|
+
enable_redaction?: boolean | undefined;
|
|
75
79
|
}
|
|
76
80
|
export declare namespace Agent {
|
|
77
81
|
/**
|
|
@@ -108,10 +112,11 @@ export declare namespace Agent {
|
|
|
108
112
|
* Custom tool */
|
|
109
113
|
| string;
|
|
110
114
|
}
|
|
111
|
-
/** If `"auto"`, each user audio is automatically identified for the language to respond in. If `"request"`, user must request to change language (recommended). */
|
|
115
|
+
/** If `"auto"`, each user audio is automatically identified for the language to respond in. If `"request"`, user must request to change language (recommended). If `"initial"` the first turn user audio determines the language for the rest of the conversation. */
|
|
112
116
|
const MultilingualMode: {
|
|
113
117
|
readonly Auto: "auto";
|
|
114
118
|
readonly Request: "request";
|
|
119
|
+
readonly Initial: "initial";
|
|
115
120
|
};
|
|
116
121
|
type MultilingualMode = (typeof MultilingualMode)[keyof typeof MultilingualMode];
|
|
117
122
|
type PronunciationDictionary = PronunciationDictionary.Item[];
|
|
@@ -17,9 +17,10 @@ var Agent;
|
|
|
17
17
|
CallCenter: "call-center",
|
|
18
18
|
CoffeeShop: "coffee-shop",
|
|
19
19
|
};
|
|
20
|
-
/** If `"auto"`, each user audio is automatically identified for the language to respond in. If `"request"`, user must request to change language (recommended). */
|
|
20
|
+
/** If `"auto"`, each user audio is automatically identified for the language to respond in. If `"request"`, user must request to change language (recommended). If `"initial"` the first turn user audio determines the language for the rest of the conversation. */
|
|
21
21
|
Agent.MultilingualMode = {
|
|
22
22
|
Auto: "auto",
|
|
23
23
|
Request: "request",
|
|
24
|
+
Initial: "initial",
|
|
24
25
|
};
|
|
25
26
|
})(Agent || (exports.Agent = Agent = {}));
|
|
@@ -19,6 +19,8 @@ export interface ConfigOptions {
|
|
|
19
19
|
background_noise?: (ConfigOptions.BackgroundNoise | null) | undefined;
|
|
20
20
|
/** When `true`, the welcome message will be automatically generated and the `welcome_message` field will be ignored. */
|
|
21
21
|
generate_welcome_message?: boolean | undefined;
|
|
22
|
+
/** When `false`, the welcome message will not be interruptible by the user. */
|
|
23
|
+
is_welcome_message_interruptible?: boolean | undefined;
|
|
22
24
|
/** Message to play when conversation starts. Ignored when `generate_welcome_message` is `true`. */
|
|
23
25
|
welcome_message?: (string | null) | undefined;
|
|
24
26
|
/** Voice ID to use for speech synthesis */
|
|
@@ -49,7 +51,7 @@ export interface ConfigOptions {
|
|
|
49
51
|
default_language?: string | undefined;
|
|
50
52
|
/** Array of additional ISO 639-1 language codes that the agent should be able to recognize and speak. Should not include `default_language`. */
|
|
51
53
|
additional_languages?: string[] | undefined;
|
|
52
|
-
/** If `"auto"`, each user audio is automatically identified for the language to respond in. If `"request"`, user must request to change language (recommended). */
|
|
54
|
+
/** If `"auto"`, each user audio is automatically identified for the language to respond in. If `"request"`, user must request to change language (recommended). If `"initial"` the first turn user audio determines the language for the rest of the conversation. */
|
|
53
55
|
multilingual_mode?: ConfigOptions.MultilingualMode | undefined;
|
|
54
56
|
/** Push to talk mode. User must send mute/unmute messages to turn on/off listening to audio. Defaults to false. */
|
|
55
57
|
push_to_talk?: boolean | undefined;
|
|
@@ -61,6 +63,8 @@ export interface ConfigOptions {
|
|
|
61
63
|
tools?: Phonic.ToolDefinition[] | undefined;
|
|
62
64
|
/** Template variables for system prompt and welcome message */
|
|
63
65
|
template_variables?: Record<string, string> | undefined;
|
|
66
|
+
/** When `true`, PII and PHI are redacted from text transcripts (e.g. replaced with tags like `[PHONE NUMBER]`) and bleeped from audio recordings after the conversation ends. */
|
|
67
|
+
enable_redaction?: boolean | undefined;
|
|
64
68
|
}
|
|
65
69
|
export declare namespace ConfigOptions {
|
|
66
70
|
/** Background noise type for the conversation */
|
|
@@ -86,10 +90,11 @@ export declare namespace ConfigOptions {
|
|
|
86
90
|
readonly Mulaw8000: "mulaw_8000";
|
|
87
91
|
};
|
|
88
92
|
type OutputFormat = (typeof OutputFormat)[keyof typeof OutputFormat];
|
|
89
|
-
/** If `"auto"`, each user audio is automatically identified for the language to respond in. If `"request"`, user must request to change language (recommended). */
|
|
93
|
+
/** If `"auto"`, each user audio is automatically identified for the language to respond in. If `"request"`, user must request to change language (recommended). If `"initial"` the first turn user audio determines the language for the rest of the conversation. */
|
|
90
94
|
const MultilingualMode: {
|
|
91
95
|
readonly Auto: "auto";
|
|
92
96
|
readonly Request: "request";
|
|
97
|
+
readonly Initial: "initial";
|
|
93
98
|
};
|
|
94
99
|
type MultilingualMode = (typeof MultilingualMode)[keyof typeof MultilingualMode];
|
|
95
100
|
type PronunciationDictionary = PronunciationDictionary.Item[];
|
|
@@ -24,9 +24,10 @@ var ConfigOptions;
|
|
|
24
24
|
Pcm8000: "pcm_8000",
|
|
25
25
|
Mulaw8000: "mulaw_8000",
|
|
26
26
|
};
|
|
27
|
-
/** If `"auto"`, each user audio is automatically identified for the language to respond in. If `"request"`, user must request to change language (recommended). */
|
|
27
|
+
/** If `"auto"`, each user audio is automatically identified for the language to respond in. If `"request"`, user must request to change language (recommended). If `"initial"` the first turn user audio determines the language for the rest of the conversation. */
|
|
28
28
|
ConfigOptions.MultilingualMode = {
|
|
29
29
|
Auto: "auto",
|
|
30
30
|
Request: "request",
|
|
31
|
+
Initial: "initial",
|
|
31
32
|
};
|
|
32
33
|
})(ConfigOptions || (exports.ConfigOptions = ConfigOptions = {}));
|
|
@@ -16,6 +16,8 @@ export interface Conversation {
|
|
|
16
16
|
model: string;
|
|
17
17
|
/** Will be `true` if welcome message was automatically generated. */
|
|
18
18
|
generate_welcome_message: boolean;
|
|
19
|
+
/** When `false`, the welcome message will not be interruptible by the user. */
|
|
20
|
+
is_welcome_message_interruptible: boolean;
|
|
19
21
|
/** Welcome message played at start. Will be `null` when `generate_welcome_message` is `true`. */
|
|
20
22
|
welcome_message: string | null;
|
|
21
23
|
/** Template variables used in the conversation. */
|
|
@@ -51,10 +53,10 @@ export interface Conversation {
|
|
|
51
53
|
/** Minimum number of words required to interrupt the assistant. */
|
|
52
54
|
min_words_to_interrupt: number;
|
|
53
55
|
/** ISO 639-1 language code that sets the agent's default language to recognize and speak. Welcome message and no input poke text should be in this language. */
|
|
54
|
-
default_language:
|
|
56
|
+
default_language: Phonic.LanguageCode;
|
|
55
57
|
/** Array of additional ISO 639-1 language codes that the agent should be able to recognize and speak. Should not include `default_language`. */
|
|
56
|
-
additional_languages:
|
|
57
|
-
/** If `"auto"`, each user audio is automatically identified for the language to respond in. If `"request"`, user must request to change language (recommended). */
|
|
58
|
+
additional_languages: Phonic.LanguageCode[] | null;
|
|
59
|
+
/** If `"auto"`, each user audio is automatically identified for the language to respond in. If `"request"`, user must request to change language (recommended). If `"initial"` the first turn user audio determines the language for the rest of the conversation. */
|
|
58
60
|
multilingual_mode: Conversation.MultilingualMode;
|
|
59
61
|
/** Push to talk mode. User must send mute/unmute messages to turn on/off listening to audio. Defaults to false. */
|
|
60
62
|
push_to_talk: boolean;
|
|
@@ -138,10 +140,11 @@ export declare namespace Conversation {
|
|
|
138
140
|
pronunciation: string;
|
|
139
141
|
}
|
|
140
142
|
}
|
|
141
|
-
/** If `"auto"`, each user audio is automatically identified for the language to respond in. If `"request"`, user must request to change language (recommended). */
|
|
143
|
+
/** If `"auto"`, each user audio is automatically identified for the language to respond in. If `"request"`, user must request to change language (recommended). If `"initial"` the first turn user audio determines the language for the rest of the conversation. */
|
|
142
144
|
const MultilingualMode: {
|
|
143
145
|
readonly Auto: "auto";
|
|
144
146
|
readonly Request: "request";
|
|
147
|
+
readonly Initial: "initial";
|
|
145
148
|
};
|
|
146
149
|
type MultilingualMode = (typeof MultilingualMode)[keyof typeof MultilingualMode];
|
|
147
150
|
/**
|
|
@@ -26,9 +26,10 @@ var Conversation;
|
|
|
26
26
|
Assistant: "assistant",
|
|
27
27
|
Error: "error",
|
|
28
28
|
};
|
|
29
|
-
/** If `"auto"`, each user audio is automatically identified for the language to respond in. If `"request"`, user must request to change language (recommended). */
|
|
29
|
+
/** If `"auto"`, each user audio is automatically identified for the language to respond in. If `"request"`, user must request to change language (recommended). If `"initial"` the first turn user audio determines the language for the rest of the conversation. */
|
|
30
30
|
Conversation.MultilingualMode = {
|
|
31
31
|
Auto: "auto",
|
|
32
32
|
Request: "request",
|
|
33
|
+
Initial: "initial",
|
|
33
34
|
};
|
|
34
35
|
})(Conversation || (exports.Conversation = Conversation = {}));
|
|
@@ -22,6 +22,8 @@ export interface CreateAgentRequest {
|
|
|
22
22
|
background_noise?: (CreateAgentRequest.BackgroundNoise | null) | undefined;
|
|
23
23
|
/** When `true`, the welcome message will be automatically generated and the `welcome_message` field will be ignored. */
|
|
24
24
|
generate_welcome_message?: boolean | undefined;
|
|
25
|
+
/** When `false`, the welcome message will not be interruptible by the user. */
|
|
26
|
+
is_welcome_message_interruptible?: boolean | undefined;
|
|
25
27
|
/** Message to play when the conversation starts. Can contain template variables like `{{customer_name}}`. Ignored when `generate_welcome_message` is `true`. */
|
|
26
28
|
welcome_message?: string | undefined;
|
|
27
29
|
/** Instructions for the conversation. Can contain template variables like `{{subject}}`. */
|
|
@@ -46,7 +48,7 @@ export interface CreateAgentRequest {
|
|
|
46
48
|
additional_languages?: Phonic.LanguageCode[] | undefined;
|
|
47
49
|
/** Array of ISO 639-1 language codes that the agent should be able to recognize. This field is deprecated. Use `default_language` and `additional_languages` instead. */
|
|
48
50
|
languages?: Phonic.LanguageCode[] | undefined;
|
|
49
|
-
/** If `"auto"`, each user audio is automatically identified for the language to respond in. If `"request"`, user must request to change language (recommended). */
|
|
51
|
+
/** If `"auto"`, each user audio is automatically identified for the language to respond in. If `"request"`, user must request to change language (recommended). If `"initial"` the first turn user audio determines the language for the rest of the conversation. */
|
|
50
52
|
multilingual_mode?: CreateAgentRequest.MultilingualMode | undefined;
|
|
51
53
|
/** Push to talk mode. User must send mute/unmute messages to turn on/off listening to audio. Defaults to false. */
|
|
52
54
|
push_to_talk?: boolean | undefined;
|
|
@@ -70,6 +72,8 @@ export interface CreateAgentRequest {
|
|
|
70
72
|
vad_min_silence_duration_ms?: number | undefined;
|
|
71
73
|
/** Voice activity detection threshold. */
|
|
72
74
|
vad_threshold?: number | undefined;
|
|
75
|
+
/** When `true`, PII and PHI are redacted from text transcripts (e.g. replaced with tags like `[PHONE NUMBER]`) and bleeped from audio recordings after the conversation ends. */
|
|
76
|
+
enable_redaction?: boolean | undefined;
|
|
73
77
|
}
|
|
74
78
|
export declare namespace CreateAgentRequest {
|
|
75
79
|
const PhoneNumber: {
|
|
@@ -105,10 +109,11 @@ export declare namespace CreateAgentRequest {
|
|
|
105
109
|
* Custom tool */
|
|
106
110
|
| string;
|
|
107
111
|
}
|
|
108
|
-
/** If `"auto"`, each user audio is automatically identified for the language to respond in. If `"request"`, user must request to change language (recommended). */
|
|
112
|
+
/** If `"auto"`, each user audio is automatically identified for the language to respond in. If `"request"`, user must request to change language (recommended). If `"initial"` the first turn user audio determines the language for the rest of the conversation. */
|
|
109
113
|
const MultilingualMode: {
|
|
110
114
|
readonly Auto: "auto";
|
|
111
115
|
readonly Request: "request";
|
|
116
|
+
readonly Initial: "initial";
|
|
112
117
|
};
|
|
113
118
|
type MultilingualMode = (typeof MultilingualMode)[keyof typeof MultilingualMode];
|
|
114
119
|
type PronunciationDictionary = PronunciationDictionary.Item[];
|
|
@@ -21,9 +21,10 @@ var CreateAgentRequest;
|
|
|
21
21
|
CallCenter: "call-center",
|
|
22
22
|
CoffeeShop: "coffee-shop",
|
|
23
23
|
};
|
|
24
|
-
/** If `"auto"`, each user audio is automatically identified for the language to respond in. If `"request"`, user must request to change language (recommended). */
|
|
24
|
+
/** If `"auto"`, each user audio is automatically identified for the language to respond in. If `"request"`, user must request to change language (recommended). If `"initial"` the first turn user audio determines the language for the rest of the conversation. */
|
|
25
25
|
CreateAgentRequest.MultilingualMode = {
|
|
26
26
|
Auto: "auto",
|
|
27
27
|
Request: "request",
|
|
28
|
+
Initial: "initial",
|
|
28
29
|
};
|
|
29
30
|
})(CreateAgentRequest || (exports.CreateAgentRequest = CreateAgentRequest = {}));
|
|
@@ -1,23 +1,56 @@
|
|
|
1
1
|
/** ISO 639-1 language codes supported by the agent */
|
|
2
2
|
export declare const LanguageCode: {
|
|
3
3
|
readonly Ar: "ar";
|
|
4
|
-
readonly
|
|
4
|
+
readonly Az: "az";
|
|
5
|
+
readonly Bg: "bg";
|
|
6
|
+
readonly Bn: "bn";
|
|
5
7
|
readonly Cs: "cs";
|
|
6
8
|
readonly Da: "da";
|
|
7
|
-
readonly
|
|
9
|
+
readonly De: "de";
|
|
10
|
+
readonly El: "el";
|
|
8
11
|
readonly En: "en";
|
|
12
|
+
readonly Es: "es";
|
|
13
|
+
readonly Fa: "fa";
|
|
14
|
+
readonly Fi: "fi";
|
|
15
|
+
readonly Fil: "fil";
|
|
9
16
|
readonly Fr: "fr";
|
|
10
|
-
readonly
|
|
17
|
+
readonly Gu: "gu";
|
|
18
|
+
readonly He: "he";
|
|
19
|
+
readonly Hi: "hi";
|
|
20
|
+
readonly Hu: "hu";
|
|
11
21
|
readonly Id: "id";
|
|
12
22
|
readonly It: "it";
|
|
13
23
|
readonly Ja: "ja";
|
|
24
|
+
readonly Ka: "ka";
|
|
25
|
+
readonly Km: "km";
|
|
26
|
+
readonly Kn: "kn";
|
|
14
27
|
readonly Ko: "ko";
|
|
28
|
+
readonly Lt: "lt";
|
|
29
|
+
readonly Lv: "lv";
|
|
30
|
+
readonly Ml: "ml";
|
|
31
|
+
readonly Mr: "mr";
|
|
32
|
+
readonly Ms: "ms";
|
|
33
|
+
readonly Ne: "ne";
|
|
34
|
+
readonly Nl: "nl";
|
|
35
|
+
readonly No: "no";
|
|
36
|
+
readonly Pa: "pa";
|
|
15
37
|
readonly Pl: "pl";
|
|
16
38
|
readonly Pt: "pt";
|
|
39
|
+
readonly Ro: "ro";
|
|
17
40
|
readonly Ru: "ru";
|
|
18
|
-
readonly
|
|
41
|
+
readonly Si: "si";
|
|
42
|
+
readonly Sk: "sk";
|
|
43
|
+
readonly Sq: "sq";
|
|
19
44
|
readonly Sv: "sv";
|
|
45
|
+
readonly Sw: "sw";
|
|
46
|
+
readonly Ta: "ta";
|
|
47
|
+
readonly Te: "te";
|
|
48
|
+
readonly Th: "th";
|
|
20
49
|
readonly Tr: "tr";
|
|
50
|
+
readonly Uk: "uk";
|
|
51
|
+
readonly Ur: "ur";
|
|
21
52
|
readonly Vi: "vi";
|
|
53
|
+
readonly Yue: "yue";
|
|
54
|
+
readonly Zh: "zh";
|
|
22
55
|
};
|
|
23
56
|
export type LanguageCode = (typeof LanguageCode)[keyof typeof LanguageCode];
|
|
@@ -5,22 +5,55 @@ exports.LanguageCode = void 0;
|
|
|
5
5
|
/** ISO 639-1 language codes supported by the agent */
|
|
6
6
|
exports.LanguageCode = {
|
|
7
7
|
Ar: "ar",
|
|
8
|
-
|
|
8
|
+
Az: "az",
|
|
9
|
+
Bg: "bg",
|
|
10
|
+
Bn: "bn",
|
|
9
11
|
Cs: "cs",
|
|
10
12
|
Da: "da",
|
|
11
|
-
|
|
13
|
+
De: "de",
|
|
14
|
+
El: "el",
|
|
12
15
|
En: "en",
|
|
16
|
+
Es: "es",
|
|
17
|
+
Fa: "fa",
|
|
18
|
+
Fi: "fi",
|
|
19
|
+
Fil: "fil",
|
|
13
20
|
Fr: "fr",
|
|
14
|
-
|
|
21
|
+
Gu: "gu",
|
|
22
|
+
He: "he",
|
|
23
|
+
Hi: "hi",
|
|
24
|
+
Hu: "hu",
|
|
15
25
|
Id: "id",
|
|
16
26
|
It: "it",
|
|
17
27
|
Ja: "ja",
|
|
28
|
+
Ka: "ka",
|
|
29
|
+
Km: "km",
|
|
30
|
+
Kn: "kn",
|
|
18
31
|
Ko: "ko",
|
|
32
|
+
Lt: "lt",
|
|
33
|
+
Lv: "lv",
|
|
34
|
+
Ml: "ml",
|
|
35
|
+
Mr: "mr",
|
|
36
|
+
Ms: "ms",
|
|
37
|
+
Ne: "ne",
|
|
38
|
+
Nl: "nl",
|
|
39
|
+
No: "no",
|
|
40
|
+
Pa: "pa",
|
|
19
41
|
Pl: "pl",
|
|
20
42
|
Pt: "pt",
|
|
43
|
+
Ro: "ro",
|
|
21
44
|
Ru: "ru",
|
|
22
|
-
|
|
45
|
+
Si: "si",
|
|
46
|
+
Sk: "sk",
|
|
47
|
+
Sq: "sq",
|
|
23
48
|
Sv: "sv",
|
|
49
|
+
Sw: "sw",
|
|
50
|
+
Ta: "ta",
|
|
51
|
+
Te: "te",
|
|
52
|
+
Th: "th",
|
|
24
53
|
Tr: "tr",
|
|
54
|
+
Uk: "uk",
|
|
55
|
+
Ur: "ur",
|
|
25
56
|
Vi: "vi",
|
|
57
|
+
Yue: "yue",
|
|
58
|
+
Zh: "zh",
|
|
26
59
|
};
|
|
@@ -29,7 +29,7 @@ export interface OutboundCallConfig {
|
|
|
29
29
|
additional_languages?: Phonic.LanguageCode[] | undefined;
|
|
30
30
|
/** Array of ISO 639-1 language codes that the agent should be able to recognize. This field is deprecated. Use `default_language` and `additional_languages` instead. */
|
|
31
31
|
languages?: Phonic.LanguageCode[] | undefined;
|
|
32
|
-
/** If `"auto"`, each user audio is automatically identified for the language to respond in. If `"request"`, user must request to change language (recommended). */
|
|
32
|
+
/** If `"auto"`, each user audio is automatically identified for the language to respond in. If `"request"`, user must request to change language (recommended). If `"initial"` the first turn user audio determines the language for the rest of the conversation. */
|
|
33
33
|
multilingual_mode?: OutboundCallConfig.MultilingualMode | undefined;
|
|
34
34
|
/** Push to talk mode. User must send mute/unmute messages to turn on/off listening to audio. Defaults to false. */
|
|
35
35
|
push_to_talk?: boolean | undefined;
|
|
@@ -41,12 +41,15 @@ export interface OutboundCallConfig {
|
|
|
41
41
|
min_words_to_interrupt?: number | undefined;
|
|
42
42
|
/** Array of built-in or custom tool names to use. */
|
|
43
43
|
tools?: OutboundCallConfig.Tools.Item[] | undefined;
|
|
44
|
+
/** When `true`, PII and PHI are redacted from text transcripts (e.g. replaced with tags like `[PHONE NUMBER]`) and bleeped from audio recordings after the conversation ends. */
|
|
45
|
+
enable_redaction?: boolean | undefined;
|
|
44
46
|
}
|
|
45
47
|
export declare namespace OutboundCallConfig {
|
|
46
|
-
/** If `"auto"`, each user audio is automatically identified for the language to respond in. If `"request"`, user must request to change language (recommended). */
|
|
48
|
+
/** If `"auto"`, each user audio is automatically identified for the language to respond in. If `"request"`, user must request to change language (recommended). If `"initial"` the first turn user audio determines the language for the rest of the conversation. */
|
|
47
49
|
const MultilingualMode: {
|
|
48
50
|
readonly Auto: "auto";
|
|
49
51
|
readonly Request: "request";
|
|
52
|
+
readonly Initial: "initial";
|
|
50
53
|
};
|
|
51
54
|
type MultilingualMode = (typeof MultilingualMode)[keyof typeof MultilingualMode];
|
|
52
55
|
type PronunciationDictionary = PronunciationDictionary.Item[];
|
|
@@ -4,9 +4,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
4
4
|
exports.OutboundCallConfig = void 0;
|
|
5
5
|
var OutboundCallConfig;
|
|
6
6
|
(function (OutboundCallConfig) {
|
|
7
|
-
/** If `"auto"`, each user audio is automatically identified for the language to respond in. If `"request"`, user must request to change language (recommended). */
|
|
7
|
+
/** If `"auto"`, each user audio is automatically identified for the language to respond in. If `"request"`, user must request to change language (recommended). If `"initial"` the first turn user audio determines the language for the rest of the conversation. */
|
|
8
8
|
OutboundCallConfig.MultilingualMode = {
|
|
9
9
|
Auto: "auto",
|
|
10
10
|
Request: "request",
|
|
11
|
+
Initial: "initial",
|
|
11
12
|
};
|
|
12
13
|
})(OutboundCallConfig || (exports.OutboundCallConfig = OutboundCallConfig = {}));
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.
|
|
1
|
+
export declare const SDK_VERSION = "0.32.1";
|
package/dist/cjs/version.js
CHANGED
package/dist/esm/BaseClient.mjs
CHANGED
|
@@ -6,8 +6,8 @@ export function normalizeClientOptions(options) {
|
|
|
6
6
|
const headers = mergeHeaders({
|
|
7
7
|
"X-Fern-Language": "JavaScript",
|
|
8
8
|
"X-Fern-SDK-Name": "phonic",
|
|
9
|
-
"X-Fern-SDK-Version": "0.
|
|
10
|
-
"User-Agent": "phonic/0.
|
|
9
|
+
"X-Fern-SDK-Version": "0.32.1",
|
|
10
|
+
"User-Agent": "phonic/0.32.1",
|
|
11
11
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
12
12
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
13
13
|
}, options === null || options === void 0 ? void 0 : options.headers);
|
|
@@ -45,6 +45,7 @@ export declare class AgentsClient {
|
|
|
45
45
|
* audio_speed: 1,
|
|
46
46
|
* background_noise_level: 0,
|
|
47
47
|
* generate_welcome_message: false,
|
|
48
|
+
* is_welcome_message_interruptible: true,
|
|
48
49
|
* welcome_message: "Hi {{customer_name}}. How can I help you today?",
|
|
49
50
|
* system_prompt: "You are an expert in {{subject}}. Be friendly, helpful and concise.",
|
|
50
51
|
* template_variables: {
|
|
@@ -99,6 +100,7 @@ export declare class AgentsClient {
|
|
|
99
100
|
* audio_speed: 1,
|
|
100
101
|
* background_noise_level: 0,
|
|
101
102
|
* generate_welcome_message: false,
|
|
103
|
+
* is_welcome_message_interruptible: true,
|
|
102
104
|
* welcome_message: "Hi {{customer_name}}. How can I help you today?",
|
|
103
105
|
* system_prompt: "You are an expert in {{subject}}. Be friendly, helpful and concise.",
|
|
104
106
|
* template_variables: {
|
|
@@ -189,6 +191,7 @@ export declare class AgentsClient {
|
|
|
189
191
|
* audio_speed: 1,
|
|
190
192
|
* background_noise_level: 0,
|
|
191
193
|
* generate_welcome_message: false,
|
|
194
|
+
* is_welcome_message_interruptible: true,
|
|
192
195
|
* welcome_message: "Hi {{customer_name}}. How can I help you today?",
|
|
193
196
|
* system_prompt: "You are an expert in {{subject}}. Be friendly, helpful and concise.",
|
|
194
197
|
* template_variables: {
|
|
@@ -107,6 +107,7 @@ export class AgentsClient {
|
|
|
107
107
|
* audio_speed: 1,
|
|
108
108
|
* background_noise_level: 0,
|
|
109
109
|
* generate_welcome_message: false,
|
|
110
|
+
* is_welcome_message_interruptible: true,
|
|
110
111
|
* welcome_message: "Hi {{customer_name}}. How can I help you today?",
|
|
111
112
|
* system_prompt: "You are an expert in {{subject}}. Be friendly, helpful and concise.",
|
|
112
113
|
* template_variables: {
|
|
@@ -210,6 +211,7 @@ export class AgentsClient {
|
|
|
210
211
|
* audio_speed: 1,
|
|
211
212
|
* background_noise_level: 0,
|
|
212
213
|
* generate_welcome_message: false,
|
|
214
|
+
* is_welcome_message_interruptible: true,
|
|
213
215
|
* welcome_message: "Hi {{customer_name}}. How can I help you today?",
|
|
214
216
|
* system_prompt: "You are an expert in {{subject}}. Be friendly, helpful and concise.",
|
|
215
217
|
* template_variables: {
|
|
@@ -429,6 +431,7 @@ export class AgentsClient {
|
|
|
429
431
|
* audio_speed: 1,
|
|
430
432
|
* background_noise_level: 0,
|
|
431
433
|
* generate_welcome_message: false,
|
|
434
|
+
* is_welcome_message_interruptible: true,
|
|
432
435
|
* welcome_message: "Hi {{customer_name}}. How can I help you today?",
|
|
433
436
|
* system_prompt: "You are an expert in {{subject}}. Be friendly, helpful and concise.",
|
|
434
437
|
* template_variables: {
|
|
@@ -10,6 +10,7 @@ import type * as Phonic from "../../../../index.mjs";
|
|
|
10
10
|
* audio_speed: 1,
|
|
11
11
|
* background_noise_level: 0,
|
|
12
12
|
* generate_welcome_message: false,
|
|
13
|
+
* is_welcome_message_interruptible: true,
|
|
13
14
|
* welcome_message: "Hi {{customer_name}}. How can I help you today?",
|
|
14
15
|
* system_prompt: "You are an expert in {{subject}}. Be friendly, helpful and concise.",
|
|
15
16
|
* template_variables: {
|
|
@@ -68,6 +69,8 @@ export interface AgentsCreateRequest {
|
|
|
68
69
|
background_noise?: Phonic.CreateAgentRequest.BackgroundNoise | null;
|
|
69
70
|
/** When `true`, the welcome message will be automatically generated and the `welcome_message` field will be ignored. */
|
|
70
71
|
generate_welcome_message?: boolean;
|
|
72
|
+
/** When `false`, the welcome message will not be interruptible by the user. */
|
|
73
|
+
is_welcome_message_interruptible?: boolean;
|
|
71
74
|
/** Message to play when the conversation starts. Can contain template variables like `{{customer_name}}`. Ignored when `generate_welcome_message` is `true`. */
|
|
72
75
|
welcome_message?: string;
|
|
73
76
|
/** Instructions for the conversation. Can contain template variables like `{{subject}}`. */
|
|
@@ -92,7 +95,7 @@ export interface AgentsCreateRequest {
|
|
|
92
95
|
additional_languages?: Phonic.LanguageCode[];
|
|
93
96
|
/** Array of ISO 639-1 language codes that the agent should be able to recognize. This field is deprecated. Use `default_language` and `additional_languages` instead. */
|
|
94
97
|
languages?: Phonic.LanguageCode[];
|
|
95
|
-
/** If `"auto"`, each user audio is automatically identified for the language to respond in. If `"request"`, user must request to change language (recommended). */
|
|
98
|
+
/** If `"auto"`, each user audio is automatically identified for the language to respond in. If `"request"`, user must request to change language (recommended). If `"initial"` the first turn user audio determines the language for the rest of the conversation. */
|
|
96
99
|
multilingual_mode?: Phonic.CreateAgentRequest.MultilingualMode;
|
|
97
100
|
/** Push to talk mode. User must send mute/unmute messages to turn on/off listening to audio. Defaults to false. */
|
|
98
101
|
push_to_talk?: boolean;
|
|
@@ -116,4 +119,6 @@ export interface AgentsCreateRequest {
|
|
|
116
119
|
vad_min_silence_duration_ms?: number;
|
|
117
120
|
/** Voice activity detection threshold. */
|
|
118
121
|
vad_threshold?: number;
|
|
122
|
+
/** When `true`, PII and PHI are redacted from text transcripts (e.g. replaced with tags like `[PHONE NUMBER]`) and bleeped from audio recordings after the conversation ends. */
|
|
123
|
+
enable_redaction?: boolean;
|
|
119
124
|
}
|
|
@@ -10,6 +10,7 @@ import type * as Phonic from "../../../../index.mjs";
|
|
|
10
10
|
* audio_speed: 1,
|
|
11
11
|
* background_noise_level: 0,
|
|
12
12
|
* generate_welcome_message: false,
|
|
13
|
+
* is_welcome_message_interruptible: true,
|
|
13
14
|
* welcome_message: "Hi {{customer_name}}. How can I help you today?",
|
|
14
15
|
* system_prompt: "You are an expert in {{subject}}. Be friendly, helpful and concise.",
|
|
15
16
|
* template_variables: {
|
|
@@ -68,6 +69,8 @@ export interface UpdateAgentRequest {
|
|
|
68
69
|
background_noise?: UpdateAgentRequest.BackgroundNoise | null;
|
|
69
70
|
/** When `true`, the welcome message will be automatically generated and the `welcome_message` field will be ignored. */
|
|
70
71
|
generate_welcome_message?: boolean;
|
|
72
|
+
/** When `false`, the welcome message will not be interruptible by the user. */
|
|
73
|
+
is_welcome_message_interruptible?: boolean;
|
|
71
74
|
/** Message to play when the conversation starts. Can contain template variables like `{{customer_name}}`. Ignored when `generate_welcome_message` is `true`. */
|
|
72
75
|
welcome_message?: string;
|
|
73
76
|
/** Instructions for the conversation. Can contain template variables like `{{subject}}`. */
|
|
@@ -92,7 +95,7 @@ export interface UpdateAgentRequest {
|
|
|
92
95
|
additional_languages?: Phonic.LanguageCode[];
|
|
93
96
|
/** Array of ISO 639-1 language codes that the agent should be able to recognize. This field is deprecated. Use `default_language` and `additional_languages` instead. */
|
|
94
97
|
languages?: Phonic.LanguageCode[];
|
|
95
|
-
/** If `"auto"`, each user audio is automatically identified for the language to respond in. If `"request"`, user must request to change language (recommended). */
|
|
98
|
+
/** If `"auto"`, each user audio is automatically identified for the language to respond in. If `"request"`, user must request to change language (recommended). If `"initial"` the first turn user audio determines the language for the rest of the conversation. */
|
|
96
99
|
multilingual_mode?: UpdateAgentRequest.MultilingualMode;
|
|
97
100
|
/** Push to talk mode. User must send mute/unmute messages to turn on/off listening to audio. Defaults to false. */
|
|
98
101
|
push_to_talk?: boolean;
|
|
@@ -116,6 +119,8 @@ export interface UpdateAgentRequest {
|
|
|
116
119
|
vad_min_silence_duration_ms?: number;
|
|
117
120
|
/** Voice activity detection threshold. */
|
|
118
121
|
vad_threshold?: number;
|
|
122
|
+
/** When `true`, PII and PHI are redacted from text transcripts (e.g. replaced with tags like `[PHONE NUMBER]`) and bleeped from audio recordings after the conversation ends. */
|
|
123
|
+
enable_redaction?: boolean;
|
|
119
124
|
}
|
|
120
125
|
export declare namespace UpdateAgentRequest {
|
|
121
126
|
const PhoneNumber: {
|
|
@@ -151,10 +156,11 @@ export declare namespace UpdateAgentRequest {
|
|
|
151
156
|
* Custom tool */
|
|
152
157
|
| string;
|
|
153
158
|
}
|
|
154
|
-
/** If `"auto"`, each user audio is automatically identified for the language to respond in. If `"request"`, user must request to change language (recommended). */
|
|
159
|
+
/** If `"auto"`, each user audio is automatically identified for the language to respond in. If `"request"`, user must request to change language (recommended). If `"initial"` the first turn user audio determines the language for the rest of the conversation. */
|
|
155
160
|
const MultilingualMode: {
|
|
156
161
|
readonly Auto: "auto";
|
|
157
162
|
readonly Request: "request";
|
|
163
|
+
readonly Initial: "initial";
|
|
158
164
|
};
|
|
159
165
|
type MultilingualMode = (typeof MultilingualMode)[keyof typeof MultilingualMode];
|
|
160
166
|
type PronunciationDictionary = PronunciationDictionary.Item[];
|
|
@@ -18,9 +18,10 @@ export var UpdateAgentRequest;
|
|
|
18
18
|
CallCenter: "call-center",
|
|
19
19
|
CoffeeShop: "coffee-shop",
|
|
20
20
|
};
|
|
21
|
-
/** If `"auto"`, each user audio is automatically identified for the language to respond in. If `"request"`, user must request to change language (recommended). */
|
|
21
|
+
/** If `"auto"`, each user audio is automatically identified for the language to respond in. If `"request"`, user must request to change language (recommended). If `"initial"` the first turn user audio determines the language for the rest of the conversation. */
|
|
22
22
|
UpdateAgentRequest.MultilingualMode = {
|
|
23
23
|
Auto: "auto",
|
|
24
24
|
Request: "request",
|
|
25
|
+
Initial: "initial",
|
|
25
26
|
};
|
|
26
27
|
})(UpdateAgentRequest || (UpdateAgentRequest = {}));
|
|
@@ -10,6 +10,7 @@ import type * as Phonic from "../../../../index.mjs";
|
|
|
10
10
|
* audio_speed: 1,
|
|
11
11
|
* background_noise_level: 0,
|
|
12
12
|
* generate_welcome_message: false,
|
|
13
|
+
* is_welcome_message_interruptible: true,
|
|
13
14
|
* welcome_message: "Hi {{customer_name}}. How can I help you today?",
|
|
14
15
|
* system_prompt: "You are an expert in {{subject}}. Be friendly, helpful and concise.",
|
|
15
16
|
* template_variables: {
|
|
@@ -24,6 +24,8 @@ export interface Agent {
|
|
|
24
24
|
background_noise: Agent.BackgroundNoise | null;
|
|
25
25
|
/** When `true`, the welcome message will be automatically generated and the `welcome_message` field will be ignored. */
|
|
26
26
|
generate_welcome_message: boolean;
|
|
27
|
+
/** When `false`, the welcome message will not be interruptible by the user. */
|
|
28
|
+
is_welcome_message_interruptible: boolean;
|
|
27
29
|
/** Message to play when the conversation starts. Ignored when `generate_welcome_message` is `true`. */
|
|
28
30
|
welcome_message: string | null;
|
|
29
31
|
/** Instructions for the conversation. */
|
|
@@ -48,7 +50,7 @@ export interface Agent {
|
|
|
48
50
|
additional_languages: Phonic.LanguageCode[];
|
|
49
51
|
/** Array of ISO 639-1 language codes that the agent should be able to recognize. This field is deprecated. Use `default_language` and `additional_languages` instead. */
|
|
50
52
|
languages?: Phonic.LanguageCode[] | undefined;
|
|
51
|
-
/** If `"auto"`, each user audio is automatically identified for the language to respond in. If `"request"`, user must request to change language (recommended). */
|
|
53
|
+
/** If `"auto"`, each user audio is automatically identified for the language to respond in. If `"request"`, user must request to change language (recommended). If `"initial"` the first turn user audio determines the language for the rest of the conversation. */
|
|
52
54
|
multilingual_mode: Agent.MultilingualMode;
|
|
53
55
|
/** Push to talk mode. User must send mute/unmute messages to turn on/off listening to audio. Defaults to false. */
|
|
54
56
|
push_to_talk: boolean;
|
|
@@ -72,6 +74,8 @@ export interface Agent {
|
|
|
72
74
|
vad_min_silence_duration_ms?: number | undefined;
|
|
73
75
|
/** Voice activity detection threshold. */
|
|
74
76
|
vad_threshold?: number | undefined;
|
|
77
|
+
/** When `true`, PII and PHI are redacted from text transcripts (e.g. replaced with tags like `[PHONE NUMBER]`) and bleeped from audio recordings after the conversation ends. */
|
|
78
|
+
enable_redaction?: boolean | undefined;
|
|
75
79
|
}
|
|
76
80
|
export declare namespace Agent {
|
|
77
81
|
/**
|
|
@@ -108,10 +112,11 @@ export declare namespace Agent {
|
|
|
108
112
|
* Custom tool */
|
|
109
113
|
| string;
|
|
110
114
|
}
|
|
111
|
-
/** If `"auto"`, each user audio is automatically identified for the language to respond in. If `"request"`, user must request to change language (recommended). */
|
|
115
|
+
/** If `"auto"`, each user audio is automatically identified for the language to respond in. If `"request"`, user must request to change language (recommended). If `"initial"` the first turn user audio determines the language for the rest of the conversation. */
|
|
112
116
|
const MultilingualMode: {
|
|
113
117
|
readonly Auto: "auto";
|
|
114
118
|
readonly Request: "request";
|
|
119
|
+
readonly Initial: "initial";
|
|
115
120
|
};
|
|
116
121
|
type MultilingualMode = (typeof MultilingualMode)[keyof typeof MultilingualMode];
|
|
117
122
|
type PronunciationDictionary = PronunciationDictionary.Item[];
|
|
@@ -14,9 +14,10 @@ export var Agent;
|
|
|
14
14
|
CallCenter: "call-center",
|
|
15
15
|
CoffeeShop: "coffee-shop",
|
|
16
16
|
};
|
|
17
|
-
/** If `"auto"`, each user audio is automatically identified for the language to respond in. If `"request"`, user must request to change language (recommended). */
|
|
17
|
+
/** If `"auto"`, each user audio is automatically identified for the language to respond in. If `"request"`, user must request to change language (recommended). If `"initial"` the first turn user audio determines the language for the rest of the conversation. */
|
|
18
18
|
Agent.MultilingualMode = {
|
|
19
19
|
Auto: "auto",
|
|
20
20
|
Request: "request",
|
|
21
|
+
Initial: "initial",
|
|
21
22
|
};
|
|
22
23
|
})(Agent || (Agent = {}));
|
|
@@ -19,6 +19,8 @@ export interface ConfigOptions {
|
|
|
19
19
|
background_noise?: (ConfigOptions.BackgroundNoise | null) | undefined;
|
|
20
20
|
/** When `true`, the welcome message will be automatically generated and the `welcome_message` field will be ignored. */
|
|
21
21
|
generate_welcome_message?: boolean | undefined;
|
|
22
|
+
/** When `false`, the welcome message will not be interruptible by the user. */
|
|
23
|
+
is_welcome_message_interruptible?: boolean | undefined;
|
|
22
24
|
/** Message to play when conversation starts. Ignored when `generate_welcome_message` is `true`. */
|
|
23
25
|
welcome_message?: (string | null) | undefined;
|
|
24
26
|
/** Voice ID to use for speech synthesis */
|
|
@@ -49,7 +51,7 @@ export interface ConfigOptions {
|
|
|
49
51
|
default_language?: string | undefined;
|
|
50
52
|
/** Array of additional ISO 639-1 language codes that the agent should be able to recognize and speak. Should not include `default_language`. */
|
|
51
53
|
additional_languages?: string[] | undefined;
|
|
52
|
-
/** If `"auto"`, each user audio is automatically identified for the language to respond in. If `"request"`, user must request to change language (recommended). */
|
|
54
|
+
/** If `"auto"`, each user audio is automatically identified for the language to respond in. If `"request"`, user must request to change language (recommended). If `"initial"` the first turn user audio determines the language for the rest of the conversation. */
|
|
53
55
|
multilingual_mode?: ConfigOptions.MultilingualMode | undefined;
|
|
54
56
|
/** Push to talk mode. User must send mute/unmute messages to turn on/off listening to audio. Defaults to false. */
|
|
55
57
|
push_to_talk?: boolean | undefined;
|
|
@@ -61,6 +63,8 @@ export interface ConfigOptions {
|
|
|
61
63
|
tools?: Phonic.ToolDefinition[] | undefined;
|
|
62
64
|
/** Template variables for system prompt and welcome message */
|
|
63
65
|
template_variables?: Record<string, string> | undefined;
|
|
66
|
+
/** When `true`, PII and PHI are redacted from text transcripts (e.g. replaced with tags like `[PHONE NUMBER]`) and bleeped from audio recordings after the conversation ends. */
|
|
67
|
+
enable_redaction?: boolean | undefined;
|
|
64
68
|
}
|
|
65
69
|
export declare namespace ConfigOptions {
|
|
66
70
|
/** Background noise type for the conversation */
|
|
@@ -86,10 +90,11 @@ export declare namespace ConfigOptions {
|
|
|
86
90
|
readonly Mulaw8000: "mulaw_8000";
|
|
87
91
|
};
|
|
88
92
|
type OutputFormat = (typeof OutputFormat)[keyof typeof OutputFormat];
|
|
89
|
-
/** If `"auto"`, each user audio is automatically identified for the language to respond in. If `"request"`, user must request to change language (recommended). */
|
|
93
|
+
/** If `"auto"`, each user audio is automatically identified for the language to respond in. If `"request"`, user must request to change language (recommended). If `"initial"` the first turn user audio determines the language for the rest of the conversation. */
|
|
90
94
|
const MultilingualMode: {
|
|
91
95
|
readonly Auto: "auto";
|
|
92
96
|
readonly Request: "request";
|
|
97
|
+
readonly Initial: "initial";
|
|
93
98
|
};
|
|
94
99
|
type MultilingualMode = (typeof MultilingualMode)[keyof typeof MultilingualMode];
|
|
95
100
|
type PronunciationDictionary = PronunciationDictionary.Item[];
|
|
@@ -21,9 +21,10 @@ export var ConfigOptions;
|
|
|
21
21
|
Pcm8000: "pcm_8000",
|
|
22
22
|
Mulaw8000: "mulaw_8000",
|
|
23
23
|
};
|
|
24
|
-
/** If `"auto"`, each user audio is automatically identified for the language to respond in. If `"request"`, user must request to change language (recommended). */
|
|
24
|
+
/** If `"auto"`, each user audio is automatically identified for the language to respond in. If `"request"`, user must request to change language (recommended). If `"initial"` the first turn user audio determines the language for the rest of the conversation. */
|
|
25
25
|
ConfigOptions.MultilingualMode = {
|
|
26
26
|
Auto: "auto",
|
|
27
27
|
Request: "request",
|
|
28
|
+
Initial: "initial",
|
|
28
29
|
};
|
|
29
30
|
})(ConfigOptions || (ConfigOptions = {}));
|
|
@@ -16,6 +16,8 @@ export interface Conversation {
|
|
|
16
16
|
model: string;
|
|
17
17
|
/** Will be `true` if welcome message was automatically generated. */
|
|
18
18
|
generate_welcome_message: boolean;
|
|
19
|
+
/** When `false`, the welcome message will not be interruptible by the user. */
|
|
20
|
+
is_welcome_message_interruptible: boolean;
|
|
19
21
|
/** Welcome message played at start. Will be `null` when `generate_welcome_message` is `true`. */
|
|
20
22
|
welcome_message: string | null;
|
|
21
23
|
/** Template variables used in the conversation. */
|
|
@@ -51,10 +53,10 @@ export interface Conversation {
|
|
|
51
53
|
/** Minimum number of words required to interrupt the assistant. */
|
|
52
54
|
min_words_to_interrupt: number;
|
|
53
55
|
/** ISO 639-1 language code that sets the agent's default language to recognize and speak. Welcome message and no input poke text should be in this language. */
|
|
54
|
-
default_language:
|
|
56
|
+
default_language: Phonic.LanguageCode;
|
|
55
57
|
/** Array of additional ISO 639-1 language codes that the agent should be able to recognize and speak. Should not include `default_language`. */
|
|
56
|
-
additional_languages:
|
|
57
|
-
/** If `"auto"`, each user audio is automatically identified for the language to respond in. If `"request"`, user must request to change language (recommended). */
|
|
58
|
+
additional_languages: Phonic.LanguageCode[] | null;
|
|
59
|
+
/** If `"auto"`, each user audio is automatically identified for the language to respond in. If `"request"`, user must request to change language (recommended). If `"initial"` the first turn user audio determines the language for the rest of the conversation. */
|
|
58
60
|
multilingual_mode: Conversation.MultilingualMode;
|
|
59
61
|
/** Push to talk mode. User must send mute/unmute messages to turn on/off listening to audio. Defaults to false. */
|
|
60
62
|
push_to_talk: boolean;
|
|
@@ -138,10 +140,11 @@ export declare namespace Conversation {
|
|
|
138
140
|
pronunciation: string;
|
|
139
141
|
}
|
|
140
142
|
}
|
|
141
|
-
/** If `"auto"`, each user audio is automatically identified for the language to respond in. If `"request"`, user must request to change language (recommended). */
|
|
143
|
+
/** If `"auto"`, each user audio is automatically identified for the language to respond in. If `"request"`, user must request to change language (recommended). If `"initial"` the first turn user audio determines the language for the rest of the conversation. */
|
|
142
144
|
const MultilingualMode: {
|
|
143
145
|
readonly Auto: "auto";
|
|
144
146
|
readonly Request: "request";
|
|
147
|
+
readonly Initial: "initial";
|
|
145
148
|
};
|
|
146
149
|
type MultilingualMode = (typeof MultilingualMode)[keyof typeof MultilingualMode];
|
|
147
150
|
/**
|
|
@@ -23,9 +23,10 @@ export var Conversation;
|
|
|
23
23
|
Assistant: "assistant",
|
|
24
24
|
Error: "error",
|
|
25
25
|
};
|
|
26
|
-
/** If `"auto"`, each user audio is automatically identified for the language to respond in. If `"request"`, user must request to change language (recommended). */
|
|
26
|
+
/** If `"auto"`, each user audio is automatically identified for the language to respond in. If `"request"`, user must request to change language (recommended). If `"initial"` the first turn user audio determines the language for the rest of the conversation. */
|
|
27
27
|
Conversation.MultilingualMode = {
|
|
28
28
|
Auto: "auto",
|
|
29
29
|
Request: "request",
|
|
30
|
+
Initial: "initial",
|
|
30
31
|
};
|
|
31
32
|
})(Conversation || (Conversation = {}));
|
|
@@ -22,6 +22,8 @@ export interface CreateAgentRequest {
|
|
|
22
22
|
background_noise?: (CreateAgentRequest.BackgroundNoise | null) | undefined;
|
|
23
23
|
/** When `true`, the welcome message will be automatically generated and the `welcome_message` field will be ignored. */
|
|
24
24
|
generate_welcome_message?: boolean | undefined;
|
|
25
|
+
/** When `false`, the welcome message will not be interruptible by the user. */
|
|
26
|
+
is_welcome_message_interruptible?: boolean | undefined;
|
|
25
27
|
/** Message to play when the conversation starts. Can contain template variables like `{{customer_name}}`. Ignored when `generate_welcome_message` is `true`. */
|
|
26
28
|
welcome_message?: string | undefined;
|
|
27
29
|
/** Instructions for the conversation. Can contain template variables like `{{subject}}`. */
|
|
@@ -46,7 +48,7 @@ export interface CreateAgentRequest {
|
|
|
46
48
|
additional_languages?: Phonic.LanguageCode[] | undefined;
|
|
47
49
|
/** Array of ISO 639-1 language codes that the agent should be able to recognize. This field is deprecated. Use `default_language` and `additional_languages` instead. */
|
|
48
50
|
languages?: Phonic.LanguageCode[] | undefined;
|
|
49
|
-
/** If `"auto"`, each user audio is automatically identified for the language to respond in. If `"request"`, user must request to change language (recommended). */
|
|
51
|
+
/** If `"auto"`, each user audio is automatically identified for the language to respond in. If `"request"`, user must request to change language (recommended). If `"initial"` the first turn user audio determines the language for the rest of the conversation. */
|
|
50
52
|
multilingual_mode?: CreateAgentRequest.MultilingualMode | undefined;
|
|
51
53
|
/** Push to talk mode. User must send mute/unmute messages to turn on/off listening to audio. Defaults to false. */
|
|
52
54
|
push_to_talk?: boolean | undefined;
|
|
@@ -70,6 +72,8 @@ export interface CreateAgentRequest {
|
|
|
70
72
|
vad_min_silence_duration_ms?: number | undefined;
|
|
71
73
|
/** Voice activity detection threshold. */
|
|
72
74
|
vad_threshold?: number | undefined;
|
|
75
|
+
/** When `true`, PII and PHI are redacted from text transcripts (e.g. replaced with tags like `[PHONE NUMBER]`) and bleeped from audio recordings after the conversation ends. */
|
|
76
|
+
enable_redaction?: boolean | undefined;
|
|
73
77
|
}
|
|
74
78
|
export declare namespace CreateAgentRequest {
|
|
75
79
|
const PhoneNumber: {
|
|
@@ -105,10 +109,11 @@ export declare namespace CreateAgentRequest {
|
|
|
105
109
|
* Custom tool */
|
|
106
110
|
| string;
|
|
107
111
|
}
|
|
108
|
-
/** If `"auto"`, each user audio is automatically identified for the language to respond in. If `"request"`, user must request to change language (recommended). */
|
|
112
|
+
/** If `"auto"`, each user audio is automatically identified for the language to respond in. If `"request"`, user must request to change language (recommended). If `"initial"` the first turn user audio determines the language for the rest of the conversation. */
|
|
109
113
|
const MultilingualMode: {
|
|
110
114
|
readonly Auto: "auto";
|
|
111
115
|
readonly Request: "request";
|
|
116
|
+
readonly Initial: "initial";
|
|
112
117
|
};
|
|
113
118
|
type MultilingualMode = (typeof MultilingualMode)[keyof typeof MultilingualMode];
|
|
114
119
|
type PronunciationDictionary = PronunciationDictionary.Item[];
|
|
@@ -18,9 +18,10 @@ export var CreateAgentRequest;
|
|
|
18
18
|
CallCenter: "call-center",
|
|
19
19
|
CoffeeShop: "coffee-shop",
|
|
20
20
|
};
|
|
21
|
-
/** If `"auto"`, each user audio is automatically identified for the language to respond in. If `"request"`, user must request to change language (recommended). */
|
|
21
|
+
/** If `"auto"`, each user audio is automatically identified for the language to respond in. If `"request"`, user must request to change language (recommended). If `"initial"` the first turn user audio determines the language for the rest of the conversation. */
|
|
22
22
|
CreateAgentRequest.MultilingualMode = {
|
|
23
23
|
Auto: "auto",
|
|
24
24
|
Request: "request",
|
|
25
|
+
Initial: "initial",
|
|
25
26
|
};
|
|
26
27
|
})(CreateAgentRequest || (CreateAgentRequest = {}));
|
|
@@ -1,23 +1,56 @@
|
|
|
1
1
|
/** ISO 639-1 language codes supported by the agent */
|
|
2
2
|
export declare const LanguageCode: {
|
|
3
3
|
readonly Ar: "ar";
|
|
4
|
-
readonly
|
|
4
|
+
readonly Az: "az";
|
|
5
|
+
readonly Bg: "bg";
|
|
6
|
+
readonly Bn: "bn";
|
|
5
7
|
readonly Cs: "cs";
|
|
6
8
|
readonly Da: "da";
|
|
7
|
-
readonly
|
|
9
|
+
readonly De: "de";
|
|
10
|
+
readonly El: "el";
|
|
8
11
|
readonly En: "en";
|
|
12
|
+
readonly Es: "es";
|
|
13
|
+
readonly Fa: "fa";
|
|
14
|
+
readonly Fi: "fi";
|
|
15
|
+
readonly Fil: "fil";
|
|
9
16
|
readonly Fr: "fr";
|
|
10
|
-
readonly
|
|
17
|
+
readonly Gu: "gu";
|
|
18
|
+
readonly He: "he";
|
|
19
|
+
readonly Hi: "hi";
|
|
20
|
+
readonly Hu: "hu";
|
|
11
21
|
readonly Id: "id";
|
|
12
22
|
readonly It: "it";
|
|
13
23
|
readonly Ja: "ja";
|
|
24
|
+
readonly Ka: "ka";
|
|
25
|
+
readonly Km: "km";
|
|
26
|
+
readonly Kn: "kn";
|
|
14
27
|
readonly Ko: "ko";
|
|
28
|
+
readonly Lt: "lt";
|
|
29
|
+
readonly Lv: "lv";
|
|
30
|
+
readonly Ml: "ml";
|
|
31
|
+
readonly Mr: "mr";
|
|
32
|
+
readonly Ms: "ms";
|
|
33
|
+
readonly Ne: "ne";
|
|
34
|
+
readonly Nl: "nl";
|
|
35
|
+
readonly No: "no";
|
|
36
|
+
readonly Pa: "pa";
|
|
15
37
|
readonly Pl: "pl";
|
|
16
38
|
readonly Pt: "pt";
|
|
39
|
+
readonly Ro: "ro";
|
|
17
40
|
readonly Ru: "ru";
|
|
18
|
-
readonly
|
|
41
|
+
readonly Si: "si";
|
|
42
|
+
readonly Sk: "sk";
|
|
43
|
+
readonly Sq: "sq";
|
|
19
44
|
readonly Sv: "sv";
|
|
45
|
+
readonly Sw: "sw";
|
|
46
|
+
readonly Ta: "ta";
|
|
47
|
+
readonly Te: "te";
|
|
48
|
+
readonly Th: "th";
|
|
20
49
|
readonly Tr: "tr";
|
|
50
|
+
readonly Uk: "uk";
|
|
51
|
+
readonly Ur: "ur";
|
|
21
52
|
readonly Vi: "vi";
|
|
53
|
+
readonly Yue: "yue";
|
|
54
|
+
readonly Zh: "zh";
|
|
22
55
|
};
|
|
23
56
|
export type LanguageCode = (typeof LanguageCode)[keyof typeof LanguageCode];
|
|
@@ -2,22 +2,55 @@
|
|
|
2
2
|
/** ISO 639-1 language codes supported by the agent */
|
|
3
3
|
export const LanguageCode = {
|
|
4
4
|
Ar: "ar",
|
|
5
|
-
|
|
5
|
+
Az: "az",
|
|
6
|
+
Bg: "bg",
|
|
7
|
+
Bn: "bn",
|
|
6
8
|
Cs: "cs",
|
|
7
9
|
Da: "da",
|
|
8
|
-
|
|
10
|
+
De: "de",
|
|
11
|
+
El: "el",
|
|
9
12
|
En: "en",
|
|
13
|
+
Es: "es",
|
|
14
|
+
Fa: "fa",
|
|
15
|
+
Fi: "fi",
|
|
16
|
+
Fil: "fil",
|
|
10
17
|
Fr: "fr",
|
|
11
|
-
|
|
18
|
+
Gu: "gu",
|
|
19
|
+
He: "he",
|
|
20
|
+
Hi: "hi",
|
|
21
|
+
Hu: "hu",
|
|
12
22
|
Id: "id",
|
|
13
23
|
It: "it",
|
|
14
24
|
Ja: "ja",
|
|
25
|
+
Ka: "ka",
|
|
26
|
+
Km: "km",
|
|
27
|
+
Kn: "kn",
|
|
15
28
|
Ko: "ko",
|
|
29
|
+
Lt: "lt",
|
|
30
|
+
Lv: "lv",
|
|
31
|
+
Ml: "ml",
|
|
32
|
+
Mr: "mr",
|
|
33
|
+
Ms: "ms",
|
|
34
|
+
Ne: "ne",
|
|
35
|
+
Nl: "nl",
|
|
36
|
+
No: "no",
|
|
37
|
+
Pa: "pa",
|
|
16
38
|
Pl: "pl",
|
|
17
39
|
Pt: "pt",
|
|
40
|
+
Ro: "ro",
|
|
18
41
|
Ru: "ru",
|
|
19
|
-
|
|
42
|
+
Si: "si",
|
|
43
|
+
Sk: "sk",
|
|
44
|
+
Sq: "sq",
|
|
20
45
|
Sv: "sv",
|
|
46
|
+
Sw: "sw",
|
|
47
|
+
Ta: "ta",
|
|
48
|
+
Te: "te",
|
|
49
|
+
Th: "th",
|
|
21
50
|
Tr: "tr",
|
|
51
|
+
Uk: "uk",
|
|
52
|
+
Ur: "ur",
|
|
22
53
|
Vi: "vi",
|
|
54
|
+
Yue: "yue",
|
|
55
|
+
Zh: "zh",
|
|
23
56
|
};
|
|
@@ -29,7 +29,7 @@ export interface OutboundCallConfig {
|
|
|
29
29
|
additional_languages?: Phonic.LanguageCode[] | undefined;
|
|
30
30
|
/** Array of ISO 639-1 language codes that the agent should be able to recognize. This field is deprecated. Use `default_language` and `additional_languages` instead. */
|
|
31
31
|
languages?: Phonic.LanguageCode[] | undefined;
|
|
32
|
-
/** If `"auto"`, each user audio is automatically identified for the language to respond in. If `"request"`, user must request to change language (recommended). */
|
|
32
|
+
/** If `"auto"`, each user audio is automatically identified for the language to respond in. If `"request"`, user must request to change language (recommended). If `"initial"` the first turn user audio determines the language for the rest of the conversation. */
|
|
33
33
|
multilingual_mode?: OutboundCallConfig.MultilingualMode | undefined;
|
|
34
34
|
/** Push to talk mode. User must send mute/unmute messages to turn on/off listening to audio. Defaults to false. */
|
|
35
35
|
push_to_talk?: boolean | undefined;
|
|
@@ -41,12 +41,15 @@ export interface OutboundCallConfig {
|
|
|
41
41
|
min_words_to_interrupt?: number | undefined;
|
|
42
42
|
/** Array of built-in or custom tool names to use. */
|
|
43
43
|
tools?: OutboundCallConfig.Tools.Item[] | undefined;
|
|
44
|
+
/** When `true`, PII and PHI are redacted from text transcripts (e.g. replaced with tags like `[PHONE NUMBER]`) and bleeped from audio recordings after the conversation ends. */
|
|
45
|
+
enable_redaction?: boolean | undefined;
|
|
44
46
|
}
|
|
45
47
|
export declare namespace OutboundCallConfig {
|
|
46
|
-
/** If `"auto"`, each user audio is automatically identified for the language to respond in. If `"request"`, user must request to change language (recommended). */
|
|
48
|
+
/** If `"auto"`, each user audio is automatically identified for the language to respond in. If `"request"`, user must request to change language (recommended). If `"initial"` the first turn user audio determines the language for the rest of the conversation. */
|
|
47
49
|
const MultilingualMode: {
|
|
48
50
|
readonly Auto: "auto";
|
|
49
51
|
readonly Request: "request";
|
|
52
|
+
readonly Initial: "initial";
|
|
50
53
|
};
|
|
51
54
|
type MultilingualMode = (typeof MultilingualMode)[keyof typeof MultilingualMode];
|
|
52
55
|
type PronunciationDictionary = PronunciationDictionary.Item[];
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
// This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
export var OutboundCallConfig;
|
|
3
3
|
(function (OutboundCallConfig) {
|
|
4
|
-
/** If `"auto"`, each user audio is automatically identified for the language to respond in. If `"request"`, user must request to change language (recommended). */
|
|
4
|
+
/** If `"auto"`, each user audio is automatically identified for the language to respond in. If `"request"`, user must request to change language (recommended). If `"initial"` the first turn user audio determines the language for the rest of the conversation. */
|
|
5
5
|
OutboundCallConfig.MultilingualMode = {
|
|
6
6
|
Auto: "auto",
|
|
7
7
|
Request: "request",
|
|
8
|
+
Initial: "initial",
|
|
8
9
|
};
|
|
9
10
|
})(OutboundCallConfig || (OutboundCallConfig = {}));
|
package/dist/esm/version.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.
|
|
1
|
+
export declare const SDK_VERSION = "0.32.1";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "0.
|
|
1
|
+
export const SDK_VERSION = "0.32.1";
|
package/package.json
CHANGED
package/reference.md
CHANGED
|
@@ -99,6 +99,7 @@ await client.agents.create({
|
|
|
99
99
|
audio_speed: 1,
|
|
100
100
|
background_noise_level: 0,
|
|
101
101
|
generate_welcome_message: false,
|
|
102
|
+
is_welcome_message_interruptible: true,
|
|
102
103
|
welcome_message: "Hi {{customer_name}}. How can I help you today?",
|
|
103
104
|
system_prompt: "You are an expert in {{subject}}. Be friendly, helpful and concise.",
|
|
104
105
|
template_variables: {
|
|
@@ -202,6 +203,7 @@ await client.agents.upsert({
|
|
|
202
203
|
audio_speed: 1,
|
|
203
204
|
background_noise_level: 0,
|
|
204
205
|
generate_welcome_message: false,
|
|
206
|
+
is_welcome_message_interruptible: true,
|
|
205
207
|
welcome_message: "Hi {{customer_name}}. How can I help you today?",
|
|
206
208
|
system_prompt: "You are an expert in {{subject}}. Be friendly, helpful and concise.",
|
|
207
209
|
template_variables: {
|
|
@@ -451,6 +453,7 @@ await client.agents.update("nameOrId", {
|
|
|
451
453
|
audio_speed: 1,
|
|
452
454
|
background_noise_level: 0,
|
|
453
455
|
generate_welcome_message: false,
|
|
456
|
+
is_welcome_message_interruptible: true,
|
|
454
457
|
welcome_message: "Hi {{customer_name}}. How can I help you today?",
|
|
455
458
|
system_prompt: "You are an expert in {{subject}}. Be friendly, helpful and concise.",
|
|
456
459
|
template_variables: {
|