@humeai/voice-embed 0.2.5 → 0.2.7-beta.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.
@@ -0,0 +1,308 @@
1
+ import { Hume } from 'hume';
2
+ import { z } from 'zod';
3
+ export { AssistantMessage, AssistantMessage as AssistantTranscriptMessage, ChatMetadata, ChatMetadata as ChatMetadataMessage, EmotionScores, SubscribeEvent as JSONMessage, SubscribeEvent, ToolCallMessage as ToolCall, ToolCallMessage, ToolErrorMessage as ToolError, ToolErrorMessage, ToolResponseMessage as ToolResponse, ToolResponseMessage, UserMessage, UserMessage as UserTranscriptMessage } from 'hume/api/resources/empathicVoice';
4
+
5
+ /**
6
+
7
+ client frame
8
+
9
+ ┌───────────────────────────┐
10
+ │ mount iframe │ ───────────▶
11
+ └───────────────────────────┘
12
+ ┌───────────────────────────┐
13
+ ◀─────────── │ iframe is ready │
14
+ └───────────────────────────┘
15
+ ┌───────────────────────────┐
16
+ │ send config │ ───────────▶
17
+ └───────────────────────────┘
18
+ ┌───────────────────────────┐
19
+ ◀─────────── │ widget is open │
20
+ └───────────────────────────┘
21
+ ┌───────────────────────────┐
22
+ ◀─────────── │ widget is collapsed │
23
+ └───────────────────────────┘
24
+ ┌───────────────────────────┐
25
+ ◀─────────── │ widget is minimized │
26
+ └───────────────────────────┘
27
+ ┌───────────────────────────┐
28
+ ◀─────────── │ transcript message │
29
+ └───────────────────────────┘
30
+ ┌───────────────────────────┐
31
+ ◀─────────── │ resize window │
32
+ └───────────────────────────┘
33
+ ┌───────────────────────────┐
34
+ │ unmount iframe │ ───────────▶
35
+ └───────────────────────────┘
36
+ */
37
+
38
+ declare const WindowDimensionsSchema: z.ZodObject<{
39
+ width: z.ZodNumber;
40
+ height: z.ZodNumber;
41
+ }, "strip", z.ZodTypeAny, {
42
+ width: number;
43
+ height: number;
44
+ }, {
45
+ width: number;
46
+ height: number;
47
+ }>;
48
+ type WindowDimensions = z.infer<typeof WindowDimensionsSchema>;
49
+ declare const SocketConnect: z.ZodType<Hume.empathicVoice.chat.Chat.ConnectArgs, z.ZodTypeDef, Hume.empathicVoice.chat.Chat.ConnectArgs>;
50
+ type SocketConnectSchema = z.infer<typeof SocketConnect>;
51
+ declare const BaseSocketConfig: z.ZodObject<{
52
+ auth: z.ZodUnion<[z.ZodObject<{
53
+ type: z.ZodLiteral<"apiKey">;
54
+ value: z.ZodString;
55
+ }, "strip", z.ZodTypeAny, {
56
+ value: string;
57
+ type: "apiKey";
58
+ }, {
59
+ value: string;
60
+ type: "apiKey";
61
+ }>, z.ZodObject<{
62
+ type: z.ZodLiteral<"accessToken">;
63
+ value: z.ZodString;
64
+ }, "strip", z.ZodTypeAny, {
65
+ value: string;
66
+ type: "accessToken";
67
+ }, {
68
+ value: string;
69
+ type: "accessToken";
70
+ }>]>;
71
+ hostname: z.ZodOptional<z.ZodString>;
72
+ }, "strip", z.ZodTypeAny, {
73
+ auth: {
74
+ value: string;
75
+ type: "apiKey";
76
+ } | {
77
+ value: string;
78
+ type: "accessToken";
79
+ };
80
+ hostname?: string | undefined;
81
+ }, {
82
+ auth: {
83
+ value: string;
84
+ type: "apiKey";
85
+ } | {
86
+ value: string;
87
+ type: "accessToken";
88
+ };
89
+ hostname?: string | undefined;
90
+ }>;
91
+ type SocketAuthSchema = z.infer<typeof BaseSocketConfig>;
92
+ type SocketConfig = SocketAuthSchema & SocketConnectSchema;
93
+ declare const ClientToFrameActionSchema: z.ZodUnion<[z.ZodObject<{
94
+ type: z.ZodLiteral<"update_config">;
95
+ payload: z.ZodType<SocketConfig, z.ZodTypeDef, SocketConfig>;
96
+ }, "strip", z.ZodTypeAny, {
97
+ type: "update_config";
98
+ payload: {
99
+ auth: {
100
+ value: string;
101
+ type: "apiKey";
102
+ } | {
103
+ value: string;
104
+ type: "accessToken";
105
+ };
106
+ hostname?: string | undefined;
107
+ } & Hume.empathicVoice.chat.Chat.ConnectArgs;
108
+ }, {
109
+ type: "update_config";
110
+ payload: {
111
+ auth: {
112
+ value: string;
113
+ type: "apiKey";
114
+ } | {
115
+ value: string;
116
+ type: "accessToken";
117
+ };
118
+ hostname?: string | undefined;
119
+ } & Hume.empathicVoice.chat.Chat.ConnectArgs;
120
+ }>, z.ZodObject<{
121
+ type: z.ZodLiteral<"cancel">;
122
+ }, "strip", z.ZodTypeAny, {
123
+ type: "cancel";
124
+ }, {
125
+ type: "cancel";
126
+ }>, z.ZodObject<{
127
+ type: z.ZodLiteral<"expand_widget_from_client">;
128
+ payload: z.ZodObject<{
129
+ width: z.ZodNumber;
130
+ height: z.ZodNumber;
131
+ }, "strip", z.ZodTypeAny, {
132
+ width: number;
133
+ height: number;
134
+ }, {
135
+ width: number;
136
+ height: number;
137
+ }>;
138
+ }, "strip", z.ZodTypeAny, {
139
+ type: "expand_widget_from_client";
140
+ payload: {
141
+ width: number;
142
+ height: number;
143
+ };
144
+ }, {
145
+ type: "expand_widget_from_client";
146
+ payload: {
147
+ width: number;
148
+ height: number;
149
+ };
150
+ }>, z.ZodObject<{
151
+ type: z.ZodLiteral<"send_window_size">;
152
+ payload: z.ZodObject<{
153
+ width: z.ZodNumber;
154
+ height: z.ZodNumber;
155
+ }, "strip", z.ZodTypeAny, {
156
+ width: number;
157
+ height: number;
158
+ }, {
159
+ width: number;
160
+ height: number;
161
+ }>;
162
+ }, "strip", z.ZodTypeAny, {
163
+ type: "send_window_size";
164
+ payload: {
165
+ width: number;
166
+ height: number;
167
+ };
168
+ }, {
169
+ type: "send_window_size";
170
+ payload: {
171
+ width: number;
172
+ height: number;
173
+ };
174
+ }>]>;
175
+ type ClientToFrameAction = z.infer<typeof ClientToFrameActionSchema>;
176
+ declare const parseClientToFrameAction: (data: unknown) => Promise<ClientToFrameAction>;
177
+ declare const FrameToClientActionSchema: z.ZodUnion<[z.ZodObject<{
178
+ type: z.ZodLiteral<"expand_widget">;
179
+ }, "strip", z.ZodTypeAny, {
180
+ type: "expand_widget";
181
+ }, {
182
+ type: "expand_widget";
183
+ }>, z.ZodObject<{
184
+ type: z.ZodLiteral<"collapse_widget">;
185
+ }, "strip", z.ZodTypeAny, {
186
+ type: "collapse_widget";
187
+ }, {
188
+ type: "collapse_widget";
189
+ }>, z.ZodObject<{
190
+ type: z.ZodLiteral<"minimize_widget">;
191
+ }, "strip", z.ZodTypeAny, {
192
+ type: "minimize_widget";
193
+ }, {
194
+ type: "minimize_widget";
195
+ }>, z.ZodObject<{
196
+ type: z.ZodLiteral<"widget_iframe_is_ready">;
197
+ }, "strip", z.ZodTypeAny, {
198
+ type: "widget_iframe_is_ready";
199
+ }, {
200
+ type: "widget_iframe_is_ready";
201
+ }>, z.ZodObject<{
202
+ type: z.ZodLiteral<"transcript_message">;
203
+ payload: z.ZodType<Hume.empathicVoice.UserMessage | Hume.empathicVoice.AssistantMessage, z.ZodTypeDef, Hume.empathicVoice.UserMessage | Hume.empathicVoice.AssistantMessage>;
204
+ }, "strip", z.ZodTypeAny, {
205
+ type: "transcript_message";
206
+ payload: Hume.empathicVoice.UserMessage | Hume.empathicVoice.AssistantMessage;
207
+ }, {
208
+ type: "transcript_message";
209
+ payload: Hume.empathicVoice.UserMessage | Hume.empathicVoice.AssistantMessage;
210
+ }>, z.ZodObject<{
211
+ type: z.ZodLiteral<"resize_frame">;
212
+ payload: z.ZodObject<{
213
+ width: z.ZodNumber;
214
+ height: z.ZodNumber;
215
+ }, "strip", z.ZodTypeAny, {
216
+ width: number;
217
+ height: number;
218
+ }, {
219
+ width: number;
220
+ height: number;
221
+ }>;
222
+ }, "strip", z.ZodTypeAny, {
223
+ type: "resize_frame";
224
+ payload: {
225
+ width: number;
226
+ height: number;
227
+ };
228
+ }, {
229
+ type: "resize_frame";
230
+ payload: {
231
+ width: number;
232
+ height: number;
233
+ };
234
+ }>]>;
235
+ type FrameToClientAction = z.infer<typeof FrameToClientActionSchema>;
236
+ declare const EXPAND_WIDGET_ACTION: {
237
+ type: "expand_widget";
238
+ };
239
+ declare const COLLAPSE_WIDGET_ACTION: {
240
+ type: "collapse_widget";
241
+ };
242
+ declare const MINIMIZE_WIDGET_ACTION: {
243
+ type: "minimize_widget";
244
+ };
245
+ declare const WIDGET_IFRAME_IS_READY_ACTION: {
246
+ type: "widget_iframe_is_ready";
247
+ };
248
+ declare const TRANSCRIPT_MESSAGE_ACTION: (message: Hume.empathicVoice.UserMessage | Hume.empathicVoice.AssistantMessage) => {
249
+ type: "transcript_message";
250
+ payload: Hume.empathicVoice.UserMessage | Hume.empathicVoice.AssistantMessage;
251
+ };
252
+ declare const RESIZE_FRAME_ACTION: (dimensions: {
253
+ width: number;
254
+ height: number;
255
+ }) => {
256
+ type: "resize_frame";
257
+ payload: {
258
+ width: number;
259
+ height: number;
260
+ };
261
+ };
262
+
263
+ type EmbeddedVoiceConfig = {
264
+ rendererUrl?: string;
265
+ iframeTitle?: string;
266
+ } & SocketConfig;
267
+ type TranscriptMessageHandler = (message: Hume.empathicVoice.UserMessage | Hume.empathicVoice.AssistantMessage) => void;
268
+ type CloseHandler = () => void;
269
+ declare class EmbeddedVoice {
270
+ private iframe;
271
+ private isMounted;
272
+ private managedContainer;
273
+ private config;
274
+ private onMessage;
275
+ private onClose;
276
+ private openOnMount;
277
+ private constructor();
278
+ static create({ rendererUrl, onMessage, onClose, openOnMount, ...config }: EmbeddedVoiceConfig & {
279
+ onMessage?: TranscriptMessageHandler;
280
+ onClose?: CloseHandler;
281
+ openOnMount?: boolean;
282
+ }): EmbeddedVoice;
283
+ mount(container?: HTMLElement): () => void;
284
+ private createContainer;
285
+ private createIframe;
286
+ private messageHandler;
287
+ openEmbed(): void;
288
+ private sendConfigObject;
289
+ private sendWindowSize;
290
+ private sendMessageToFrame;
291
+ private showIframe;
292
+ private hideIframe;
293
+ private resizeIframe;
294
+ }
295
+
296
+ declare enum LanguageModelOption {
297
+ CLAUDE_3_OPUS = "CLAUDE_3_OPUS",
298
+ CLAUDE_3_SONNET = "CLAUDE_3_SONNET",
299
+ CLAUDE_3_HAIKU = "CLAUDE_3_HAIKU",
300
+ CLAUDE_21 = "CLAUDE_21",
301
+ CLAUDE_INSTANT_12 = "CLAUDE_INSTANT_12",
302
+ GPT_4_TURBO_PREVIEW = "GPT_4_TURBO_PREVIEW",
303
+ GPT_35_TURBO_0125 = "GPT_35_TURBO_0125",
304
+ GPT_35_TURBO = "GPT_35_TURBO",
305
+ FIREWORKS_MIXTRAL_8X7B = "FIREWORKS_MIXTRAL_8X7B"
306
+ }
307
+
308
+ export { COLLAPSE_WIDGET_ACTION, type CloseHandler, EXPAND_WIDGET_ACTION, EmbeddedVoice, type EmbeddedVoiceConfig, type FrameToClientAction, LanguageModelOption, MINIMIZE_WIDGET_ACTION, RESIZE_FRAME_ACTION, type SocketConfig, TRANSCRIPT_MESSAGE_ACTION, type TranscriptMessageHandler, WIDGET_IFRAME_IS_READY_ACTION, type WindowDimensions, parseClientToFrameAction };
@@ -0,0 +1,308 @@
1
+ import { Hume } from 'hume';
2
+ import { z } from 'zod';
3
+ export { AssistantMessage, AssistantMessage as AssistantTranscriptMessage, ChatMetadata, ChatMetadata as ChatMetadataMessage, EmotionScores, SubscribeEvent as JSONMessage, SubscribeEvent, ToolCallMessage as ToolCall, ToolCallMessage, ToolErrorMessage as ToolError, ToolErrorMessage, ToolResponseMessage as ToolResponse, ToolResponseMessage, UserMessage, UserMessage as UserTranscriptMessage } from 'hume/api/resources/empathicVoice';
4
+
5
+ /**
6
+
7
+ client frame
8
+
9
+ ┌───────────────────────────┐
10
+ │ mount iframe │ ───────────▶
11
+ └───────────────────────────┘
12
+ ┌───────────────────────────┐
13
+ ◀─────────── │ iframe is ready │
14
+ └───────────────────────────┘
15
+ ┌───────────────────────────┐
16
+ │ send config │ ───────────▶
17
+ └───────────────────────────┘
18
+ ┌───────────────────────────┐
19
+ ◀─────────── │ widget is open │
20
+ └───────────────────────────┘
21
+ ┌───────────────────────────┐
22
+ ◀─────────── │ widget is collapsed │
23
+ └───────────────────────────┘
24
+ ┌───────────────────────────┐
25
+ ◀─────────── │ widget is minimized │
26
+ └───────────────────────────┘
27
+ ┌───────────────────────────┐
28
+ ◀─────────── │ transcript message │
29
+ └───────────────────────────┘
30
+ ┌───────────────────────────┐
31
+ ◀─────────── │ resize window │
32
+ └───────────────────────────┘
33
+ ┌───────────────────────────┐
34
+ │ unmount iframe │ ───────────▶
35
+ └───────────────────────────┘
36
+ */
37
+
38
+ declare const WindowDimensionsSchema: z.ZodObject<{
39
+ width: z.ZodNumber;
40
+ height: z.ZodNumber;
41
+ }, "strip", z.ZodTypeAny, {
42
+ width: number;
43
+ height: number;
44
+ }, {
45
+ width: number;
46
+ height: number;
47
+ }>;
48
+ type WindowDimensions = z.infer<typeof WindowDimensionsSchema>;
49
+ declare const SocketConnect: z.ZodType<Hume.empathicVoice.chat.Chat.ConnectArgs, z.ZodTypeDef, Hume.empathicVoice.chat.Chat.ConnectArgs>;
50
+ type SocketConnectSchema = z.infer<typeof SocketConnect>;
51
+ declare const BaseSocketConfig: z.ZodObject<{
52
+ auth: z.ZodUnion<[z.ZodObject<{
53
+ type: z.ZodLiteral<"apiKey">;
54
+ value: z.ZodString;
55
+ }, "strip", z.ZodTypeAny, {
56
+ value: string;
57
+ type: "apiKey";
58
+ }, {
59
+ value: string;
60
+ type: "apiKey";
61
+ }>, z.ZodObject<{
62
+ type: z.ZodLiteral<"accessToken">;
63
+ value: z.ZodString;
64
+ }, "strip", z.ZodTypeAny, {
65
+ value: string;
66
+ type: "accessToken";
67
+ }, {
68
+ value: string;
69
+ type: "accessToken";
70
+ }>]>;
71
+ hostname: z.ZodOptional<z.ZodString>;
72
+ }, "strip", z.ZodTypeAny, {
73
+ auth: {
74
+ value: string;
75
+ type: "apiKey";
76
+ } | {
77
+ value: string;
78
+ type: "accessToken";
79
+ };
80
+ hostname?: string | undefined;
81
+ }, {
82
+ auth: {
83
+ value: string;
84
+ type: "apiKey";
85
+ } | {
86
+ value: string;
87
+ type: "accessToken";
88
+ };
89
+ hostname?: string | undefined;
90
+ }>;
91
+ type SocketAuthSchema = z.infer<typeof BaseSocketConfig>;
92
+ type SocketConfig = SocketAuthSchema & SocketConnectSchema;
93
+ declare const ClientToFrameActionSchema: z.ZodUnion<[z.ZodObject<{
94
+ type: z.ZodLiteral<"update_config">;
95
+ payload: z.ZodType<SocketConfig, z.ZodTypeDef, SocketConfig>;
96
+ }, "strip", z.ZodTypeAny, {
97
+ type: "update_config";
98
+ payload: {
99
+ auth: {
100
+ value: string;
101
+ type: "apiKey";
102
+ } | {
103
+ value: string;
104
+ type: "accessToken";
105
+ };
106
+ hostname?: string | undefined;
107
+ } & Hume.empathicVoice.chat.Chat.ConnectArgs;
108
+ }, {
109
+ type: "update_config";
110
+ payload: {
111
+ auth: {
112
+ value: string;
113
+ type: "apiKey";
114
+ } | {
115
+ value: string;
116
+ type: "accessToken";
117
+ };
118
+ hostname?: string | undefined;
119
+ } & Hume.empathicVoice.chat.Chat.ConnectArgs;
120
+ }>, z.ZodObject<{
121
+ type: z.ZodLiteral<"cancel">;
122
+ }, "strip", z.ZodTypeAny, {
123
+ type: "cancel";
124
+ }, {
125
+ type: "cancel";
126
+ }>, z.ZodObject<{
127
+ type: z.ZodLiteral<"expand_widget_from_client">;
128
+ payload: z.ZodObject<{
129
+ width: z.ZodNumber;
130
+ height: z.ZodNumber;
131
+ }, "strip", z.ZodTypeAny, {
132
+ width: number;
133
+ height: number;
134
+ }, {
135
+ width: number;
136
+ height: number;
137
+ }>;
138
+ }, "strip", z.ZodTypeAny, {
139
+ type: "expand_widget_from_client";
140
+ payload: {
141
+ width: number;
142
+ height: number;
143
+ };
144
+ }, {
145
+ type: "expand_widget_from_client";
146
+ payload: {
147
+ width: number;
148
+ height: number;
149
+ };
150
+ }>, z.ZodObject<{
151
+ type: z.ZodLiteral<"send_window_size">;
152
+ payload: z.ZodObject<{
153
+ width: z.ZodNumber;
154
+ height: z.ZodNumber;
155
+ }, "strip", z.ZodTypeAny, {
156
+ width: number;
157
+ height: number;
158
+ }, {
159
+ width: number;
160
+ height: number;
161
+ }>;
162
+ }, "strip", z.ZodTypeAny, {
163
+ type: "send_window_size";
164
+ payload: {
165
+ width: number;
166
+ height: number;
167
+ };
168
+ }, {
169
+ type: "send_window_size";
170
+ payload: {
171
+ width: number;
172
+ height: number;
173
+ };
174
+ }>]>;
175
+ type ClientToFrameAction = z.infer<typeof ClientToFrameActionSchema>;
176
+ declare const parseClientToFrameAction: (data: unknown) => Promise<ClientToFrameAction>;
177
+ declare const FrameToClientActionSchema: z.ZodUnion<[z.ZodObject<{
178
+ type: z.ZodLiteral<"expand_widget">;
179
+ }, "strip", z.ZodTypeAny, {
180
+ type: "expand_widget";
181
+ }, {
182
+ type: "expand_widget";
183
+ }>, z.ZodObject<{
184
+ type: z.ZodLiteral<"collapse_widget">;
185
+ }, "strip", z.ZodTypeAny, {
186
+ type: "collapse_widget";
187
+ }, {
188
+ type: "collapse_widget";
189
+ }>, z.ZodObject<{
190
+ type: z.ZodLiteral<"minimize_widget">;
191
+ }, "strip", z.ZodTypeAny, {
192
+ type: "minimize_widget";
193
+ }, {
194
+ type: "minimize_widget";
195
+ }>, z.ZodObject<{
196
+ type: z.ZodLiteral<"widget_iframe_is_ready">;
197
+ }, "strip", z.ZodTypeAny, {
198
+ type: "widget_iframe_is_ready";
199
+ }, {
200
+ type: "widget_iframe_is_ready";
201
+ }>, z.ZodObject<{
202
+ type: z.ZodLiteral<"transcript_message">;
203
+ payload: z.ZodType<Hume.empathicVoice.UserMessage | Hume.empathicVoice.AssistantMessage, z.ZodTypeDef, Hume.empathicVoice.UserMessage | Hume.empathicVoice.AssistantMessage>;
204
+ }, "strip", z.ZodTypeAny, {
205
+ type: "transcript_message";
206
+ payload: Hume.empathicVoice.UserMessage | Hume.empathicVoice.AssistantMessage;
207
+ }, {
208
+ type: "transcript_message";
209
+ payload: Hume.empathicVoice.UserMessage | Hume.empathicVoice.AssistantMessage;
210
+ }>, z.ZodObject<{
211
+ type: z.ZodLiteral<"resize_frame">;
212
+ payload: z.ZodObject<{
213
+ width: z.ZodNumber;
214
+ height: z.ZodNumber;
215
+ }, "strip", z.ZodTypeAny, {
216
+ width: number;
217
+ height: number;
218
+ }, {
219
+ width: number;
220
+ height: number;
221
+ }>;
222
+ }, "strip", z.ZodTypeAny, {
223
+ type: "resize_frame";
224
+ payload: {
225
+ width: number;
226
+ height: number;
227
+ };
228
+ }, {
229
+ type: "resize_frame";
230
+ payload: {
231
+ width: number;
232
+ height: number;
233
+ };
234
+ }>]>;
235
+ type FrameToClientAction = z.infer<typeof FrameToClientActionSchema>;
236
+ declare const EXPAND_WIDGET_ACTION: {
237
+ type: "expand_widget";
238
+ };
239
+ declare const COLLAPSE_WIDGET_ACTION: {
240
+ type: "collapse_widget";
241
+ };
242
+ declare const MINIMIZE_WIDGET_ACTION: {
243
+ type: "minimize_widget";
244
+ };
245
+ declare const WIDGET_IFRAME_IS_READY_ACTION: {
246
+ type: "widget_iframe_is_ready";
247
+ };
248
+ declare const TRANSCRIPT_MESSAGE_ACTION: (message: Hume.empathicVoice.UserMessage | Hume.empathicVoice.AssistantMessage) => {
249
+ type: "transcript_message";
250
+ payload: Hume.empathicVoice.UserMessage | Hume.empathicVoice.AssistantMessage;
251
+ };
252
+ declare const RESIZE_FRAME_ACTION: (dimensions: {
253
+ width: number;
254
+ height: number;
255
+ }) => {
256
+ type: "resize_frame";
257
+ payload: {
258
+ width: number;
259
+ height: number;
260
+ };
261
+ };
262
+
263
+ type EmbeddedVoiceConfig = {
264
+ rendererUrl?: string;
265
+ iframeTitle?: string;
266
+ } & SocketConfig;
267
+ type TranscriptMessageHandler = (message: Hume.empathicVoice.UserMessage | Hume.empathicVoice.AssistantMessage) => void;
268
+ type CloseHandler = () => void;
269
+ declare class EmbeddedVoice {
270
+ private iframe;
271
+ private isMounted;
272
+ private managedContainer;
273
+ private config;
274
+ private onMessage;
275
+ private onClose;
276
+ private openOnMount;
277
+ private constructor();
278
+ static create({ rendererUrl, onMessage, onClose, openOnMount, ...config }: EmbeddedVoiceConfig & {
279
+ onMessage?: TranscriptMessageHandler;
280
+ onClose?: CloseHandler;
281
+ openOnMount?: boolean;
282
+ }): EmbeddedVoice;
283
+ mount(container?: HTMLElement): () => void;
284
+ private createContainer;
285
+ private createIframe;
286
+ private messageHandler;
287
+ openEmbed(): void;
288
+ private sendConfigObject;
289
+ private sendWindowSize;
290
+ private sendMessageToFrame;
291
+ private showIframe;
292
+ private hideIframe;
293
+ private resizeIframe;
294
+ }
295
+
296
+ declare enum LanguageModelOption {
297
+ CLAUDE_3_OPUS = "CLAUDE_3_OPUS",
298
+ CLAUDE_3_SONNET = "CLAUDE_3_SONNET",
299
+ CLAUDE_3_HAIKU = "CLAUDE_3_HAIKU",
300
+ CLAUDE_21 = "CLAUDE_21",
301
+ CLAUDE_INSTANT_12 = "CLAUDE_INSTANT_12",
302
+ GPT_4_TURBO_PREVIEW = "GPT_4_TURBO_PREVIEW",
303
+ GPT_35_TURBO_0125 = "GPT_35_TURBO_0125",
304
+ GPT_35_TURBO = "GPT_35_TURBO",
305
+ FIREWORKS_MIXTRAL_8X7B = "FIREWORKS_MIXTRAL_8X7B"
306
+ }
307
+
308
+ export { COLLAPSE_WIDGET_ACTION, type CloseHandler, EXPAND_WIDGET_ACTION, EmbeddedVoice, type EmbeddedVoiceConfig, type FrameToClientAction, LanguageModelOption, MINIMIZE_WIDGET_ACTION, RESIZE_FRAME_ACTION, type SocketConfig, TRANSCRIPT_MESSAGE_ACTION, type TranscriptMessageHandler, WIDGET_IFRAME_IS_READY_ACTION, type WindowDimensions, parseClientToFrameAction };