phonic 0.32.7 → 0.32.9
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/dist/cjs/BaseClient.js +2 -2
- package/dist/cjs/api/resources/agents/client/requests/AgentsCreateRequest.d.ts +2 -0
- package/dist/cjs/api/resources/agents/client/requests/UpdateAgentRequest.d.ts +8 -0
- package/dist/cjs/api/resources/agents/client/requests/UpdateAgentRequest.js +5 -0
- package/dist/cjs/api/resources/tools/client/Client.d.ts +1 -0
- package/dist/cjs/api/resources/tools/client/Client.js +1 -0
- package/dist/cjs/api/resources/tools/client/requests/CreateToolRequest.d.ts +4 -1
- package/dist/cjs/api/resources/tools/client/requests/UpdateToolRequest.d.ts +3 -1
- package/dist/cjs/api/types/Agent.d.ts +8 -0
- package/dist/cjs/api/types/Agent.js +5 -0
- package/dist/cjs/api/types/ConfigOptions.d.ts +10 -0
- package/dist/cjs/api/types/ConfigOptions.js +5 -0
- package/dist/cjs/api/types/CreateAgentRequest.d.ts +8 -0
- package/dist/cjs/api/types/CreateAgentRequest.js +5 -0
- package/dist/cjs/api/types/OutboundCallConfig.d.ts +10 -0
- package/dist/cjs/api/types/OutboundCallConfig.js +5 -0
- package/dist/cjs/api/types/Tool.d.ts +3 -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/requests/AgentsCreateRequest.d.mts +2 -0
- package/dist/esm/api/resources/agents/client/requests/UpdateAgentRequest.d.mts +8 -0
- package/dist/esm/api/resources/agents/client/requests/UpdateAgentRequest.mjs +5 -0
- package/dist/esm/api/resources/tools/client/Client.d.mts +1 -0
- package/dist/esm/api/resources/tools/client/Client.mjs +1 -0
- package/dist/esm/api/resources/tools/client/requests/CreateToolRequest.d.mts +4 -1
- package/dist/esm/api/resources/tools/client/requests/UpdateToolRequest.d.mts +3 -1
- package/dist/esm/api/types/Agent.d.mts +8 -0
- package/dist/esm/api/types/Agent.mjs +5 -0
- package/dist/esm/api/types/ConfigOptions.d.mts +10 -0
- package/dist/esm/api/types/ConfigOptions.mjs +5 -0
- package/dist/esm/api/types/CreateAgentRequest.d.mts +8 -0
- package/dist/esm/api/types/CreateAgentRequest.mjs +5 -0
- package/dist/esm/api/types/OutboundCallConfig.d.mts +10 -0
- package/dist/esm/api/types/OutboundCallConfig.mjs +5 -0
- package/dist/esm/api/types/Tool.d.mts +3 -1
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
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.32.
|
|
47
|
-
"User-Agent": "phonic/0.32.
|
|
46
|
+
"X-Fern-SDK-Version": "0.32.9",
|
|
47
|
+
"User-Agent": "phonic/0.32.9",
|
|
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);
|
|
@@ -109,6 +109,8 @@ export interface AgentsCreateRequest {
|
|
|
109
109
|
multilingual_mode?: Phonic.CreateAgentRequest.MultilingualMode;
|
|
110
110
|
/** Push to talk mode. User must send mute/unmute messages to turn on/off listening to audio. Defaults to false. */
|
|
111
111
|
push_to_talk?: boolean;
|
|
112
|
+
/** The intelligence level of the agent. `high` uses a more capable model for more complex reasoning, while `standard` is optimized for lower latency. */
|
|
113
|
+
intelligence_level?: Phonic.CreateAgentRequest.IntelligenceLevel;
|
|
112
114
|
/** These words, or short phrases, will be more accurately recognized by the agent. */
|
|
113
115
|
boosted_keywords?: string[];
|
|
114
116
|
/** Array of `{ word, pronunciation }` entries. Words must be unique. */
|
|
@@ -115,6 +115,8 @@ export interface UpdateAgentRequest {
|
|
|
115
115
|
multilingual_mode?: UpdateAgentRequest.MultilingualMode;
|
|
116
116
|
/** Push to talk mode. User must send mute/unmute messages to turn on/off listening to audio. Defaults to false. */
|
|
117
117
|
push_to_talk?: boolean;
|
|
118
|
+
/** The intelligence level of the agent. `high` uses a more capable model for more complex reasoning, while `standard` is optimized for lower latency. */
|
|
119
|
+
intelligence_level?: UpdateAgentRequest.IntelligenceLevel;
|
|
118
120
|
/** These words, or short phrases, will be more accurately recognized by the agent. */
|
|
119
121
|
boosted_keywords?: string[];
|
|
120
122
|
/** Array of `{ word, pronunciation }` entries. Words must be unique. */
|
|
@@ -184,6 +186,12 @@ export declare namespace UpdateAgentRequest {
|
|
|
184
186
|
readonly Initial: "initial";
|
|
185
187
|
};
|
|
186
188
|
type MultilingualMode = (typeof MultilingualMode)[keyof typeof MultilingualMode];
|
|
189
|
+
/** The intelligence level of the agent. `high` uses a more capable model for more complex reasoning, while `standard` is optimized for lower latency. */
|
|
190
|
+
const IntelligenceLevel: {
|
|
191
|
+
readonly Standard: "standard";
|
|
192
|
+
readonly High: "high";
|
|
193
|
+
};
|
|
194
|
+
type IntelligenceLevel = (typeof IntelligenceLevel)[keyof typeof IntelligenceLevel];
|
|
187
195
|
type PronunciationDictionary = PronunciationDictionary.Item[];
|
|
188
196
|
namespace PronunciationDictionary {
|
|
189
197
|
interface Item {
|
|
@@ -28,4 +28,9 @@ var UpdateAgentRequest;
|
|
|
28
28
|
Request: "request",
|
|
29
29
|
Initial: "initial",
|
|
30
30
|
};
|
|
31
|
+
/** The intelligence level of the agent. `high` uses a more capable model for more complex reasoning, while `standard` is optimized for lower latency. */
|
|
32
|
+
UpdateAgentRequest.IntelligenceLevel = {
|
|
33
|
+
Standard: "standard",
|
|
34
|
+
High: "high",
|
|
35
|
+
};
|
|
31
36
|
})(UpdateAgentRequest || (exports.UpdateAgentRequest = UpdateAgentRequest = {}));
|
|
@@ -117,6 +117,7 @@ export declare class ToolsClient {
|
|
|
117
117
|
* execution_mode: "sync",
|
|
118
118
|
* phone_number: "+15551234567",
|
|
119
119
|
* dtmf: "1234",
|
|
120
|
+
* dynamic_dtmf: false,
|
|
120
121
|
* use_agent_phone_number: true,
|
|
121
122
|
* detect_voicemail: false,
|
|
122
123
|
* require_speech_before_tool_call: false
|
|
@@ -82,6 +82,7 @@ import type * as Phonic from "../../../../index.js";
|
|
|
82
82
|
* execution_mode: "sync",
|
|
83
83
|
* phone_number: "+15551234567",
|
|
84
84
|
* dtmf: "1234",
|
|
85
|
+
* dynamic_dtmf: false,
|
|
85
86
|
* use_agent_phone_number: true,
|
|
86
87
|
* detect_voicemail: false,
|
|
87
88
|
* require_speech_before_tool_call: false
|
|
@@ -128,8 +129,10 @@ export interface CreateToolRequest {
|
|
|
128
129
|
tool_call_output_timeout_ms?: number;
|
|
129
130
|
/** The E.164 formatted phone number to transfer calls to. Set to null if the agent should determine the phone number. */
|
|
130
131
|
phone_number?: string | null;
|
|
131
|
-
/** DTMF digits to send after the transfer connects (e.g., "1234"). Defaults to null. */
|
|
132
|
+
/** DTMF digits to send after the transfer connects (e.g., "1234"). Defaults to null. Ignored when dynamic_dtmf is true. */
|
|
132
133
|
dtmf?: string | null;
|
|
134
|
+
/** When true, the agent determines the DTMF digits at call time (and may choose to send none); the static dtmf is ignored. Only sent when use_agent_phone_number is true (not on a SIP REFER transfer). */
|
|
135
|
+
dynamic_dtmf?: boolean;
|
|
133
136
|
/** When true, Phonic will transfer the call using the agent's phone number. When false, Phonic will transfer the call using the phone number of the party to whom the agent is connected. This is only available for built_in_transfer_to_phone_number tools. */
|
|
134
137
|
use_agent_phone_number?: boolean;
|
|
135
138
|
/** When true, Phonic will listen in and tell the user if the transfer hits voicemail. This is only available for built_in_transfer_to_phone_number tools when use_agent_phone_number is true. */
|
|
@@ -37,8 +37,10 @@ export interface UpdateToolRequest {
|
|
|
37
37
|
tool_call_output_timeout_ms?: number;
|
|
38
38
|
/** The E.164 formatted phone number to transfer calls to. Set to null if the agent should determine the phone number. */
|
|
39
39
|
phone_number?: string | null;
|
|
40
|
-
/** DTMF digits to send after the transfer connects (e.g., "1234"). Can be set to null to remove DTMF. */
|
|
40
|
+
/** DTMF digits to send after the transfer connects (e.g., "1234"). Can be set to null to remove DTMF. Ignored when dynamic_dtmf is true. */
|
|
41
41
|
dtmf?: string | null;
|
|
42
|
+
/** When true, the agent determines the DTMF digits at call time (and may choose to send none); the static dtmf is ignored. Only sent when use_agent_phone_number is true (not on a SIP REFER transfer). */
|
|
43
|
+
dynamic_dtmf?: boolean;
|
|
42
44
|
/** When true, Phonic will transfer the call using the agent's phone number. When false, Phonic will transfer the call using the phone number of the party to whom the agent is connected. This is only available for built_in_transfer_to_phone_number tools. */
|
|
43
45
|
use_agent_phone_number?: boolean;
|
|
44
46
|
/** When true, Phonic will listen in and tell the user if the transfer hits voicemail. This is only available for built_in_transfer_to_phone_number tools when use_agent_phone_number is true. */
|
|
@@ -56,6 +56,8 @@ export interface Agent {
|
|
|
56
56
|
multilingual_mode: Agent.MultilingualMode;
|
|
57
57
|
/** Push to talk mode. User must send mute/unmute messages to turn on/off listening to audio. Defaults to false. */
|
|
58
58
|
push_to_talk: boolean;
|
|
59
|
+
/** The intelligence level of the agent. `high` uses a more capable model for more complex reasoning, while `standard` is optimized for lower latency. */
|
|
60
|
+
intelligence_level: Agent.IntelligenceLevel;
|
|
59
61
|
/** These words, or short phrases, will be more accurately recognized by the agent. */
|
|
60
62
|
boosted_keywords: string[];
|
|
61
63
|
/** Names of observability integrations enabled for the agent. Each must be one of the supported providers. */
|
|
@@ -133,6 +135,12 @@ export declare namespace Agent {
|
|
|
133
135
|
readonly Initial: "initial";
|
|
134
136
|
};
|
|
135
137
|
type MultilingualMode = (typeof MultilingualMode)[keyof typeof MultilingualMode];
|
|
138
|
+
/** The intelligence level of the agent. `high` uses a more capable model for more complex reasoning, while `standard` is optimized for lower latency. */
|
|
139
|
+
const IntelligenceLevel: {
|
|
140
|
+
readonly Standard: "standard";
|
|
141
|
+
readonly High: "high";
|
|
142
|
+
};
|
|
143
|
+
type IntelligenceLevel = (typeof IntelligenceLevel)[keyof typeof IntelligenceLevel];
|
|
136
144
|
type PronunciationDictionary = PronunciationDictionary.Item[];
|
|
137
145
|
namespace PronunciationDictionary {
|
|
138
146
|
interface Item {
|
|
@@ -24,4 +24,9 @@ var Agent;
|
|
|
24
24
|
Request: "request",
|
|
25
25
|
Initial: "initial",
|
|
26
26
|
};
|
|
27
|
+
/** The intelligence level of the agent. `high` uses a more capable model for more complex reasoning, while `standard` is optimized for lower latency. */
|
|
28
|
+
Agent.IntelligenceLevel = {
|
|
29
|
+
Standard: "standard",
|
|
30
|
+
High: "high",
|
|
31
|
+
};
|
|
27
32
|
})(Agent || (exports.Agent = Agent = {}));
|
|
@@ -59,6 +59,8 @@ export interface ConfigOptions {
|
|
|
59
59
|
push_to_talk?: boolean | undefined;
|
|
60
60
|
/** When `true`, assistant audio is streamed to the client as fast as it is generated, rather than paced to real time. Defaults to false. */
|
|
61
61
|
stream_ahead_of_real_time?: boolean | undefined;
|
|
62
|
+
/** The intelligence level of the agent. `high` uses a more capable model for more complex reasoning, while `standard` is optimized for lower latency. */
|
|
63
|
+
intelligence_level?: ConfigOptions.IntelligenceLevel | undefined;
|
|
62
64
|
/** Keywords to boost in speech recognition */
|
|
63
65
|
boosted_keywords?: string[] | undefined;
|
|
64
66
|
/** Array of `{ word, pronunciation }` entries. Words must be unique. */
|
|
@@ -83,6 +85,8 @@ export interface ConfigOptions {
|
|
|
83
85
|
assistant_backchannel_aggressiveness?: number | undefined;
|
|
84
86
|
/** When not `null`, the agent will call this endpoint to get configuration options for the conversation. */
|
|
85
87
|
configuration_endpoint?: (ConfigOptions.ConfigurationEndpoint | null) | undefined;
|
|
88
|
+
/** Additional runtime parameters. */
|
|
89
|
+
additional_params?: Record<string, unknown> | undefined;
|
|
86
90
|
/**
|
|
87
91
|
* Policy controlling how long transcripts and audio recordings are retained before being deleted.
|
|
88
92
|
* When `zero_data_retention` is `true`, nothing is retained and `transcripts`/`audio_recordings` are omitted.
|
|
@@ -122,6 +126,12 @@ export declare namespace ConfigOptions {
|
|
|
122
126
|
readonly Initial: "initial";
|
|
123
127
|
};
|
|
124
128
|
type MultilingualMode = (typeof MultilingualMode)[keyof typeof MultilingualMode];
|
|
129
|
+
/** The intelligence level of the agent. `high` uses a more capable model for more complex reasoning, while `standard` is optimized for lower latency. */
|
|
130
|
+
const IntelligenceLevel: {
|
|
131
|
+
readonly Standard: "standard";
|
|
132
|
+
readonly High: "high";
|
|
133
|
+
};
|
|
134
|
+
type IntelligenceLevel = (typeof IntelligenceLevel)[keyof typeof IntelligenceLevel];
|
|
125
135
|
type PronunciationDictionary = PronunciationDictionary.Item[];
|
|
126
136
|
namespace PronunciationDictionary {
|
|
127
137
|
interface Item {
|
|
@@ -32,4 +32,9 @@ var ConfigOptions;
|
|
|
32
32
|
Request: "request",
|
|
33
33
|
Initial: "initial",
|
|
34
34
|
};
|
|
35
|
+
/** The intelligence level of the agent. `high` uses a more capable model for more complex reasoning, while `standard` is optimized for lower latency. */
|
|
36
|
+
ConfigOptions.IntelligenceLevel = {
|
|
37
|
+
Standard: "standard",
|
|
38
|
+
High: "high",
|
|
39
|
+
};
|
|
35
40
|
})(ConfigOptions || (exports.ConfigOptions = ConfigOptions = {}));
|
|
@@ -62,6 +62,8 @@ export interface CreateAgentRequest {
|
|
|
62
62
|
multilingual_mode?: CreateAgentRequest.MultilingualMode | undefined;
|
|
63
63
|
/** Push to talk mode. User must send mute/unmute messages to turn on/off listening to audio. Defaults to false. */
|
|
64
64
|
push_to_talk?: boolean | undefined;
|
|
65
|
+
/** The intelligence level of the agent. `high` uses a more capable model for more complex reasoning, while `standard` is optimized for lower latency. */
|
|
66
|
+
intelligence_level?: CreateAgentRequest.IntelligenceLevel | undefined;
|
|
65
67
|
/** These words, or short phrases, will be more accurately recognized by the agent. */
|
|
66
68
|
boosted_keywords?: string[] | undefined;
|
|
67
69
|
/** Array of `{ word, pronunciation }` entries. Words must be unique. */
|
|
@@ -131,6 +133,12 @@ export declare namespace CreateAgentRequest {
|
|
|
131
133
|
readonly Initial: "initial";
|
|
132
134
|
};
|
|
133
135
|
type MultilingualMode = (typeof MultilingualMode)[keyof typeof MultilingualMode];
|
|
136
|
+
/** The intelligence level of the agent. `high` uses a more capable model for more complex reasoning, while `standard` is optimized for lower latency. */
|
|
137
|
+
const IntelligenceLevel: {
|
|
138
|
+
readonly Standard: "standard";
|
|
139
|
+
readonly High: "high";
|
|
140
|
+
};
|
|
141
|
+
type IntelligenceLevel = (typeof IntelligenceLevel)[keyof typeof IntelligenceLevel];
|
|
134
142
|
type PronunciationDictionary = PronunciationDictionary.Item[];
|
|
135
143
|
namespace PronunciationDictionary {
|
|
136
144
|
interface Item {
|
|
@@ -28,4 +28,9 @@ var CreateAgentRequest;
|
|
|
28
28
|
Request: "request",
|
|
29
29
|
Initial: "initial",
|
|
30
30
|
};
|
|
31
|
+
/** The intelligence level of the agent. `high` uses a more capable model for more complex reasoning, while `standard` is optimized for lower latency. */
|
|
32
|
+
CreateAgentRequest.IntelligenceLevel = {
|
|
33
|
+
Standard: "standard",
|
|
34
|
+
High: "high",
|
|
35
|
+
};
|
|
31
36
|
})(CreateAgentRequest || (exports.CreateAgentRequest = CreateAgentRequest = {}));
|
|
@@ -37,6 +37,8 @@ export interface OutboundCallConfig {
|
|
|
37
37
|
multilingual_mode?: OutboundCallConfig.MultilingualMode | undefined;
|
|
38
38
|
/** Push to talk mode. User must send mute/unmute messages to turn on/off listening to audio. Defaults to false. */
|
|
39
39
|
push_to_talk?: boolean | undefined;
|
|
40
|
+
/** The intelligence level of the agent. `high` uses a more capable model for more complex reasoning, while `standard` is optimized for lower latency. */
|
|
41
|
+
intelligence_level?: OutboundCallConfig.IntelligenceLevel | undefined;
|
|
40
42
|
/** These words, or short phrases, will be more accurately recognized by the agent. */
|
|
41
43
|
boosted_keywords?: string[] | undefined;
|
|
42
44
|
/** Array of `{ word, pronunciation }` entries. Words must be unique. */
|
|
@@ -67,6 +69,8 @@ export interface OutboundCallConfig {
|
|
|
67
69
|
assistant_backchannel_aggressiveness?: number | undefined;
|
|
68
70
|
/** When not `null`, at the beginning of the conversation the agent will make a POST request to this endpoint to get configuration options. */
|
|
69
71
|
configuration_endpoint?: (OutboundCallConfig.ConfigurationEndpoint | null) | undefined;
|
|
72
|
+
/** Additional runtime parameters. */
|
|
73
|
+
additional_params?: Record<string, unknown> | undefined;
|
|
70
74
|
/** Controls how long transcripts and audio recordings are retained before deletion. */
|
|
71
75
|
data_retention_policy?: Phonic.DataRetentionPolicy | undefined;
|
|
72
76
|
}
|
|
@@ -78,6 +82,12 @@ export declare namespace OutboundCallConfig {
|
|
|
78
82
|
readonly Initial: "initial";
|
|
79
83
|
};
|
|
80
84
|
type MultilingualMode = (typeof MultilingualMode)[keyof typeof MultilingualMode];
|
|
85
|
+
/** The intelligence level of the agent. `high` uses a more capable model for more complex reasoning, while `standard` is optimized for lower latency. */
|
|
86
|
+
const IntelligenceLevel: {
|
|
87
|
+
readonly Standard: "standard";
|
|
88
|
+
readonly High: "high";
|
|
89
|
+
};
|
|
90
|
+
type IntelligenceLevel = (typeof IntelligenceLevel)[keyof typeof IntelligenceLevel];
|
|
81
91
|
type PronunciationDictionary = PronunciationDictionary.Item[];
|
|
82
92
|
namespace PronunciationDictionary {
|
|
83
93
|
interface Item {
|
|
@@ -10,6 +10,11 @@ var OutboundCallConfig;
|
|
|
10
10
|
Request: "request",
|
|
11
11
|
Initial: "initial",
|
|
12
12
|
};
|
|
13
|
+
/** The intelligence level of the agent. `high` uses a more capable model for more complex reasoning, while `standard` is optimized for lower latency. */
|
|
14
|
+
OutboundCallConfig.IntelligenceLevel = {
|
|
15
|
+
Standard: "standard",
|
|
16
|
+
High: "high",
|
|
17
|
+
};
|
|
13
18
|
/** The background noise type. Can be "office", "call-center", "coffee-shop", or null. */
|
|
14
19
|
OutboundCallConfig.BackgroundNoise = {
|
|
15
20
|
Office: "office",
|
|
@@ -25,8 +25,10 @@ export interface Tool {
|
|
|
25
25
|
tool_call_output_timeout_ms?: number | undefined;
|
|
26
26
|
/** The E.164 formatted phone number to transfer calls to. Set to null if the agent should determine the phone number. */
|
|
27
27
|
phone_number?: (string | null) | undefined;
|
|
28
|
-
/** DTMF digits to send after the transfer connects (e.g., "1234"). Defaults to null. */
|
|
28
|
+
/** DTMF digits to send after the transfer connects (e.g., "1234"). Defaults to null. Ignored when dynamic_dtmf is true. */
|
|
29
29
|
dtmf?: (string | null) | undefined;
|
|
30
|
+
/** When true, the agent determines the DTMF digits at call time (and may choose to send none); the static dtmf is ignored. Only sent when use_agent_phone_number is true (not on a SIP REFER transfer). */
|
|
31
|
+
dynamic_dtmf?: boolean | undefined;
|
|
30
32
|
/** When true, Phonic will transfer the call using the agent's phone number. When false, Phonic will transfer the call using the phone number of the party to whom the agent is connected. This is only available for built_in_transfer_to_phone_number tools. */
|
|
31
33
|
use_agent_phone_number?: boolean | undefined;
|
|
32
34
|
/** When true, Phonic will listen in and tell the user if the transfer hits voicemail. This is only available for built_in_transfer_to_phone_number tools when use_agent_phone_number is true. */
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.32.
|
|
1
|
+
export declare const SDK_VERSION = "0.32.9";
|
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.32.
|
|
10
|
-
"User-Agent": "phonic/0.32.
|
|
9
|
+
"X-Fern-SDK-Version": "0.32.9",
|
|
10
|
+
"User-Agent": "phonic/0.32.9",
|
|
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);
|
|
@@ -109,6 +109,8 @@ export interface AgentsCreateRequest {
|
|
|
109
109
|
multilingual_mode?: Phonic.CreateAgentRequest.MultilingualMode;
|
|
110
110
|
/** Push to talk mode. User must send mute/unmute messages to turn on/off listening to audio. Defaults to false. */
|
|
111
111
|
push_to_talk?: boolean;
|
|
112
|
+
/** The intelligence level of the agent. `high` uses a more capable model for more complex reasoning, while `standard` is optimized for lower latency. */
|
|
113
|
+
intelligence_level?: Phonic.CreateAgentRequest.IntelligenceLevel;
|
|
112
114
|
/** These words, or short phrases, will be more accurately recognized by the agent. */
|
|
113
115
|
boosted_keywords?: string[];
|
|
114
116
|
/** Array of `{ word, pronunciation }` entries. Words must be unique. */
|
|
@@ -115,6 +115,8 @@ export interface UpdateAgentRequest {
|
|
|
115
115
|
multilingual_mode?: UpdateAgentRequest.MultilingualMode;
|
|
116
116
|
/** Push to talk mode. User must send mute/unmute messages to turn on/off listening to audio. Defaults to false. */
|
|
117
117
|
push_to_talk?: boolean;
|
|
118
|
+
/** The intelligence level of the agent. `high` uses a more capable model for more complex reasoning, while `standard` is optimized for lower latency. */
|
|
119
|
+
intelligence_level?: UpdateAgentRequest.IntelligenceLevel;
|
|
118
120
|
/** These words, or short phrases, will be more accurately recognized by the agent. */
|
|
119
121
|
boosted_keywords?: string[];
|
|
120
122
|
/** Array of `{ word, pronunciation }` entries. Words must be unique. */
|
|
@@ -184,6 +186,12 @@ export declare namespace UpdateAgentRequest {
|
|
|
184
186
|
readonly Initial: "initial";
|
|
185
187
|
};
|
|
186
188
|
type MultilingualMode = (typeof MultilingualMode)[keyof typeof MultilingualMode];
|
|
189
|
+
/** The intelligence level of the agent. `high` uses a more capable model for more complex reasoning, while `standard` is optimized for lower latency. */
|
|
190
|
+
const IntelligenceLevel: {
|
|
191
|
+
readonly Standard: "standard";
|
|
192
|
+
readonly High: "high";
|
|
193
|
+
};
|
|
194
|
+
type IntelligenceLevel = (typeof IntelligenceLevel)[keyof typeof IntelligenceLevel];
|
|
187
195
|
type PronunciationDictionary = PronunciationDictionary.Item[];
|
|
188
196
|
namespace PronunciationDictionary {
|
|
189
197
|
interface Item {
|
|
@@ -25,4 +25,9 @@ export var UpdateAgentRequest;
|
|
|
25
25
|
Request: "request",
|
|
26
26
|
Initial: "initial",
|
|
27
27
|
};
|
|
28
|
+
/** The intelligence level of the agent. `high` uses a more capable model for more complex reasoning, while `standard` is optimized for lower latency. */
|
|
29
|
+
UpdateAgentRequest.IntelligenceLevel = {
|
|
30
|
+
Standard: "standard",
|
|
31
|
+
High: "high",
|
|
32
|
+
};
|
|
28
33
|
})(UpdateAgentRequest || (UpdateAgentRequest = {}));
|
|
@@ -117,6 +117,7 @@ export declare class ToolsClient {
|
|
|
117
117
|
* execution_mode: "sync",
|
|
118
118
|
* phone_number: "+15551234567",
|
|
119
119
|
* dtmf: "1234",
|
|
120
|
+
* dynamic_dtmf: false,
|
|
120
121
|
* use_agent_phone_number: true,
|
|
121
122
|
* detect_voicemail: false,
|
|
122
123
|
* require_speech_before_tool_call: false
|
|
@@ -82,6 +82,7 @@ import type * as Phonic from "../../../../index.mjs";
|
|
|
82
82
|
* execution_mode: "sync",
|
|
83
83
|
* phone_number: "+15551234567",
|
|
84
84
|
* dtmf: "1234",
|
|
85
|
+
* dynamic_dtmf: false,
|
|
85
86
|
* use_agent_phone_number: true,
|
|
86
87
|
* detect_voicemail: false,
|
|
87
88
|
* require_speech_before_tool_call: false
|
|
@@ -128,8 +129,10 @@ export interface CreateToolRequest {
|
|
|
128
129
|
tool_call_output_timeout_ms?: number;
|
|
129
130
|
/** The E.164 formatted phone number to transfer calls to. Set to null if the agent should determine the phone number. */
|
|
130
131
|
phone_number?: string | null;
|
|
131
|
-
/** DTMF digits to send after the transfer connects (e.g., "1234"). Defaults to null. */
|
|
132
|
+
/** DTMF digits to send after the transfer connects (e.g., "1234"). Defaults to null. Ignored when dynamic_dtmf is true. */
|
|
132
133
|
dtmf?: string | null;
|
|
134
|
+
/** When true, the agent determines the DTMF digits at call time (and may choose to send none); the static dtmf is ignored. Only sent when use_agent_phone_number is true (not on a SIP REFER transfer). */
|
|
135
|
+
dynamic_dtmf?: boolean;
|
|
133
136
|
/** When true, Phonic will transfer the call using the agent's phone number. When false, Phonic will transfer the call using the phone number of the party to whom the agent is connected. This is only available for built_in_transfer_to_phone_number tools. */
|
|
134
137
|
use_agent_phone_number?: boolean;
|
|
135
138
|
/** When true, Phonic will listen in and tell the user if the transfer hits voicemail. This is only available for built_in_transfer_to_phone_number tools when use_agent_phone_number is true. */
|
|
@@ -37,8 +37,10 @@ export interface UpdateToolRequest {
|
|
|
37
37
|
tool_call_output_timeout_ms?: number;
|
|
38
38
|
/** The E.164 formatted phone number to transfer calls to. Set to null if the agent should determine the phone number. */
|
|
39
39
|
phone_number?: string | null;
|
|
40
|
-
/** DTMF digits to send after the transfer connects (e.g., "1234"). Can be set to null to remove DTMF. */
|
|
40
|
+
/** DTMF digits to send after the transfer connects (e.g., "1234"). Can be set to null to remove DTMF. Ignored when dynamic_dtmf is true. */
|
|
41
41
|
dtmf?: string | null;
|
|
42
|
+
/** When true, the agent determines the DTMF digits at call time (and may choose to send none); the static dtmf is ignored. Only sent when use_agent_phone_number is true (not on a SIP REFER transfer). */
|
|
43
|
+
dynamic_dtmf?: boolean;
|
|
42
44
|
/** When true, Phonic will transfer the call using the agent's phone number. When false, Phonic will transfer the call using the phone number of the party to whom the agent is connected. This is only available for built_in_transfer_to_phone_number tools. */
|
|
43
45
|
use_agent_phone_number?: boolean;
|
|
44
46
|
/** When true, Phonic will listen in and tell the user if the transfer hits voicemail. This is only available for built_in_transfer_to_phone_number tools when use_agent_phone_number is true. */
|
|
@@ -56,6 +56,8 @@ export interface Agent {
|
|
|
56
56
|
multilingual_mode: Agent.MultilingualMode;
|
|
57
57
|
/** Push to talk mode. User must send mute/unmute messages to turn on/off listening to audio. Defaults to false. */
|
|
58
58
|
push_to_talk: boolean;
|
|
59
|
+
/** The intelligence level of the agent. `high` uses a more capable model for more complex reasoning, while `standard` is optimized for lower latency. */
|
|
60
|
+
intelligence_level: Agent.IntelligenceLevel;
|
|
59
61
|
/** These words, or short phrases, will be more accurately recognized by the agent. */
|
|
60
62
|
boosted_keywords: string[];
|
|
61
63
|
/** Names of observability integrations enabled for the agent. Each must be one of the supported providers. */
|
|
@@ -133,6 +135,12 @@ export declare namespace Agent {
|
|
|
133
135
|
readonly Initial: "initial";
|
|
134
136
|
};
|
|
135
137
|
type MultilingualMode = (typeof MultilingualMode)[keyof typeof MultilingualMode];
|
|
138
|
+
/** The intelligence level of the agent. `high` uses a more capable model for more complex reasoning, while `standard` is optimized for lower latency. */
|
|
139
|
+
const IntelligenceLevel: {
|
|
140
|
+
readonly Standard: "standard";
|
|
141
|
+
readonly High: "high";
|
|
142
|
+
};
|
|
143
|
+
type IntelligenceLevel = (typeof IntelligenceLevel)[keyof typeof IntelligenceLevel];
|
|
136
144
|
type PronunciationDictionary = PronunciationDictionary.Item[];
|
|
137
145
|
namespace PronunciationDictionary {
|
|
138
146
|
interface Item {
|
|
@@ -21,4 +21,9 @@ export var Agent;
|
|
|
21
21
|
Request: "request",
|
|
22
22
|
Initial: "initial",
|
|
23
23
|
};
|
|
24
|
+
/** The intelligence level of the agent. `high` uses a more capable model for more complex reasoning, while `standard` is optimized for lower latency. */
|
|
25
|
+
Agent.IntelligenceLevel = {
|
|
26
|
+
Standard: "standard",
|
|
27
|
+
High: "high",
|
|
28
|
+
};
|
|
24
29
|
})(Agent || (Agent = {}));
|
|
@@ -59,6 +59,8 @@ export interface ConfigOptions {
|
|
|
59
59
|
push_to_talk?: boolean | undefined;
|
|
60
60
|
/** When `true`, assistant audio is streamed to the client as fast as it is generated, rather than paced to real time. Defaults to false. */
|
|
61
61
|
stream_ahead_of_real_time?: boolean | undefined;
|
|
62
|
+
/** The intelligence level of the agent. `high` uses a more capable model for more complex reasoning, while `standard` is optimized for lower latency. */
|
|
63
|
+
intelligence_level?: ConfigOptions.IntelligenceLevel | undefined;
|
|
62
64
|
/** Keywords to boost in speech recognition */
|
|
63
65
|
boosted_keywords?: string[] | undefined;
|
|
64
66
|
/** Array of `{ word, pronunciation }` entries. Words must be unique. */
|
|
@@ -83,6 +85,8 @@ export interface ConfigOptions {
|
|
|
83
85
|
assistant_backchannel_aggressiveness?: number | undefined;
|
|
84
86
|
/** When not `null`, the agent will call this endpoint to get configuration options for the conversation. */
|
|
85
87
|
configuration_endpoint?: (ConfigOptions.ConfigurationEndpoint | null) | undefined;
|
|
88
|
+
/** Additional runtime parameters. */
|
|
89
|
+
additional_params?: Record<string, unknown> | undefined;
|
|
86
90
|
/**
|
|
87
91
|
* Policy controlling how long transcripts and audio recordings are retained before being deleted.
|
|
88
92
|
* When `zero_data_retention` is `true`, nothing is retained and `transcripts`/`audio_recordings` are omitted.
|
|
@@ -122,6 +126,12 @@ export declare namespace ConfigOptions {
|
|
|
122
126
|
readonly Initial: "initial";
|
|
123
127
|
};
|
|
124
128
|
type MultilingualMode = (typeof MultilingualMode)[keyof typeof MultilingualMode];
|
|
129
|
+
/** The intelligence level of the agent. `high` uses a more capable model for more complex reasoning, while `standard` is optimized for lower latency. */
|
|
130
|
+
const IntelligenceLevel: {
|
|
131
|
+
readonly Standard: "standard";
|
|
132
|
+
readonly High: "high";
|
|
133
|
+
};
|
|
134
|
+
type IntelligenceLevel = (typeof IntelligenceLevel)[keyof typeof IntelligenceLevel];
|
|
125
135
|
type PronunciationDictionary = PronunciationDictionary.Item[];
|
|
126
136
|
namespace PronunciationDictionary {
|
|
127
137
|
interface Item {
|
|
@@ -29,4 +29,9 @@ export var ConfigOptions;
|
|
|
29
29
|
Request: "request",
|
|
30
30
|
Initial: "initial",
|
|
31
31
|
};
|
|
32
|
+
/** The intelligence level of the agent. `high` uses a more capable model for more complex reasoning, while `standard` is optimized for lower latency. */
|
|
33
|
+
ConfigOptions.IntelligenceLevel = {
|
|
34
|
+
Standard: "standard",
|
|
35
|
+
High: "high",
|
|
36
|
+
};
|
|
32
37
|
})(ConfigOptions || (ConfigOptions = {}));
|
|
@@ -62,6 +62,8 @@ export interface CreateAgentRequest {
|
|
|
62
62
|
multilingual_mode?: CreateAgentRequest.MultilingualMode | undefined;
|
|
63
63
|
/** Push to talk mode. User must send mute/unmute messages to turn on/off listening to audio. Defaults to false. */
|
|
64
64
|
push_to_talk?: boolean | undefined;
|
|
65
|
+
/** The intelligence level of the agent. `high` uses a more capable model for more complex reasoning, while `standard` is optimized for lower latency. */
|
|
66
|
+
intelligence_level?: CreateAgentRequest.IntelligenceLevel | undefined;
|
|
65
67
|
/** These words, or short phrases, will be more accurately recognized by the agent. */
|
|
66
68
|
boosted_keywords?: string[] | undefined;
|
|
67
69
|
/** Array of `{ word, pronunciation }` entries. Words must be unique. */
|
|
@@ -131,6 +133,12 @@ export declare namespace CreateAgentRequest {
|
|
|
131
133
|
readonly Initial: "initial";
|
|
132
134
|
};
|
|
133
135
|
type MultilingualMode = (typeof MultilingualMode)[keyof typeof MultilingualMode];
|
|
136
|
+
/** The intelligence level of the agent. `high` uses a more capable model for more complex reasoning, while `standard` is optimized for lower latency. */
|
|
137
|
+
const IntelligenceLevel: {
|
|
138
|
+
readonly Standard: "standard";
|
|
139
|
+
readonly High: "high";
|
|
140
|
+
};
|
|
141
|
+
type IntelligenceLevel = (typeof IntelligenceLevel)[keyof typeof IntelligenceLevel];
|
|
134
142
|
type PronunciationDictionary = PronunciationDictionary.Item[];
|
|
135
143
|
namespace PronunciationDictionary {
|
|
136
144
|
interface Item {
|
|
@@ -25,4 +25,9 @@ export var CreateAgentRequest;
|
|
|
25
25
|
Request: "request",
|
|
26
26
|
Initial: "initial",
|
|
27
27
|
};
|
|
28
|
+
/** The intelligence level of the agent. `high` uses a more capable model for more complex reasoning, while `standard` is optimized for lower latency. */
|
|
29
|
+
CreateAgentRequest.IntelligenceLevel = {
|
|
30
|
+
Standard: "standard",
|
|
31
|
+
High: "high",
|
|
32
|
+
};
|
|
28
33
|
})(CreateAgentRequest || (CreateAgentRequest = {}));
|
|
@@ -37,6 +37,8 @@ export interface OutboundCallConfig {
|
|
|
37
37
|
multilingual_mode?: OutboundCallConfig.MultilingualMode | undefined;
|
|
38
38
|
/** Push to talk mode. User must send mute/unmute messages to turn on/off listening to audio. Defaults to false. */
|
|
39
39
|
push_to_talk?: boolean | undefined;
|
|
40
|
+
/** The intelligence level of the agent. `high` uses a more capable model for more complex reasoning, while `standard` is optimized for lower latency. */
|
|
41
|
+
intelligence_level?: OutboundCallConfig.IntelligenceLevel | undefined;
|
|
40
42
|
/** These words, or short phrases, will be more accurately recognized by the agent. */
|
|
41
43
|
boosted_keywords?: string[] | undefined;
|
|
42
44
|
/** Array of `{ word, pronunciation }` entries. Words must be unique. */
|
|
@@ -67,6 +69,8 @@ export interface OutboundCallConfig {
|
|
|
67
69
|
assistant_backchannel_aggressiveness?: number | undefined;
|
|
68
70
|
/** When not `null`, at the beginning of the conversation the agent will make a POST request to this endpoint to get configuration options. */
|
|
69
71
|
configuration_endpoint?: (OutboundCallConfig.ConfigurationEndpoint | null) | undefined;
|
|
72
|
+
/** Additional runtime parameters. */
|
|
73
|
+
additional_params?: Record<string, unknown> | undefined;
|
|
70
74
|
/** Controls how long transcripts and audio recordings are retained before deletion. */
|
|
71
75
|
data_retention_policy?: Phonic.DataRetentionPolicy | undefined;
|
|
72
76
|
}
|
|
@@ -78,6 +82,12 @@ export declare namespace OutboundCallConfig {
|
|
|
78
82
|
readonly Initial: "initial";
|
|
79
83
|
};
|
|
80
84
|
type MultilingualMode = (typeof MultilingualMode)[keyof typeof MultilingualMode];
|
|
85
|
+
/** The intelligence level of the agent. `high` uses a more capable model for more complex reasoning, while `standard` is optimized for lower latency. */
|
|
86
|
+
const IntelligenceLevel: {
|
|
87
|
+
readonly Standard: "standard";
|
|
88
|
+
readonly High: "high";
|
|
89
|
+
};
|
|
90
|
+
type IntelligenceLevel = (typeof IntelligenceLevel)[keyof typeof IntelligenceLevel];
|
|
81
91
|
type PronunciationDictionary = PronunciationDictionary.Item[];
|
|
82
92
|
namespace PronunciationDictionary {
|
|
83
93
|
interface Item {
|
|
@@ -7,6 +7,11 @@ export var OutboundCallConfig;
|
|
|
7
7
|
Request: "request",
|
|
8
8
|
Initial: "initial",
|
|
9
9
|
};
|
|
10
|
+
/** The intelligence level of the agent. `high` uses a more capable model for more complex reasoning, while `standard` is optimized for lower latency. */
|
|
11
|
+
OutboundCallConfig.IntelligenceLevel = {
|
|
12
|
+
Standard: "standard",
|
|
13
|
+
High: "high",
|
|
14
|
+
};
|
|
10
15
|
/** The background noise type. Can be "office", "call-center", "coffee-shop", or null. */
|
|
11
16
|
OutboundCallConfig.BackgroundNoise = {
|
|
12
17
|
Office: "office",
|
|
@@ -25,8 +25,10 @@ export interface Tool {
|
|
|
25
25
|
tool_call_output_timeout_ms?: number | undefined;
|
|
26
26
|
/** The E.164 formatted phone number to transfer calls to. Set to null if the agent should determine the phone number. */
|
|
27
27
|
phone_number?: (string | null) | undefined;
|
|
28
|
-
/** DTMF digits to send after the transfer connects (e.g., "1234"). Defaults to null. */
|
|
28
|
+
/** DTMF digits to send after the transfer connects (e.g., "1234"). Defaults to null. Ignored when dynamic_dtmf is true. */
|
|
29
29
|
dtmf?: (string | null) | undefined;
|
|
30
|
+
/** When true, the agent determines the DTMF digits at call time (and may choose to send none); the static dtmf is ignored. Only sent when use_agent_phone_number is true (not on a SIP REFER transfer). */
|
|
31
|
+
dynamic_dtmf?: boolean | undefined;
|
|
30
32
|
/** When true, Phonic will transfer the call using the agent's phone number. When false, Phonic will transfer the call using the phone number of the party to whom the agent is connected. This is only available for built_in_transfer_to_phone_number tools. */
|
|
31
33
|
use_agent_phone_number?: boolean | undefined;
|
|
32
34
|
/** When true, Phonic will listen in and tell the user if the transfer hits voicemail. This is only available for built_in_transfer_to_phone_number tools when use_agent_phone_number is true. */
|
package/dist/esm/version.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.32.
|
|
1
|
+
export declare const SDK_VERSION = "0.32.9";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "0.32.
|
|
1
|
+
export const SDK_VERSION = "0.32.9";
|