@botpress/sdk 0.11.7 → 1.0.0

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.
Files changed (36) hide show
  1. package/.turbo/turbo-build.log +3 -3
  2. package/dist/bot/client/routes.d.ts +1 -1
  3. package/dist/bot/client/types.d.ts +1 -1
  4. package/dist/bot/definition.d.ts +77 -0
  5. package/dist/bot/implementation.d.ts +9 -68
  6. package/dist/bot/index.d.ts +1 -1
  7. package/dist/bot/server.d.ts +1 -1
  8. package/dist/index.d.ts +3 -3
  9. package/dist/index.js +1 -1
  10. package/dist/index.js.map +4 -4
  11. package/dist/integration/client/routes.d.ts +1 -1
  12. package/dist/integration/client/types.d.ts +1 -1
  13. package/dist/integration/context.d.ts +1 -1
  14. package/dist/integration/definition/branded-schema.d.ts +3 -1
  15. package/dist/integration/definition/generic.d.ts +1 -1
  16. package/dist/integration/definition/integration-definition.d.ts +17 -11
  17. package/dist/integration/definition/interface-declaration.d.ts +18 -27
  18. package/dist/integration/definition/types.d.ts +22 -11
  19. package/dist/integration/server.d.ts +1 -1
  20. package/dist/package.d.ts +41 -0
  21. package/dist/schema.d.ts +2 -3
  22. package/dist/utils/index.d.ts +2 -0
  23. package/dist/utils/record-utils.d.ts +2 -0
  24. package/dist/{type-utils.d.ts → utils/type-utils.d.ts} +6 -16
  25. package/package.json +3 -4
  26. package/dist/bot/integration-instance.d.ts +0 -9
  27. package/dist/interfaces/hitl.d.ts +0 -67
  28. package/dist/interfaces/index.d.ts +0 -7
  29. package/dist/interfaces/llm.d.ts +0 -856
  30. package/dist/interfaces/schemas/index.d.ts +0 -1
  31. package/dist/interfaces/schemas/speech-to-text.d.ts +0 -68
  32. package/dist/interfaces/speech-to-text.d.ts +0 -168
  33. package/dist/interfaces/sync.d.ts +0 -125
  34. package/dist/interfaces/text-to-image.d.ts +0 -114
  35. package/dist/interfaces/typing-indicator.d.ts +0 -26
  36. package/dist/utils.d.ts +0 -5
@@ -1,856 +0,0 @@
1
- import { InterfaceDeclaration } from '../integration/definition';
2
- import z from '../zui';
3
- declare const ToolCallSchema: import("@bpinternal/zui").ZodObject<{
4
- id: import("@bpinternal/zui").ZodString;
5
- type: import("@bpinternal/zui").ZodEnum<["function"]>;
6
- function: import("@bpinternal/zui").ZodObject<{
7
- name: import("@bpinternal/zui").ZodString;
8
- arguments: import("@bpinternal/zui").ZodNullable<import("@bpinternal/zui").ZodRecord<import("@bpinternal/zui").ZodString, import("@bpinternal/zui").ZodAny>>;
9
- }, "strip", import("@bpinternal/zui").ZodTypeAny, {
10
- name: string;
11
- arguments: Record<string, any> | null;
12
- }, {
13
- name: string;
14
- arguments: Record<string, any> | null;
15
- }>;
16
- }, "strip", import("@bpinternal/zui").ZodTypeAny, {
17
- function: {
18
- name: string;
19
- arguments: Record<string, any> | null;
20
- };
21
- type: "function";
22
- id: string;
23
- }, {
24
- function: {
25
- name: string;
26
- arguments: Record<string, any> | null;
27
- };
28
- type: "function";
29
- id: string;
30
- }>;
31
- declare const MessageSchema: import("@bpinternal/zui").ZodObject<{
32
- role: import("@bpinternal/zui").ZodEnum<["user", "assistant"]>;
33
- type: import("@bpinternal/zui").ZodDefault<import("@bpinternal/zui").ZodEnum<["text", "tool_calls", "tool_result", "multipart"]>>;
34
- toolCalls: import("@bpinternal/zui").ZodOptional<import("@bpinternal/zui").ZodArray<import("@bpinternal/zui").ZodObject<{
35
- id: import("@bpinternal/zui").ZodString;
36
- type: import("@bpinternal/zui").ZodEnum<["function"]>;
37
- function: import("@bpinternal/zui").ZodObject<{
38
- name: import("@bpinternal/zui").ZodString;
39
- arguments: import("@bpinternal/zui").ZodNullable<import("@bpinternal/zui").ZodRecord<import("@bpinternal/zui").ZodString, import("@bpinternal/zui").ZodAny>>;
40
- }, "strip", import("@bpinternal/zui").ZodTypeAny, {
41
- name: string;
42
- arguments: Record<string, any> | null;
43
- }, {
44
- name: string;
45
- arguments: Record<string, any> | null;
46
- }>;
47
- }, "strip", import("@bpinternal/zui").ZodTypeAny, {
48
- function: {
49
- name: string;
50
- arguments: Record<string, any> | null;
51
- };
52
- type: "function";
53
- id: string;
54
- }, {
55
- function: {
56
- name: string;
57
- arguments: Record<string, any> | null;
58
- };
59
- type: "function";
60
- id: string;
61
- }>, "many">>;
62
- toolResultCallId: import("@bpinternal/zui").ZodOptional<import("@bpinternal/zui").ZodString>;
63
- content: import("@bpinternal/zui").ZodNullable<import("@bpinternal/zui").ZodOptional<import("@bpinternal/zui").ZodUnion<[import("@bpinternal/zui").ZodString, import("@bpinternal/zui").ZodArray<import("@bpinternal/zui").ZodObject<{
64
- type: import("@bpinternal/zui").ZodEnum<["text", "image"]>;
65
- mimeType: import("@bpinternal/zui").ZodOptional<import("@bpinternal/zui").ZodString>;
66
- text: import("@bpinternal/zui").ZodOptional<import("@bpinternal/zui").ZodString>;
67
- url: import("@bpinternal/zui").ZodOptional<import("@bpinternal/zui").ZodString>;
68
- }, "strip", import("@bpinternal/zui").ZodTypeAny, {
69
- type: "text" | "image";
70
- text?: string | undefined;
71
- url?: string | undefined;
72
- mimeType?: string | undefined;
73
- }, {
74
- type: "text" | "image";
75
- text?: string | undefined;
76
- url?: string | undefined;
77
- mimeType?: string | undefined;
78
- }>, "many">]>>>;
79
- }, "strip", import("@bpinternal/zui").ZodTypeAny, {
80
- type: "text" | "tool_calls" | "tool_result" | "multipart";
81
- role: "user" | "assistant";
82
- content?: string | {
83
- type: "text" | "image";
84
- text?: string | undefined;
85
- url?: string | undefined;
86
- mimeType?: string | undefined;
87
- }[] | null | undefined;
88
- toolCalls?: {
89
- function: {
90
- name: string;
91
- arguments: Record<string, any> | null;
92
- };
93
- type: "function";
94
- id: string;
95
- }[] | undefined;
96
- toolResultCallId?: string | undefined;
97
- }, {
98
- role: "user" | "assistant";
99
- type?: "text" | "tool_calls" | "tool_result" | "multipart" | undefined;
100
- content?: string | {
101
- type: "text" | "image";
102
- text?: string | undefined;
103
- url?: string | undefined;
104
- mimeType?: string | undefined;
105
- }[] | null | undefined;
106
- toolCalls?: {
107
- function: {
108
- name: string;
109
- arguments: Record<string, any> | null;
110
- };
111
- type: "function";
112
- id: string;
113
- }[] | undefined;
114
- toolResultCallId?: string | undefined;
115
- }>;
116
- declare const ModelSchema: import("@bpinternal/zui").ZodObject<{
117
- id: import("@bpinternal/zui").ZodString;
118
- name: import("@bpinternal/zui").ZodString;
119
- description: import("@bpinternal/zui").ZodString;
120
- tags: import("@bpinternal/zui").ZodArray<import("@bpinternal/zui").ZodEnum<["recommended", "deprecated", "general-purpose", "low-cost", "vision", "coding", "agents", "function-calling", "roleplay", "storytelling"]>, "many">;
121
- input: import("@bpinternal/zui").ZodObject<{
122
- maxTokens: import("@bpinternal/zui").ZodNumber;
123
- costPer1MTokens: import("@bpinternal/zui").ZodNumber;
124
- }, "strip", import("@bpinternal/zui").ZodTypeAny, {
125
- maxTokens: number;
126
- costPer1MTokens: number;
127
- }, {
128
- maxTokens: number;
129
- costPer1MTokens: number;
130
- }>;
131
- output: import("@bpinternal/zui").ZodObject<{
132
- maxTokens: import("@bpinternal/zui").ZodNumber;
133
- costPer1MTokens: import("@bpinternal/zui").ZodNumber;
134
- }, "strip", import("@bpinternal/zui").ZodTypeAny, {
135
- maxTokens: number;
136
- costPer1MTokens: number;
137
- }, {
138
- maxTokens: number;
139
- costPer1MTokens: number;
140
- }>;
141
- }, "strip", import("@bpinternal/zui").ZodTypeAny, {
142
- id: string;
143
- name: string;
144
- input: {
145
- maxTokens: number;
146
- costPer1MTokens: number;
147
- };
148
- output: {
149
- maxTokens: number;
150
- costPer1MTokens: number;
151
- };
152
- description: string;
153
- tags: ("recommended" | "deprecated" | "general-purpose" | "low-cost" | "vision" | "coding" | "agents" | "function-calling" | "roleplay" | "storytelling")[];
154
- }, {
155
- id: string;
156
- name: string;
157
- input: {
158
- maxTokens: number;
159
- costPer1MTokens: number;
160
- };
161
- output: {
162
- maxTokens: number;
163
- costPer1MTokens: number;
164
- };
165
- description: string;
166
- tags: ("recommended" | "deprecated" | "general-purpose" | "low-cost" | "vision" | "coding" | "agents" | "function-calling" | "roleplay" | "storytelling")[];
167
- }>;
168
- declare const GenerateContentInputBaseSchema: import("@bpinternal/zui").ZodObject<{
169
- model: import("@bpinternal/zui").ZodOptional<import("@bpinternal/zui").ZodObject<{
170
- id: import("@bpinternal/zui").ZodString;
171
- }, "strip", import("@bpinternal/zui").ZodTypeAny, {
172
- id: string;
173
- }, {
174
- id: string;
175
- }>>;
176
- systemPrompt: import("@bpinternal/zui").ZodOptional<import("@bpinternal/zui").ZodString>;
177
- messages: import("@bpinternal/zui").ZodArray<import("@bpinternal/zui").ZodObject<{
178
- role: import("@bpinternal/zui").ZodEnum<["user", "assistant"]>;
179
- type: import("@bpinternal/zui").ZodDefault<import("@bpinternal/zui").ZodEnum<["text", "tool_calls", "tool_result", "multipart"]>>;
180
- toolCalls: import("@bpinternal/zui").ZodOptional<import("@bpinternal/zui").ZodArray<import("@bpinternal/zui").ZodObject<{
181
- id: import("@bpinternal/zui").ZodString;
182
- type: import("@bpinternal/zui").ZodEnum<["function"]>;
183
- function: import("@bpinternal/zui").ZodObject<{
184
- name: import("@bpinternal/zui").ZodString;
185
- arguments: import("@bpinternal/zui").ZodNullable<import("@bpinternal/zui").ZodRecord<import("@bpinternal/zui").ZodString, import("@bpinternal/zui").ZodAny>>;
186
- }, "strip", import("@bpinternal/zui").ZodTypeAny, {
187
- name: string;
188
- arguments: Record<string, any> | null;
189
- }, {
190
- name: string;
191
- arguments: Record<string, any> | null;
192
- }>;
193
- }, "strip", import("@bpinternal/zui").ZodTypeAny, {
194
- function: {
195
- name: string;
196
- arguments: Record<string, any> | null;
197
- };
198
- type: "function";
199
- id: string;
200
- }, {
201
- function: {
202
- name: string;
203
- arguments: Record<string, any> | null;
204
- };
205
- type: "function";
206
- id: string;
207
- }>, "many">>;
208
- toolResultCallId: import("@bpinternal/zui").ZodOptional<import("@bpinternal/zui").ZodString>;
209
- content: import("@bpinternal/zui").ZodNullable<import("@bpinternal/zui").ZodOptional<import("@bpinternal/zui").ZodUnion<[import("@bpinternal/zui").ZodString, import("@bpinternal/zui").ZodArray<import("@bpinternal/zui").ZodObject<{
210
- type: import("@bpinternal/zui").ZodEnum<["text", "image"]>;
211
- mimeType: import("@bpinternal/zui").ZodOptional<import("@bpinternal/zui").ZodString>;
212
- text: import("@bpinternal/zui").ZodOptional<import("@bpinternal/zui").ZodString>;
213
- url: import("@bpinternal/zui").ZodOptional<import("@bpinternal/zui").ZodString>;
214
- }, "strip", import("@bpinternal/zui").ZodTypeAny, {
215
- type: "text" | "image";
216
- text?: string | undefined;
217
- url?: string | undefined;
218
- mimeType?: string | undefined;
219
- }, {
220
- type: "text" | "image";
221
- text?: string | undefined;
222
- url?: string | undefined;
223
- mimeType?: string | undefined;
224
- }>, "many">]>>>;
225
- }, "strip", import("@bpinternal/zui").ZodTypeAny, {
226
- type: "text" | "tool_calls" | "tool_result" | "multipart";
227
- role: "user" | "assistant";
228
- content?: string | {
229
- type: "text" | "image";
230
- text?: string | undefined;
231
- url?: string | undefined;
232
- mimeType?: string | undefined;
233
- }[] | null | undefined;
234
- toolCalls?: {
235
- function: {
236
- name: string;
237
- arguments: Record<string, any> | null;
238
- };
239
- type: "function";
240
- id: string;
241
- }[] | undefined;
242
- toolResultCallId?: string | undefined;
243
- }, {
244
- role: "user" | "assistant";
245
- type?: "text" | "tool_calls" | "tool_result" | "multipart" | undefined;
246
- content?: string | {
247
- type: "text" | "image";
248
- text?: string | undefined;
249
- url?: string | undefined;
250
- mimeType?: string | undefined;
251
- }[] | null | undefined;
252
- toolCalls?: {
253
- function: {
254
- name: string;
255
- arguments: Record<string, any> | null;
256
- };
257
- type: "function";
258
- id: string;
259
- }[] | undefined;
260
- toolResultCallId?: string | undefined;
261
- }>, "many">;
262
- responseFormat: import("@bpinternal/zui").ZodOptional<import("@bpinternal/zui").ZodEnum<["text", "json_object"]>>;
263
- maxTokens: import("@bpinternal/zui").ZodOptional<import("@bpinternal/zui").ZodNumber>;
264
- temperature: import("@bpinternal/zui").ZodDefault<import("@bpinternal/zui").ZodNumber>;
265
- topP: import("@bpinternal/zui").ZodDefault<import("@bpinternal/zui").ZodNumber>;
266
- stopSequences: import("@bpinternal/zui").ZodOptional<import("@bpinternal/zui").ZodArray<import("@bpinternal/zui").ZodString, "many">>;
267
- tools: import("@bpinternal/zui").ZodOptional<import("@bpinternal/zui").ZodArray<import("@bpinternal/zui").ZodObject<{
268
- type: import("@bpinternal/zui").ZodLiteral<"function">;
269
- function: import("@bpinternal/zui").ZodObject<{
270
- name: import("@bpinternal/zui").ZodString;
271
- description: import("@bpinternal/zui").ZodOptional<import("@bpinternal/zui").ZodString>;
272
- argumentsSchema: import("@bpinternal/zui").ZodOptional<import("@bpinternal/zui").ZodObject<{}, "passthrough", import("@bpinternal/zui").ZodTypeAny, import("@bpinternal/zui").objectOutputType<{}, import("@bpinternal/zui").ZodTypeAny, "passthrough">, import("@bpinternal/zui").objectInputType<{}, import("@bpinternal/zui").ZodTypeAny, "passthrough">>>;
273
- }, "strip", import("@bpinternal/zui").ZodTypeAny, {
274
- name: string;
275
- description?: string | undefined;
276
- argumentsSchema?: import("@bpinternal/zui").objectOutputType<{}, import("@bpinternal/zui").ZodTypeAny, "passthrough"> | undefined;
277
- }, {
278
- name: string;
279
- description?: string | undefined;
280
- argumentsSchema?: import("@bpinternal/zui").objectInputType<{}, import("@bpinternal/zui").ZodTypeAny, "passthrough"> | undefined;
281
- }>;
282
- }, "strip", import("@bpinternal/zui").ZodTypeAny, {
283
- function: {
284
- name: string;
285
- description?: string | undefined;
286
- argumentsSchema?: import("@bpinternal/zui").objectOutputType<{}, import("@bpinternal/zui").ZodTypeAny, "passthrough"> | undefined;
287
- };
288
- type: "function";
289
- }, {
290
- function: {
291
- name: string;
292
- description?: string | undefined;
293
- argumentsSchema?: import("@bpinternal/zui").objectInputType<{}, import("@bpinternal/zui").ZodTypeAny, "passthrough"> | undefined;
294
- };
295
- type: "function";
296
- }>, "many">>;
297
- toolChoice: import("@bpinternal/zui").ZodOptional<import("@bpinternal/zui").ZodObject<{
298
- type: import("@bpinternal/zui").ZodOptional<import("@bpinternal/zui").ZodEnum<["auto", "specific", "any", "none", ""]>>;
299
- functionName: import("@bpinternal/zui").ZodOptional<import("@bpinternal/zui").ZodString>;
300
- }, "strip", import("@bpinternal/zui").ZodTypeAny, {
301
- type?: "" | "auto" | "specific" | "any" | "none" | undefined;
302
- functionName?: string | undefined;
303
- }, {
304
- type?: "" | "auto" | "specific" | "any" | "none" | undefined;
305
- functionName?: string | undefined;
306
- }>>;
307
- userId: import("@bpinternal/zui").ZodOptional<import("@bpinternal/zui").ZodString>;
308
- debug: import("@bpinternal/zui").ZodOptional<import("@bpinternal/zui").ZodBoolean>;
309
- meta: import("@bpinternal/zui").ZodOptional<import("@bpinternal/zui").ZodObject<{
310
- promptCategory: import("@bpinternal/zui").ZodOptional<import("@bpinternal/zui").ZodString>;
311
- integrationName: import("@bpinternal/zui").ZodOptional<import("@bpinternal/zui").ZodString>;
312
- }, "strip", import("@bpinternal/zui").ZodTypeAny, {
313
- integrationName?: string | undefined;
314
- promptCategory?: string | undefined;
315
- }, {
316
- integrationName?: string | undefined;
317
- promptCategory?: string | undefined;
318
- }>>;
319
- }, "strip", import("@bpinternal/zui").ZodTypeAny, {
320
- temperature: number;
321
- messages: {
322
- type: "text" | "tool_calls" | "tool_result" | "multipart";
323
- role: "user" | "assistant";
324
- content?: string | {
325
- type: "text" | "image";
326
- text?: string | undefined;
327
- url?: string | undefined;
328
- mimeType?: string | undefined;
329
- }[] | null | undefined;
330
- toolCalls?: {
331
- function: {
332
- name: string;
333
- arguments: Record<string, any> | null;
334
- };
335
- type: "function";
336
- id: string;
337
- }[] | undefined;
338
- toolResultCallId?: string | undefined;
339
- }[];
340
- topP: number;
341
- userId?: string | undefined;
342
- maxTokens?: number | undefined;
343
- model?: {
344
- id: string;
345
- } | undefined;
346
- systemPrompt?: string | undefined;
347
- responseFormat?: "text" | "json_object" | undefined;
348
- stopSequences?: string[] | undefined;
349
- tools?: {
350
- function: {
351
- name: string;
352
- description?: string | undefined;
353
- argumentsSchema?: import("@bpinternal/zui").objectOutputType<{}, import("@bpinternal/zui").ZodTypeAny, "passthrough"> | undefined;
354
- };
355
- type: "function";
356
- }[] | undefined;
357
- toolChoice?: {
358
- type?: "" | "auto" | "specific" | "any" | "none" | undefined;
359
- functionName?: string | undefined;
360
- } | undefined;
361
- debug?: boolean | undefined;
362
- meta?: {
363
- integrationName?: string | undefined;
364
- promptCategory?: string | undefined;
365
- } | undefined;
366
- }, {
367
- messages: {
368
- role: "user" | "assistant";
369
- type?: "text" | "tool_calls" | "tool_result" | "multipart" | undefined;
370
- content?: string | {
371
- type: "text" | "image";
372
- text?: string | undefined;
373
- url?: string | undefined;
374
- mimeType?: string | undefined;
375
- }[] | null | undefined;
376
- toolCalls?: {
377
- function: {
378
- name: string;
379
- arguments: Record<string, any> | null;
380
- };
381
- type: "function";
382
- id: string;
383
- }[] | undefined;
384
- toolResultCallId?: string | undefined;
385
- }[];
386
- temperature?: number | undefined;
387
- userId?: string | undefined;
388
- maxTokens?: number | undefined;
389
- model?: {
390
- id: string;
391
- } | undefined;
392
- systemPrompt?: string | undefined;
393
- responseFormat?: "text" | "json_object" | undefined;
394
- topP?: number | undefined;
395
- stopSequences?: string[] | undefined;
396
- tools?: {
397
- function: {
398
- name: string;
399
- description?: string | undefined;
400
- argumentsSchema?: import("@bpinternal/zui").objectInputType<{}, import("@bpinternal/zui").ZodTypeAny, "passthrough"> | undefined;
401
- };
402
- type: "function";
403
- }[] | undefined;
404
- toolChoice?: {
405
- type?: "" | "auto" | "specific" | "any" | "none" | undefined;
406
- functionName?: string | undefined;
407
- } | undefined;
408
- debug?: boolean | undefined;
409
- meta?: {
410
- integrationName?: string | undefined;
411
- promptCategory?: string | undefined;
412
- } | undefined;
413
- }>;
414
- declare const GenerateContentOutputSchema: import("@bpinternal/zui").ZodObject<{
415
- id: import("@bpinternal/zui").ZodString;
416
- provider: import("@bpinternal/zui").ZodString;
417
- model: import("@bpinternal/zui").ZodString;
418
- choices: import("@bpinternal/zui").ZodArray<import("@bpinternal/zui").ZodObject<{
419
- type: import("@bpinternal/zui").ZodDefault<import("@bpinternal/zui").ZodEnum<["text", "tool_calls", "tool_result", "multipart"]>>;
420
- content: import("@bpinternal/zui").ZodNullable<import("@bpinternal/zui").ZodOptional<import("@bpinternal/zui").ZodUnion<[import("@bpinternal/zui").ZodString, import("@bpinternal/zui").ZodArray<import("@bpinternal/zui").ZodObject<{
421
- type: import("@bpinternal/zui").ZodEnum<["text", "image"]>;
422
- mimeType: import("@bpinternal/zui").ZodOptional<import("@bpinternal/zui").ZodString>;
423
- text: import("@bpinternal/zui").ZodOptional<import("@bpinternal/zui").ZodString>;
424
- url: import("@bpinternal/zui").ZodOptional<import("@bpinternal/zui").ZodString>;
425
- }, "strip", import("@bpinternal/zui").ZodTypeAny, {
426
- type: "text" | "image";
427
- text?: string | undefined;
428
- url?: string | undefined;
429
- mimeType?: string | undefined;
430
- }, {
431
- type: "text" | "image";
432
- text?: string | undefined;
433
- url?: string | undefined;
434
- mimeType?: string | undefined;
435
- }>, "many">]>>>;
436
- toolCalls: import("@bpinternal/zui").ZodOptional<import("@bpinternal/zui").ZodArray<import("@bpinternal/zui").ZodObject<{
437
- id: import("@bpinternal/zui").ZodString;
438
- type: import("@bpinternal/zui").ZodEnum<["function"]>;
439
- function: import("@bpinternal/zui").ZodObject<{
440
- name: import("@bpinternal/zui").ZodString;
441
- arguments: import("@bpinternal/zui").ZodNullable<import("@bpinternal/zui").ZodRecord<import("@bpinternal/zui").ZodString, import("@bpinternal/zui").ZodAny>>;
442
- }, "strip", import("@bpinternal/zui").ZodTypeAny, {
443
- name: string;
444
- arguments: Record<string, any> | null;
445
- }, {
446
- name: string;
447
- arguments: Record<string, any> | null;
448
- }>;
449
- }, "strip", import("@bpinternal/zui").ZodTypeAny, {
450
- function: {
451
- name: string;
452
- arguments: Record<string, any> | null;
453
- };
454
- type: "function";
455
- id: string;
456
- }, {
457
- function: {
458
- name: string;
459
- arguments: Record<string, any> | null;
460
- };
461
- type: "function";
462
- id: string;
463
- }>, "many">>;
464
- toolResultCallId: import("@bpinternal/zui").ZodOptional<import("@bpinternal/zui").ZodString>;
465
- role: import("@bpinternal/zui").ZodLiteral<"assistant">;
466
- index: import("@bpinternal/zui").ZodNumber;
467
- stopReason: import("@bpinternal/zui").ZodEnum<["stop", "max_tokens", "tool_calls", "content_filter", "other"]>;
468
- }, "strip", import("@bpinternal/zui").ZodTypeAny, {
469
- type: "text" | "tool_calls" | "tool_result" | "multipart";
470
- index: number;
471
- role: "assistant";
472
- stopReason: "tool_calls" | "stop" | "max_tokens" | "content_filter" | "other";
473
- content?: string | {
474
- type: "text" | "image";
475
- text?: string | undefined;
476
- url?: string | undefined;
477
- mimeType?: string | undefined;
478
- }[] | null | undefined;
479
- toolCalls?: {
480
- function: {
481
- name: string;
482
- arguments: Record<string, any> | null;
483
- };
484
- type: "function";
485
- id: string;
486
- }[] | undefined;
487
- toolResultCallId?: string | undefined;
488
- }, {
489
- index: number;
490
- role: "assistant";
491
- stopReason: "tool_calls" | "stop" | "max_tokens" | "content_filter" | "other";
492
- type?: "text" | "tool_calls" | "tool_result" | "multipart" | undefined;
493
- content?: string | {
494
- type: "text" | "image";
495
- text?: string | undefined;
496
- url?: string | undefined;
497
- mimeType?: string | undefined;
498
- }[] | null | undefined;
499
- toolCalls?: {
500
- function: {
501
- name: string;
502
- arguments: Record<string, any> | null;
503
- };
504
- type: "function";
505
- id: string;
506
- }[] | undefined;
507
- toolResultCallId?: string | undefined;
508
- }>, "many">;
509
- usage: import("@bpinternal/zui").ZodObject<{
510
- inputTokens: import("@bpinternal/zui").ZodNumber;
511
- inputCost: import("@bpinternal/zui").ZodNumber;
512
- outputTokens: import("@bpinternal/zui").ZodNumber;
513
- outputCost: import("@bpinternal/zui").ZodNumber;
514
- }, "strip", import("@bpinternal/zui").ZodTypeAny, {
515
- inputTokens: number;
516
- inputCost: number;
517
- outputTokens: number;
518
- outputCost: number;
519
- }, {
520
- inputTokens: number;
521
- inputCost: number;
522
- outputTokens: number;
523
- outputCost: number;
524
- }>;
525
- botpress: import("@bpinternal/zui").ZodObject<{
526
- cost: import("@bpinternal/zui").ZodNumber;
527
- }, "strip", import("@bpinternal/zui").ZodTypeAny, {
528
- cost: number;
529
- }, {
530
- cost: number;
531
- }>;
532
- }, "strip", import("@bpinternal/zui").ZodTypeAny, {
533
- id: string;
534
- model: string;
535
- provider: string;
536
- choices: {
537
- type: "text" | "tool_calls" | "tool_result" | "multipart";
538
- index: number;
539
- role: "assistant";
540
- stopReason: "tool_calls" | "stop" | "max_tokens" | "content_filter" | "other";
541
- content?: string | {
542
- type: "text" | "image";
543
- text?: string | undefined;
544
- url?: string | undefined;
545
- mimeType?: string | undefined;
546
- }[] | null | undefined;
547
- toolCalls?: {
548
- function: {
549
- name: string;
550
- arguments: Record<string, any> | null;
551
- };
552
- type: "function";
553
- id: string;
554
- }[] | undefined;
555
- toolResultCallId?: string | undefined;
556
- }[];
557
- usage: {
558
- inputTokens: number;
559
- inputCost: number;
560
- outputTokens: number;
561
- outputCost: number;
562
- };
563
- botpress: {
564
- cost: number;
565
- };
566
- }, {
567
- id: string;
568
- model: string;
569
- provider: string;
570
- choices: {
571
- index: number;
572
- role: "assistant";
573
- stopReason: "tool_calls" | "stop" | "max_tokens" | "content_filter" | "other";
574
- type?: "text" | "tool_calls" | "tool_result" | "multipart" | undefined;
575
- content?: string | {
576
- type: "text" | "image";
577
- text?: string | undefined;
578
- url?: string | undefined;
579
- mimeType?: string | undefined;
580
- }[] | null | undefined;
581
- toolCalls?: {
582
- function: {
583
- name: string;
584
- arguments: Record<string, any> | null;
585
- };
586
- type: "function";
587
- id: string;
588
- }[] | undefined;
589
- toolResultCallId?: string | undefined;
590
- }[];
591
- usage: {
592
- inputTokens: number;
593
- inputCost: number;
594
- outputTokens: number;
595
- outputCost: number;
596
- };
597
- botpress: {
598
- cost: number;
599
- };
600
- }>;
601
- export declare const llm: InterfaceDeclaration<{
602
- modelRef: import("@bpinternal/zui").ZodObject<{
603
- id: import("@bpinternal/zui").ZodString;
604
- }, "strip", import("@bpinternal/zui").ZodTypeAny, {
605
- id: string;
606
- }, {
607
- id: string;
608
- }>;
609
- }, {
610
- generateContent: import("@bpinternal/zui").ZodObject<{
611
- model: import("@bpinternal/zui").ZodOptional<import("@bpinternal/zui").ZodRef>;
612
- systemPrompt: import("@bpinternal/zui").ZodOptional<import("@bpinternal/zui").ZodString>;
613
- messages: import("@bpinternal/zui").ZodArray<import("@bpinternal/zui").ZodObject<{
614
- role: import("@bpinternal/zui").ZodEnum<["user", "assistant"]>;
615
- type: import("@bpinternal/zui").ZodDefault<import("@bpinternal/zui").ZodEnum<["text", "tool_calls", "tool_result", "multipart"]>>;
616
- toolCalls: import("@bpinternal/zui").ZodOptional<import("@bpinternal/zui").ZodArray<import("@bpinternal/zui").ZodObject<{
617
- id: import("@bpinternal/zui").ZodString;
618
- type: import("@bpinternal/zui").ZodEnum<["function"]>;
619
- function: import("@bpinternal/zui").ZodObject<{
620
- name: import("@bpinternal/zui").ZodString;
621
- arguments: import("@bpinternal/zui").ZodNullable<import("@bpinternal/zui").ZodRecord<import("@bpinternal/zui").ZodString, import("@bpinternal/zui").ZodAny>>;
622
- }, "strip", import("@bpinternal/zui").ZodTypeAny, {
623
- name: string;
624
- arguments: Record<string, any> | null;
625
- }, {
626
- name: string;
627
- arguments: Record<string, any> | null;
628
- }>;
629
- }, "strip", import("@bpinternal/zui").ZodTypeAny, {
630
- function: {
631
- name: string;
632
- arguments: Record<string, any> | null;
633
- };
634
- type: "function";
635
- id: string;
636
- }, {
637
- function: {
638
- name: string;
639
- arguments: Record<string, any> | null;
640
- };
641
- type: "function";
642
- id: string;
643
- }>, "many">>;
644
- toolResultCallId: import("@bpinternal/zui").ZodOptional<import("@bpinternal/zui").ZodString>;
645
- content: import("@bpinternal/zui").ZodNullable<import("@bpinternal/zui").ZodOptional<import("@bpinternal/zui").ZodUnion<[import("@bpinternal/zui").ZodString, import("@bpinternal/zui").ZodArray<import("@bpinternal/zui").ZodObject<{
646
- type: import("@bpinternal/zui").ZodEnum<["text", "image"]>;
647
- mimeType: import("@bpinternal/zui").ZodOptional<import("@bpinternal/zui").ZodString>;
648
- text: import("@bpinternal/zui").ZodOptional<import("@bpinternal/zui").ZodString>;
649
- url: import("@bpinternal/zui").ZodOptional<import("@bpinternal/zui").ZodString>;
650
- }, "strip", import("@bpinternal/zui").ZodTypeAny, {
651
- type: "text" | "image";
652
- text?: string | undefined;
653
- url?: string | undefined;
654
- mimeType?: string | undefined;
655
- }, {
656
- type: "text" | "image";
657
- text?: string | undefined;
658
- url?: string | undefined;
659
- mimeType?: string | undefined;
660
- }>, "many">]>>>;
661
- }, "strip", import("@bpinternal/zui").ZodTypeAny, {
662
- type: "text" | "tool_calls" | "tool_result" | "multipart";
663
- role: "user" | "assistant";
664
- content?: string | {
665
- type: "text" | "image";
666
- text?: string | undefined;
667
- url?: string | undefined;
668
- mimeType?: string | undefined;
669
- }[] | null | undefined;
670
- toolCalls?: {
671
- function: {
672
- name: string;
673
- arguments: Record<string, any> | null;
674
- };
675
- type: "function";
676
- id: string;
677
- }[] | undefined;
678
- toolResultCallId?: string | undefined;
679
- }, {
680
- role: "user" | "assistant";
681
- type?: "text" | "tool_calls" | "tool_result" | "multipart" | undefined;
682
- content?: string | {
683
- type: "text" | "image";
684
- text?: string | undefined;
685
- url?: string | undefined;
686
- mimeType?: string | undefined;
687
- }[] | null | undefined;
688
- toolCalls?: {
689
- function: {
690
- name: string;
691
- arguments: Record<string, any> | null;
692
- };
693
- type: "function";
694
- id: string;
695
- }[] | undefined;
696
- toolResultCallId?: string | undefined;
697
- }>, "many">;
698
- responseFormat: import("@bpinternal/zui").ZodOptional<import("@bpinternal/zui").ZodEnum<["text", "json_object"]>>;
699
- maxTokens: import("@bpinternal/zui").ZodOptional<import("@bpinternal/zui").ZodNumber>;
700
- temperature: import("@bpinternal/zui").ZodDefault<import("@bpinternal/zui").ZodNumber>;
701
- topP: import("@bpinternal/zui").ZodDefault<import("@bpinternal/zui").ZodNumber>;
702
- stopSequences: import("@bpinternal/zui").ZodOptional<import("@bpinternal/zui").ZodArray<import("@bpinternal/zui").ZodString, "many">>;
703
- tools: import("@bpinternal/zui").ZodOptional<import("@bpinternal/zui").ZodArray<import("@bpinternal/zui").ZodObject<{
704
- type: import("@bpinternal/zui").ZodLiteral<"function">;
705
- function: import("@bpinternal/zui").ZodObject<{
706
- name: import("@bpinternal/zui").ZodString;
707
- description: import("@bpinternal/zui").ZodOptional<import("@bpinternal/zui").ZodString>;
708
- argumentsSchema: import("@bpinternal/zui").ZodOptional<import("@bpinternal/zui").ZodObject<{}, "passthrough", import("@bpinternal/zui").ZodTypeAny, import("@bpinternal/zui").objectOutputType<{}, import("@bpinternal/zui").ZodTypeAny, "passthrough">, import("@bpinternal/zui").objectInputType<{}, import("@bpinternal/zui").ZodTypeAny, "passthrough">>>;
709
- }, "strip", import("@bpinternal/zui").ZodTypeAny, {
710
- name: string;
711
- description?: string | undefined;
712
- argumentsSchema?: import("@bpinternal/zui").objectOutputType<{}, import("@bpinternal/zui").ZodTypeAny, "passthrough"> | undefined;
713
- }, {
714
- name: string;
715
- description?: string | undefined;
716
- argumentsSchema?: import("@bpinternal/zui").objectInputType<{}, import("@bpinternal/zui").ZodTypeAny, "passthrough"> | undefined;
717
- }>;
718
- }, "strip", import("@bpinternal/zui").ZodTypeAny, {
719
- function: {
720
- name: string;
721
- description?: string | undefined;
722
- argumentsSchema?: import("@bpinternal/zui").objectOutputType<{}, import("@bpinternal/zui").ZodTypeAny, "passthrough"> | undefined;
723
- };
724
- type: "function";
725
- }, {
726
- function: {
727
- name: string;
728
- description?: string | undefined;
729
- argumentsSchema?: import("@bpinternal/zui").objectInputType<{}, import("@bpinternal/zui").ZodTypeAny, "passthrough"> | undefined;
730
- };
731
- type: "function";
732
- }>, "many">>;
733
- toolChoice: import("@bpinternal/zui").ZodOptional<import("@bpinternal/zui").ZodObject<{
734
- type: import("@bpinternal/zui").ZodOptional<import("@bpinternal/zui").ZodEnum<["auto", "specific", "any", "none", ""]>>;
735
- functionName: import("@bpinternal/zui").ZodOptional<import("@bpinternal/zui").ZodString>;
736
- }, "strip", import("@bpinternal/zui").ZodTypeAny, {
737
- type?: "" | "auto" | "specific" | "any" | "none" | undefined;
738
- functionName?: string | undefined;
739
- }, {
740
- type?: "" | "auto" | "specific" | "any" | "none" | undefined;
741
- functionName?: string | undefined;
742
- }>>;
743
- userId: import("@bpinternal/zui").ZodOptional<import("@bpinternal/zui").ZodString>;
744
- debug: import("@bpinternal/zui").ZodOptional<import("@bpinternal/zui").ZodBoolean>;
745
- meta: import("@bpinternal/zui").ZodOptional<import("@bpinternal/zui").ZodObject<{
746
- promptCategory: import("@bpinternal/zui").ZodOptional<import("@bpinternal/zui").ZodString>;
747
- integrationName: import("@bpinternal/zui").ZodOptional<import("@bpinternal/zui").ZodString>;
748
- }, "strip", import("@bpinternal/zui").ZodTypeAny, {
749
- integrationName?: string | undefined;
750
- promptCategory?: string | undefined;
751
- }, {
752
- integrationName?: string | undefined;
753
- promptCategory?: string | undefined;
754
- }>>;
755
- }, "strip", import("@bpinternal/zui").ZodTypeAny, {
756
- temperature: number;
757
- messages: {
758
- type: "text" | "tool_calls" | "tool_result" | "multipart";
759
- role: "user" | "assistant";
760
- content?: string | {
761
- type: "text" | "image";
762
- text?: string | undefined;
763
- url?: string | undefined;
764
- mimeType?: string | undefined;
765
- }[] | null | undefined;
766
- toolCalls?: {
767
- function: {
768
- name: string;
769
- arguments: Record<string, any> | null;
770
- };
771
- type: "function";
772
- id: string;
773
- }[] | undefined;
774
- toolResultCallId?: string | undefined;
775
- }[];
776
- topP: number;
777
- userId?: string | undefined;
778
- maxTokens?: number | undefined;
779
- model?: {} | undefined;
780
- systemPrompt?: string | undefined;
781
- responseFormat?: "text" | "json_object" | undefined;
782
- stopSequences?: string[] | undefined;
783
- tools?: {
784
- function: {
785
- name: string;
786
- description?: string | undefined;
787
- argumentsSchema?: import("@bpinternal/zui").objectOutputType<{}, import("@bpinternal/zui").ZodTypeAny, "passthrough"> | undefined;
788
- };
789
- type: "function";
790
- }[] | undefined;
791
- toolChoice?: {
792
- type?: "" | "auto" | "specific" | "any" | "none" | undefined;
793
- functionName?: string | undefined;
794
- } | undefined;
795
- debug?: boolean | undefined;
796
- meta?: {
797
- integrationName?: string | undefined;
798
- promptCategory?: string | undefined;
799
- } | undefined;
800
- }, {
801
- messages: {
802
- role: "user" | "assistant";
803
- type?: "text" | "tool_calls" | "tool_result" | "multipart" | undefined;
804
- content?: string | {
805
- type: "text" | "image";
806
- text?: string | undefined;
807
- url?: string | undefined;
808
- mimeType?: string | undefined;
809
- }[] | null | undefined;
810
- toolCalls?: {
811
- function: {
812
- name: string;
813
- arguments: Record<string, any> | null;
814
- };
815
- type: "function";
816
- id: string;
817
- }[] | undefined;
818
- toolResultCallId?: string | undefined;
819
- }[];
820
- temperature?: number | undefined;
821
- userId?: string | undefined;
822
- maxTokens?: number | undefined;
823
- model?: {} | undefined;
824
- systemPrompt?: string | undefined;
825
- responseFormat?: "text" | "json_object" | undefined;
826
- topP?: number | undefined;
827
- stopSequences?: string[] | undefined;
828
- tools?: {
829
- function: {
830
- name: string;
831
- description?: string | undefined;
832
- argumentsSchema?: import("@bpinternal/zui").objectInputType<{}, import("@bpinternal/zui").ZodTypeAny, "passthrough"> | undefined;
833
- };
834
- type: "function";
835
- }[] | undefined;
836
- toolChoice?: {
837
- type?: "" | "auto" | "specific" | "any" | "none" | undefined;
838
- functionName?: string | undefined;
839
- } | undefined;
840
- debug?: boolean | undefined;
841
- meta?: {
842
- integrationName?: string | undefined;
843
- promptCategory?: string | undefined;
844
- } | undefined;
845
- }>;
846
- listLanguageModels: import("@bpinternal/zui").ZodObject<{}, "strip", import("@bpinternal/zui").ZodTypeAny, {}, {}>;
847
- }, import("../integration/definition/generic").BaseEvents>;
848
- export declare namespace llm {
849
- type GenerateContentInput = z.infer<typeof GenerateContentInputBaseSchema>;
850
- type GenerateContentOutput = z.infer<typeof GenerateContentOutputSchema>;
851
- type ToolCall = z.infer<typeof ToolCallSchema>;
852
- type Message = z.infer<typeof MessageSchema>;
853
- type Model = z.infer<typeof ModelSchema>;
854
- type ModelDetails = Omit<Model, 'id'>;
855
- }
856
- export {};