@adaline/vertex 0.1.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.
@@ -0,0 +1,1070 @@
1
+ import { z } from 'zod';
2
+ import { ChatModelSchemaType, HeadersType, EmbeddingModelV1, EmbeddingModelSchemaType, UrlType, ParamsType, ProviderV1, ChatModelV1 } from '@adaline/provider';
3
+ import { BaseChatModel } from '@adaline/google';
4
+ import { EmbeddingRequestsType, ConfigType, EmbeddingResponseType } from '@adaline/types';
5
+
6
+ declare const BaseChatModelVertexOptions: z.ZodObject<{
7
+ accessToken: z.ZodString;
8
+ modelId: z.ZodOptional<z.ZodString>;
9
+ baseUrl: z.ZodOptional<z.ZodString>;
10
+ location: z.ZodOptional<z.ZodString>;
11
+ projectId: z.ZodOptional<z.ZodString>;
12
+ publisher: z.ZodOptional<z.ZodString>;
13
+ }, "strip", z.ZodTypeAny, {
14
+ accessToken: string;
15
+ modelId?: string | undefined;
16
+ baseUrl?: string | undefined;
17
+ location?: string | undefined;
18
+ projectId?: string | undefined;
19
+ publisher?: string | undefined;
20
+ }, {
21
+ accessToken: string;
22
+ modelId?: string | undefined;
23
+ baseUrl?: string | undefined;
24
+ location?: string | undefined;
25
+ projectId?: string | undefined;
26
+ publisher?: string | undefined;
27
+ }>;
28
+ type BaseChatModelVertexOptionsType = z.infer<typeof BaseChatModelVertexOptions>;
29
+ declare class BaseChatModelVertex extends BaseChatModel {
30
+ readonly version: "v1";
31
+ modelSchema: ChatModelSchemaType;
32
+ private readonly accessToken;
33
+ private readonly modelId;
34
+ private readonly location;
35
+ private readonly projectId;
36
+ private readonly publisher;
37
+ constructor(modelSchema: ChatModelSchemaType, options: BaseChatModelVertexOptionsType);
38
+ getDefaultHeaders(): HeadersType;
39
+ }
40
+
41
+ declare const Gemini1_0ProLiteral: "gemini-1.0-pro";
42
+ declare const Gemini1_0ProSchema: {
43
+ description: string;
44
+ maxOutputTokens: number;
45
+ name: string;
46
+ roles: Partial<Record<"system" | "user" | "assistant" | "tool", string | undefined>>;
47
+ modalities: ["text" | "tool-call" | "tool-response", ...("text" | "tool-call" | "tool-response")[]];
48
+ maxInputTokens: number;
49
+ config: {
50
+ def: Record<string, {
51
+ type: "multi-string";
52
+ param: string;
53
+ title: string;
54
+ description: string;
55
+ max: number;
56
+ } | {
57
+ type: "range";
58
+ param: string;
59
+ title: string;
60
+ description: string;
61
+ max: number;
62
+ min: number;
63
+ step: number;
64
+ default: number;
65
+ } | {
66
+ type: "select-string";
67
+ param: string;
68
+ title: string;
69
+ description: string;
70
+ default: string | null;
71
+ choices: string[];
72
+ } | {
73
+ type: "object-schema";
74
+ param: string;
75
+ title: string;
76
+ description: string;
77
+ objectSchema?: any;
78
+ } | {
79
+ type: "select-boolean";
80
+ param: string;
81
+ title: string;
82
+ description: string;
83
+ default: boolean | null;
84
+ }>;
85
+ schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
86
+ };
87
+ };
88
+ declare const Gemini1_0ProOptions: z.ZodObject<{
89
+ accessToken: z.ZodString;
90
+ modelId: z.ZodOptional<z.ZodString>;
91
+ baseUrl: z.ZodOptional<z.ZodString>;
92
+ location: z.ZodOptional<z.ZodString>;
93
+ projectId: z.ZodOptional<z.ZodString>;
94
+ publisher: z.ZodOptional<z.ZodString>;
95
+ }, "strip", z.ZodTypeAny, {
96
+ accessToken: string;
97
+ modelId?: string | undefined;
98
+ baseUrl?: string | undefined;
99
+ location?: string | undefined;
100
+ projectId?: string | undefined;
101
+ publisher?: string | undefined;
102
+ }, {
103
+ accessToken: string;
104
+ modelId?: string | undefined;
105
+ baseUrl?: string | undefined;
106
+ location?: string | undefined;
107
+ projectId?: string | undefined;
108
+ publisher?: string | undefined;
109
+ }>;
110
+ type Gemini1_0ProOptionsType = z.infer<typeof Gemini1_0ProOptions>;
111
+ declare class Gemini1_0Pro extends BaseChatModelVertex {
112
+ constructor(options: Gemini1_0ProOptionsType);
113
+ }
114
+
115
+ declare const Gemini1_0Pro001Literal: "gemini-1.0-pro-001";
116
+ declare const Gemini1_0Pro001Schema: {
117
+ description: string;
118
+ maxOutputTokens: number;
119
+ name: string;
120
+ roles: Partial<Record<"system" | "user" | "assistant" | "tool", string | undefined>>;
121
+ modalities: ["text" | "tool-call" | "tool-response", ...("text" | "tool-call" | "tool-response")[]];
122
+ maxInputTokens: number;
123
+ config: {
124
+ def: Record<string, {
125
+ type: "multi-string";
126
+ param: string;
127
+ title: string;
128
+ description: string;
129
+ max: number;
130
+ } | {
131
+ type: "range";
132
+ param: string;
133
+ title: string;
134
+ description: string;
135
+ max: number;
136
+ min: number;
137
+ step: number;
138
+ default: number;
139
+ } | {
140
+ type: "select-string";
141
+ param: string;
142
+ title: string;
143
+ description: string;
144
+ default: string | null;
145
+ choices: string[];
146
+ } | {
147
+ type: "object-schema";
148
+ param: string;
149
+ title: string;
150
+ description: string;
151
+ objectSchema?: any;
152
+ } | {
153
+ type: "select-boolean";
154
+ param: string;
155
+ title: string;
156
+ description: string;
157
+ default: boolean | null;
158
+ }>;
159
+ schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
160
+ };
161
+ };
162
+ declare const Gemini1_0Pro001Options: z.ZodObject<{
163
+ accessToken: z.ZodString;
164
+ modelId: z.ZodOptional<z.ZodString>;
165
+ baseUrl: z.ZodOptional<z.ZodString>;
166
+ location: z.ZodOptional<z.ZodString>;
167
+ projectId: z.ZodOptional<z.ZodString>;
168
+ publisher: z.ZodOptional<z.ZodString>;
169
+ }, "strip", z.ZodTypeAny, {
170
+ accessToken: string;
171
+ modelId?: string | undefined;
172
+ baseUrl?: string | undefined;
173
+ location?: string | undefined;
174
+ projectId?: string | undefined;
175
+ publisher?: string | undefined;
176
+ }, {
177
+ accessToken: string;
178
+ modelId?: string | undefined;
179
+ baseUrl?: string | undefined;
180
+ location?: string | undefined;
181
+ projectId?: string | undefined;
182
+ publisher?: string | undefined;
183
+ }>;
184
+ type Gemini1_0Pro001OptionsType = z.infer<typeof Gemini1_0Pro001Options>;
185
+ declare class Gemini1_0Pro001 extends BaseChatModelVertex {
186
+ constructor(options: Gemini1_0Pro001OptionsType);
187
+ }
188
+
189
+ declare const Gemini1_0ProVisionLiteral: "gemini-1.0-pro-vision";
190
+ declare const Gemini1_0ProVisionSchema: {
191
+ description: string;
192
+ maxOutputTokens: number;
193
+ name: string;
194
+ roles: Partial<Record<"system" | "user" | "assistant" | "tool", string | undefined>>;
195
+ modalities: ["text" | "image", ...("text" | "image")[]];
196
+ maxInputTokens: number;
197
+ config: {
198
+ def: Record<string, {
199
+ type: "multi-string";
200
+ param: string;
201
+ title: string;
202
+ description: string;
203
+ max: number;
204
+ } | {
205
+ type: "range";
206
+ param: string;
207
+ title: string;
208
+ description: string;
209
+ max: number;
210
+ min: number;
211
+ step: number;
212
+ default: number;
213
+ } | {
214
+ type: "select-string";
215
+ param: string;
216
+ title: string;
217
+ description: string;
218
+ default: string | null;
219
+ choices: string[];
220
+ } | {
221
+ type: "object-schema";
222
+ param: string;
223
+ title: string;
224
+ description: string;
225
+ objectSchema?: any;
226
+ } | {
227
+ type: "select-boolean";
228
+ param: string;
229
+ title: string;
230
+ description: string;
231
+ default: boolean | null;
232
+ }>;
233
+ schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
234
+ };
235
+ };
236
+ declare const Gemini1_0ProVisionOptions: z.ZodObject<{
237
+ accessToken: z.ZodString;
238
+ modelId: z.ZodOptional<z.ZodString>;
239
+ baseUrl: z.ZodOptional<z.ZodString>;
240
+ location: z.ZodOptional<z.ZodString>;
241
+ projectId: z.ZodOptional<z.ZodString>;
242
+ publisher: z.ZodOptional<z.ZodString>;
243
+ }, "strip", z.ZodTypeAny, {
244
+ accessToken: string;
245
+ modelId?: string | undefined;
246
+ baseUrl?: string | undefined;
247
+ location?: string | undefined;
248
+ projectId?: string | undefined;
249
+ publisher?: string | undefined;
250
+ }, {
251
+ accessToken: string;
252
+ modelId?: string | undefined;
253
+ baseUrl?: string | undefined;
254
+ location?: string | undefined;
255
+ projectId?: string | undefined;
256
+ publisher?: string | undefined;
257
+ }>;
258
+ type Gemini1_0ProVisionOptionsType = z.infer<typeof Gemini1_0ProVisionOptions>;
259
+ declare class Gemini1_0ProVision extends BaseChatModelVertex {
260
+ constructor(options: Gemini1_0ProVisionOptionsType);
261
+ }
262
+
263
+ declare const Gemini1_5Flash001Literal: "gemini-1.5-flash-001";
264
+ declare const Gemini1_5Flash001Schema: {
265
+ description: string;
266
+ maxOutputTokens: number;
267
+ name: string;
268
+ roles: Partial<Record<"system" | "user" | "assistant" | "tool", string | undefined>>;
269
+ modalities: ["text" | "image" | "tool-call" | "tool-response", ...("text" | "image" | "tool-call" | "tool-response")[]];
270
+ maxInputTokens: number;
271
+ config: {
272
+ def: Record<string, {
273
+ type: "multi-string";
274
+ param: string;
275
+ title: string;
276
+ description: string;
277
+ max: number;
278
+ } | {
279
+ type: "range";
280
+ param: string;
281
+ title: string;
282
+ description: string;
283
+ max: number;
284
+ min: number;
285
+ step: number;
286
+ default: number;
287
+ } | {
288
+ type: "select-string";
289
+ param: string;
290
+ title: string;
291
+ description: string;
292
+ default: string | null;
293
+ choices: string[];
294
+ } | {
295
+ type: "object-schema";
296
+ param: string;
297
+ title: string;
298
+ description: string;
299
+ objectSchema?: any;
300
+ } | {
301
+ type: "select-boolean";
302
+ param: string;
303
+ title: string;
304
+ description: string;
305
+ default: boolean | null;
306
+ }>;
307
+ schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
308
+ };
309
+ };
310
+ declare const Gemini1_5Flash001Options: z.ZodObject<{
311
+ accessToken: z.ZodString;
312
+ modelId: z.ZodOptional<z.ZodString>;
313
+ baseUrl: z.ZodOptional<z.ZodString>;
314
+ location: z.ZodOptional<z.ZodString>;
315
+ projectId: z.ZodOptional<z.ZodString>;
316
+ publisher: z.ZodOptional<z.ZodString>;
317
+ }, "strip", z.ZodTypeAny, {
318
+ accessToken: string;
319
+ modelId?: string | undefined;
320
+ baseUrl?: string | undefined;
321
+ location?: string | undefined;
322
+ projectId?: string | undefined;
323
+ publisher?: string | undefined;
324
+ }, {
325
+ accessToken: string;
326
+ modelId?: string | undefined;
327
+ baseUrl?: string | undefined;
328
+ location?: string | undefined;
329
+ projectId?: string | undefined;
330
+ publisher?: string | undefined;
331
+ }>;
332
+ type Gemini1_5Flash001OptionsType = z.infer<typeof Gemini1_5Flash001Options>;
333
+ declare class Gemini1_5Flash001 extends BaseChatModelVertex {
334
+ constructor(options: Gemini1_5Flash001OptionsType);
335
+ }
336
+
337
+ declare const Gemini1_5Flash002Literal: "gemini-1.5-flash-002";
338
+ declare const Gemini1_5Flash002Schema: {
339
+ description: string;
340
+ maxOutputTokens: number;
341
+ name: string;
342
+ roles: Partial<Record<"system" | "user" | "assistant" | "tool", string | undefined>>;
343
+ modalities: ["text" | "image" | "tool-call" | "tool-response", ...("text" | "image" | "tool-call" | "tool-response")[]];
344
+ maxInputTokens: number;
345
+ config: {
346
+ def: Record<string, {
347
+ type: "multi-string";
348
+ param: string;
349
+ title: string;
350
+ description: string;
351
+ max: number;
352
+ } | {
353
+ type: "range";
354
+ param: string;
355
+ title: string;
356
+ description: string;
357
+ max: number;
358
+ min: number;
359
+ step: number;
360
+ default: number;
361
+ } | {
362
+ type: "select-string";
363
+ param: string;
364
+ title: string;
365
+ description: string;
366
+ default: string | null;
367
+ choices: string[];
368
+ } | {
369
+ type: "object-schema";
370
+ param: string;
371
+ title: string;
372
+ description: string;
373
+ objectSchema?: any;
374
+ } | {
375
+ type: "select-boolean";
376
+ param: string;
377
+ title: string;
378
+ description: string;
379
+ default: boolean | null;
380
+ }>;
381
+ schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
382
+ };
383
+ };
384
+ declare const Gemini1_5Flash002Options: z.ZodObject<{
385
+ accessToken: z.ZodString;
386
+ modelId: z.ZodOptional<z.ZodString>;
387
+ baseUrl: z.ZodOptional<z.ZodString>;
388
+ location: z.ZodOptional<z.ZodString>;
389
+ projectId: z.ZodOptional<z.ZodString>;
390
+ publisher: z.ZodOptional<z.ZodString>;
391
+ }, "strip", z.ZodTypeAny, {
392
+ accessToken: string;
393
+ modelId?: string | undefined;
394
+ baseUrl?: string | undefined;
395
+ location?: string | undefined;
396
+ projectId?: string | undefined;
397
+ publisher?: string | undefined;
398
+ }, {
399
+ accessToken: string;
400
+ modelId?: string | undefined;
401
+ baseUrl?: string | undefined;
402
+ location?: string | undefined;
403
+ projectId?: string | undefined;
404
+ publisher?: string | undefined;
405
+ }>;
406
+ type Gemini1_5Flash002OptionsType = z.infer<typeof Gemini1_5Flash002Options>;
407
+ declare class Gemini1_5Flash002 extends BaseChatModelVertex {
408
+ constructor(options: Gemini1_5Flash002OptionsType);
409
+ }
410
+
411
+ declare const Gemini1_5FlashLiteral: "gemini-1.5-flash";
412
+ declare const Gemini1_5FlashSchema: {
413
+ description: string;
414
+ maxOutputTokens: number;
415
+ name: string;
416
+ roles: Partial<Record<"system" | "user" | "assistant" | "tool", string | undefined>>;
417
+ modalities: ["text" | "image" | "tool-call" | "tool-response", ...("text" | "image" | "tool-call" | "tool-response")[]];
418
+ maxInputTokens: number;
419
+ config: {
420
+ def: Record<string, {
421
+ type: "multi-string";
422
+ param: string;
423
+ title: string;
424
+ description: string;
425
+ max: number;
426
+ } | {
427
+ type: "range";
428
+ param: string;
429
+ title: string;
430
+ description: string;
431
+ max: number;
432
+ min: number;
433
+ step: number;
434
+ default: number;
435
+ } | {
436
+ type: "select-string";
437
+ param: string;
438
+ title: string;
439
+ description: string;
440
+ default: string | null;
441
+ choices: string[];
442
+ } | {
443
+ type: "object-schema";
444
+ param: string;
445
+ title: string;
446
+ description: string;
447
+ objectSchema?: any;
448
+ } | {
449
+ type: "select-boolean";
450
+ param: string;
451
+ title: string;
452
+ description: string;
453
+ default: boolean | null;
454
+ }>;
455
+ schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
456
+ };
457
+ };
458
+ declare const Gemini1_5FlashOptions: z.ZodObject<{
459
+ accessToken: z.ZodString;
460
+ modelId: z.ZodOptional<z.ZodString>;
461
+ baseUrl: z.ZodOptional<z.ZodString>;
462
+ location: z.ZodOptional<z.ZodString>;
463
+ projectId: z.ZodOptional<z.ZodString>;
464
+ publisher: z.ZodOptional<z.ZodString>;
465
+ }, "strip", z.ZodTypeAny, {
466
+ accessToken: string;
467
+ modelId?: string | undefined;
468
+ baseUrl?: string | undefined;
469
+ location?: string | undefined;
470
+ projectId?: string | undefined;
471
+ publisher?: string | undefined;
472
+ }, {
473
+ accessToken: string;
474
+ modelId?: string | undefined;
475
+ baseUrl?: string | undefined;
476
+ location?: string | undefined;
477
+ projectId?: string | undefined;
478
+ publisher?: string | undefined;
479
+ }>;
480
+ type Gemini1_5FlashOptionsType = z.infer<typeof Gemini1_5FlashOptions>;
481
+ declare class Gemini1_5Flash extends BaseChatModelVertex {
482
+ constructor(options: Gemini1_5FlashOptionsType);
483
+ }
484
+
485
+ declare const Gemini1_5Pro001Literal: "gemini-1.5-pro-001";
486
+ declare const Gemini1_5Pro001Schema: {
487
+ description: string;
488
+ maxOutputTokens: number;
489
+ name: string;
490
+ roles: Partial<Record<"system" | "user" | "assistant" | "tool", string | undefined>>;
491
+ modalities: ["text" | "image" | "tool-call" | "tool-response", ...("text" | "image" | "tool-call" | "tool-response")[]];
492
+ maxInputTokens: number;
493
+ config: {
494
+ def: Record<string, {
495
+ type: "multi-string";
496
+ param: string;
497
+ title: string;
498
+ description: string;
499
+ max: number;
500
+ } | {
501
+ type: "range";
502
+ param: string;
503
+ title: string;
504
+ description: string;
505
+ max: number;
506
+ min: number;
507
+ step: number;
508
+ default: number;
509
+ } | {
510
+ type: "select-string";
511
+ param: string;
512
+ title: string;
513
+ description: string;
514
+ default: string | null;
515
+ choices: string[];
516
+ } | {
517
+ type: "object-schema";
518
+ param: string;
519
+ title: string;
520
+ description: string;
521
+ objectSchema?: any;
522
+ } | {
523
+ type: "select-boolean";
524
+ param: string;
525
+ title: string;
526
+ description: string;
527
+ default: boolean | null;
528
+ }>;
529
+ schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
530
+ };
531
+ };
532
+ declare const Gemini1_5Pro001Options: z.ZodObject<{
533
+ accessToken: z.ZodString;
534
+ modelId: z.ZodOptional<z.ZodString>;
535
+ baseUrl: z.ZodOptional<z.ZodString>;
536
+ location: z.ZodOptional<z.ZodString>;
537
+ projectId: z.ZodOptional<z.ZodString>;
538
+ publisher: z.ZodOptional<z.ZodString>;
539
+ }, "strip", z.ZodTypeAny, {
540
+ accessToken: string;
541
+ modelId?: string | undefined;
542
+ baseUrl?: string | undefined;
543
+ location?: string | undefined;
544
+ projectId?: string | undefined;
545
+ publisher?: string | undefined;
546
+ }, {
547
+ accessToken: string;
548
+ modelId?: string | undefined;
549
+ baseUrl?: string | undefined;
550
+ location?: string | undefined;
551
+ projectId?: string | undefined;
552
+ publisher?: string | undefined;
553
+ }>;
554
+ type Gemini1_5Pro001OptionsType = z.infer<typeof Gemini1_5Pro001Options>;
555
+ declare class Gemini1_5Pro001 extends BaseChatModelVertex {
556
+ constructor(options: Gemini1_5Pro001OptionsType);
557
+ }
558
+
559
+ declare const Gemini1_5Pro002Literal: "gemini-1.5-pro-002";
560
+ declare const Gemini1_5Pro002Schema: {
561
+ description: string;
562
+ maxOutputTokens: number;
563
+ name: string;
564
+ roles: Partial<Record<"system" | "user" | "assistant" | "tool", string | undefined>>;
565
+ modalities: ["text" | "image" | "tool-call" | "tool-response", ...("text" | "image" | "tool-call" | "tool-response")[]];
566
+ maxInputTokens: number;
567
+ config: {
568
+ def: Record<string, {
569
+ type: "multi-string";
570
+ param: string;
571
+ title: string;
572
+ description: string;
573
+ max: number;
574
+ } | {
575
+ type: "range";
576
+ param: string;
577
+ title: string;
578
+ description: string;
579
+ max: number;
580
+ min: number;
581
+ step: number;
582
+ default: number;
583
+ } | {
584
+ type: "select-string";
585
+ param: string;
586
+ title: string;
587
+ description: string;
588
+ default: string | null;
589
+ choices: string[];
590
+ } | {
591
+ type: "object-schema";
592
+ param: string;
593
+ title: string;
594
+ description: string;
595
+ objectSchema?: any;
596
+ } | {
597
+ type: "select-boolean";
598
+ param: string;
599
+ title: string;
600
+ description: string;
601
+ default: boolean | null;
602
+ }>;
603
+ schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
604
+ };
605
+ };
606
+ declare const Gemini1_5Pro002Options: z.ZodObject<{
607
+ accessToken: z.ZodString;
608
+ modelId: z.ZodOptional<z.ZodString>;
609
+ baseUrl: z.ZodOptional<z.ZodString>;
610
+ location: z.ZodOptional<z.ZodString>;
611
+ projectId: z.ZodOptional<z.ZodString>;
612
+ publisher: z.ZodOptional<z.ZodString>;
613
+ }, "strip", z.ZodTypeAny, {
614
+ accessToken: string;
615
+ modelId?: string | undefined;
616
+ baseUrl?: string | undefined;
617
+ location?: string | undefined;
618
+ projectId?: string | undefined;
619
+ publisher?: string | undefined;
620
+ }, {
621
+ accessToken: string;
622
+ modelId?: string | undefined;
623
+ baseUrl?: string | undefined;
624
+ location?: string | undefined;
625
+ projectId?: string | undefined;
626
+ publisher?: string | undefined;
627
+ }>;
628
+ type Gemini1_5Pro002OptionsType = z.infer<typeof Gemini1_5Pro002Options>;
629
+ declare class Gemini1_5Pro002 extends BaseChatModelVertex {
630
+ constructor(options: Gemini1_5Pro002OptionsType);
631
+ }
632
+
633
+ declare const Gemini1_5ProLiteral: "gemini-1.5-pro";
634
+ declare const Gemini1_5ProSchema: {
635
+ description: string;
636
+ maxOutputTokens: number;
637
+ name: string;
638
+ roles: Partial<Record<"system" | "user" | "assistant" | "tool", string | undefined>>;
639
+ modalities: ["text" | "image" | "tool-call" | "tool-response", ...("text" | "image" | "tool-call" | "tool-response")[]];
640
+ maxInputTokens: number;
641
+ config: {
642
+ def: Record<string, {
643
+ type: "multi-string";
644
+ param: string;
645
+ title: string;
646
+ description: string;
647
+ max: number;
648
+ } | {
649
+ type: "range";
650
+ param: string;
651
+ title: string;
652
+ description: string;
653
+ max: number;
654
+ min: number;
655
+ step: number;
656
+ default: number;
657
+ } | {
658
+ type: "select-string";
659
+ param: string;
660
+ title: string;
661
+ description: string;
662
+ default: string | null;
663
+ choices: string[];
664
+ } | {
665
+ type: "object-schema";
666
+ param: string;
667
+ title: string;
668
+ description: string;
669
+ objectSchema?: any;
670
+ } | {
671
+ type: "select-boolean";
672
+ param: string;
673
+ title: string;
674
+ description: string;
675
+ default: boolean | null;
676
+ }>;
677
+ schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
678
+ };
679
+ };
680
+ declare const Gemini1_5ProOptions: z.ZodObject<{
681
+ accessToken: z.ZodString;
682
+ modelId: z.ZodOptional<z.ZodString>;
683
+ baseUrl: z.ZodOptional<z.ZodString>;
684
+ location: z.ZodOptional<z.ZodString>;
685
+ projectId: z.ZodOptional<z.ZodString>;
686
+ publisher: z.ZodOptional<z.ZodString>;
687
+ }, "strip", z.ZodTypeAny, {
688
+ accessToken: string;
689
+ modelId?: string | undefined;
690
+ baseUrl?: string | undefined;
691
+ location?: string | undefined;
692
+ projectId?: string | undefined;
693
+ publisher?: string | undefined;
694
+ }, {
695
+ accessToken: string;
696
+ modelId?: string | undefined;
697
+ baseUrl?: string | undefined;
698
+ location?: string | undefined;
699
+ projectId?: string | undefined;
700
+ publisher?: string | undefined;
701
+ }>;
702
+ type Gemini1_5ProOptionsType = z.infer<typeof Gemini1_5ProOptions>;
703
+ declare class Gemini1_5Pro extends BaseChatModelVertex {
704
+ constructor(options: Gemini1_5ProOptionsType);
705
+ }
706
+
707
+ declare const BaseEmbeddingModelOptions: z.ZodObject<{
708
+ accessToken: z.ZodString;
709
+ modelId: z.ZodOptional<z.ZodString>;
710
+ baseUrl: z.ZodOptional<z.ZodString>;
711
+ location: z.ZodOptional<z.ZodString>;
712
+ projectId: z.ZodOptional<z.ZodString>;
713
+ publisher: z.ZodOptional<z.ZodString>;
714
+ }, "strip", z.ZodTypeAny, {
715
+ accessToken: string;
716
+ modelId?: string | undefined;
717
+ baseUrl?: string | undefined;
718
+ location?: string | undefined;
719
+ projectId?: string | undefined;
720
+ publisher?: string | undefined;
721
+ }, {
722
+ accessToken: string;
723
+ modelId?: string | undefined;
724
+ baseUrl?: string | undefined;
725
+ location?: string | undefined;
726
+ projectId?: string | undefined;
727
+ publisher?: string | undefined;
728
+ }>;
729
+ type BaseEmbeddingModelOptionsType = z.infer<typeof BaseEmbeddingModelOptions>;
730
+ declare class BaseEmbeddingModel implements EmbeddingModelV1<EmbeddingModelSchemaType> {
731
+ readonly version: "v1";
732
+ modelSchema: EmbeddingModelSchemaType;
733
+ private readonly accessToken;
734
+ private readonly baseUrl;
735
+ private readonly getEmbeddingsUrl;
736
+ private readonly modelId;
737
+ private readonly location;
738
+ private readonly projectId;
739
+ private readonly publisher;
740
+ constructor(modelSchema: EmbeddingModelSchemaType, options: BaseEmbeddingModelOptionsType);
741
+ getDefaultBaseUrl(): UrlType;
742
+ getDefaultHeaders(): HeadersType;
743
+ getDefaultParams(): ParamsType;
744
+ getRetryDelay(responseHeaders: HeadersType): {
745
+ shouldRetry: boolean;
746
+ delayMs: number;
747
+ };
748
+ getTokenCount(requests: EmbeddingRequestsType): number;
749
+ transformModelRequest(request: any): {
750
+ modelName: string | undefined;
751
+ config: ConfigType;
752
+ embeddingRequests: EmbeddingRequestsType;
753
+ };
754
+ transformConfig(config: ConfigType, requests?: EmbeddingRequestsType): ParamsType;
755
+ transformEmbeddingRequests(requests: EmbeddingRequestsType): ParamsType;
756
+ getGetEmbeddingsUrl(config?: ConfigType, requests?: EmbeddingRequestsType): Promise<UrlType>;
757
+ getGetEmbeddingsHeaders(config?: ConfigType, requests?: EmbeddingRequestsType): Promise<HeadersType>;
758
+ getGetEmbeddingsData(config: ConfigType, requests: EmbeddingRequestsType): Promise<ParamsType>;
759
+ transformGetEmbeddingsResponse(response: any): EmbeddingResponseType;
760
+ }
761
+
762
+ declare const Text_Embedding_004Literal = "text-embedding-004";
763
+ declare const Text_Embedding_004Schema: {
764
+ description: string;
765
+ name: string;
766
+ modalities: ["text", ..."text"[]];
767
+ maxInputTokens: number;
768
+ maxOutputTokens: number;
769
+ config: {
770
+ def: Record<string, {
771
+ type: "multi-string";
772
+ param: string;
773
+ title: string;
774
+ description: string;
775
+ max: number;
776
+ } | {
777
+ type: "range";
778
+ param: string;
779
+ title: string;
780
+ description: string;
781
+ max: number;
782
+ min: number;
783
+ step: number;
784
+ default: number;
785
+ } | {
786
+ type: "select-string";
787
+ param: string;
788
+ title: string;
789
+ description: string;
790
+ default: string | null;
791
+ choices: string[];
792
+ } | {
793
+ type: "object-schema";
794
+ param: string;
795
+ title: string;
796
+ description: string;
797
+ objectSchema?: any;
798
+ } | {
799
+ type: "select-boolean";
800
+ param: string;
801
+ title: string;
802
+ description: string;
803
+ default: boolean | null;
804
+ }>;
805
+ schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
806
+ };
807
+ };
808
+ declare const Text_Embedding_004Options: z.ZodObject<{
809
+ accessToken: z.ZodString;
810
+ modelId: z.ZodOptional<z.ZodString>;
811
+ baseUrl: z.ZodOptional<z.ZodString>;
812
+ location: z.ZodOptional<z.ZodString>;
813
+ projectId: z.ZodOptional<z.ZodString>;
814
+ publisher: z.ZodOptional<z.ZodString>;
815
+ }, "strip", z.ZodTypeAny, {
816
+ accessToken: string;
817
+ modelId?: string | undefined;
818
+ baseUrl?: string | undefined;
819
+ location?: string | undefined;
820
+ projectId?: string | undefined;
821
+ publisher?: string | undefined;
822
+ }, {
823
+ accessToken: string;
824
+ modelId?: string | undefined;
825
+ baseUrl?: string | undefined;
826
+ location?: string | undefined;
827
+ projectId?: string | undefined;
828
+ publisher?: string | undefined;
829
+ }>;
830
+ type Text_Embedding_004OptionsType = z.infer<typeof Text_Embedding_004Options>;
831
+ declare class Text_Embedding_004 extends BaseEmbeddingModel {
832
+ constructor(options: Text_Embedding_004OptionsType);
833
+ }
834
+
835
+ declare const Text_Multilingual_Embedding_002Literal = "text-multilingual-embedding-002";
836
+ declare const Text_Multilingual_Embedding_002Schema: {
837
+ description: string;
838
+ name: string;
839
+ modalities: ["text", ..."text"[]];
840
+ maxInputTokens: number;
841
+ maxOutputTokens: number;
842
+ config: {
843
+ def: Record<string, {
844
+ type: "multi-string";
845
+ param: string;
846
+ title: string;
847
+ description: string;
848
+ max: number;
849
+ } | {
850
+ type: "range";
851
+ param: string;
852
+ title: string;
853
+ description: string;
854
+ max: number;
855
+ min: number;
856
+ step: number;
857
+ default: number;
858
+ } | {
859
+ type: "select-string";
860
+ param: string;
861
+ title: string;
862
+ description: string;
863
+ default: string | null;
864
+ choices: string[];
865
+ } | {
866
+ type: "object-schema";
867
+ param: string;
868
+ title: string;
869
+ description: string;
870
+ objectSchema?: any;
871
+ } | {
872
+ type: "select-boolean";
873
+ param: string;
874
+ title: string;
875
+ description: string;
876
+ default: boolean | null;
877
+ }>;
878
+ schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
879
+ };
880
+ };
881
+ declare const Text_Multilingual_Embedding_002Options: z.ZodObject<{
882
+ accessToken: z.ZodString;
883
+ modelId: z.ZodOptional<z.ZodString>;
884
+ baseUrl: z.ZodOptional<z.ZodString>;
885
+ location: z.ZodOptional<z.ZodString>;
886
+ projectId: z.ZodOptional<z.ZodString>;
887
+ publisher: z.ZodOptional<z.ZodString>;
888
+ }, "strip", z.ZodTypeAny, {
889
+ accessToken: string;
890
+ modelId?: string | undefined;
891
+ baseUrl?: string | undefined;
892
+ location?: string | undefined;
893
+ projectId?: string | undefined;
894
+ publisher?: string | undefined;
895
+ }, {
896
+ accessToken: string;
897
+ modelId?: string | undefined;
898
+ baseUrl?: string | undefined;
899
+ location?: string | undefined;
900
+ projectId?: string | undefined;
901
+ publisher?: string | undefined;
902
+ }>;
903
+ type Text_Multilingual_Embedding_002OptionsType = z.infer<typeof Text_Multilingual_Embedding_002Options>;
904
+ declare class Text_Multilingual_Embedding_002 extends BaseEmbeddingModel {
905
+ constructor(options: Text_Multilingual_Embedding_002OptionsType);
906
+ }
907
+
908
+ declare const Text_Embedding_Gecko_Multilingual_001Literal = "textembedding-gecko-multilingual@001";
909
+ declare const Text_Embedding_Gecko_Multilingual_001Schema: {
910
+ description: string;
911
+ name: string;
912
+ modalities: ["text", ..."text"[]];
913
+ maxInputTokens: number;
914
+ maxOutputTokens: number;
915
+ config: {
916
+ def: Record<string, {
917
+ type: "multi-string";
918
+ param: string;
919
+ title: string;
920
+ description: string;
921
+ max: number;
922
+ } | {
923
+ type: "range";
924
+ param: string;
925
+ title: string;
926
+ description: string;
927
+ max: number;
928
+ min: number;
929
+ step: number;
930
+ default: number;
931
+ } | {
932
+ type: "select-string";
933
+ param: string;
934
+ title: string;
935
+ description: string;
936
+ default: string | null;
937
+ choices: string[];
938
+ } | {
939
+ type: "object-schema";
940
+ param: string;
941
+ title: string;
942
+ description: string;
943
+ objectSchema?: any;
944
+ } | {
945
+ type: "select-boolean";
946
+ param: string;
947
+ title: string;
948
+ description: string;
949
+ default: boolean | null;
950
+ }>;
951
+ schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
952
+ };
953
+ };
954
+ declare const Text_Embedding_Gecko_Multilingual_001Options: z.ZodObject<{
955
+ accessToken: z.ZodString;
956
+ modelId: z.ZodOptional<z.ZodString>;
957
+ baseUrl: z.ZodOptional<z.ZodString>;
958
+ location: z.ZodOptional<z.ZodString>;
959
+ projectId: z.ZodOptional<z.ZodString>;
960
+ publisher: z.ZodOptional<z.ZodString>;
961
+ }, "strip", z.ZodTypeAny, {
962
+ accessToken: string;
963
+ modelId?: string | undefined;
964
+ baseUrl?: string | undefined;
965
+ location?: string | undefined;
966
+ projectId?: string | undefined;
967
+ publisher?: string | undefined;
968
+ }, {
969
+ accessToken: string;
970
+ modelId?: string | undefined;
971
+ baseUrl?: string | undefined;
972
+ location?: string | undefined;
973
+ projectId?: string | undefined;
974
+ publisher?: string | undefined;
975
+ }>;
976
+ type Text_Embedding_Gecko_Multilingual_001OptionsType = z.infer<typeof Text_Embedding_Gecko_Multilingual_001Options>;
977
+ declare class Text_Embedding_Gecko_Multilingual_001 extends BaseEmbeddingModel {
978
+ constructor(options: Text_Embedding_Gecko_Multilingual_001OptionsType);
979
+ }
980
+
981
+ declare const Text_Embedding_Gecko_003Literal = "textembedding-gecko@003";
982
+ declare const Text_Embedding_Gecko_003Schema: {
983
+ description: string;
984
+ name: string;
985
+ modalities: ["text", ..."text"[]];
986
+ maxInputTokens: number;
987
+ maxOutputTokens: number;
988
+ config: {
989
+ def: Record<string, {
990
+ type: "multi-string";
991
+ param: string;
992
+ title: string;
993
+ description: string;
994
+ max: number;
995
+ } | {
996
+ type: "range";
997
+ param: string;
998
+ title: string;
999
+ description: string;
1000
+ max: number;
1001
+ min: number;
1002
+ step: number;
1003
+ default: number;
1004
+ } | {
1005
+ type: "select-string";
1006
+ param: string;
1007
+ title: string;
1008
+ description: string;
1009
+ default: string | null;
1010
+ choices: string[];
1011
+ } | {
1012
+ type: "object-schema";
1013
+ param: string;
1014
+ title: string;
1015
+ description: string;
1016
+ objectSchema?: any;
1017
+ } | {
1018
+ type: "select-boolean";
1019
+ param: string;
1020
+ title: string;
1021
+ description: string;
1022
+ default: boolean | null;
1023
+ }>;
1024
+ schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
1025
+ };
1026
+ };
1027
+ declare const Text_Embedding_Gecko_003Options: z.ZodObject<{
1028
+ accessToken: z.ZodString;
1029
+ modelId: z.ZodOptional<z.ZodString>;
1030
+ baseUrl: z.ZodOptional<z.ZodString>;
1031
+ location: z.ZodOptional<z.ZodString>;
1032
+ projectId: z.ZodOptional<z.ZodString>;
1033
+ publisher: z.ZodOptional<z.ZodString>;
1034
+ }, "strip", z.ZodTypeAny, {
1035
+ accessToken: string;
1036
+ modelId?: string | undefined;
1037
+ baseUrl?: string | undefined;
1038
+ location?: string | undefined;
1039
+ projectId?: string | undefined;
1040
+ publisher?: string | undefined;
1041
+ }, {
1042
+ accessToken: string;
1043
+ modelId?: string | undefined;
1044
+ baseUrl?: string | undefined;
1045
+ location?: string | undefined;
1046
+ projectId?: string | undefined;
1047
+ publisher?: string | undefined;
1048
+ }>;
1049
+ type Text_Embedding_Gecko_003OptionsType = z.infer<typeof Text_Embedding_Gecko_003Options>;
1050
+ declare class Text_Embedding_Gecko_003 extends BaseEmbeddingModel {
1051
+ constructor(options: Text_Embedding_Gecko_003OptionsType);
1052
+ }
1053
+
1054
+ declare class Vertex<O extends Record<string, any> = Record<string, any>> implements ProviderV1<O> {
1055
+ readonly version: "v1";
1056
+ readonly name = "vertex";
1057
+ static readonly baseUrl: (location: string, projectId: string, publisher?: string) => string;
1058
+ private readonly chatModelFactories;
1059
+ private readonly embeddingModelFactories;
1060
+ chatModelLiterals(): string[];
1061
+ chatModel(name: string, options: O): ChatModelV1;
1062
+ chatModelSchema(name: string): ChatModelSchemaType;
1063
+ chatModelSchemas(): Record<string, ChatModelSchemaType>;
1064
+ embeddingModelLiterals(): string[];
1065
+ embeddingModel(name: string, options: O): EmbeddingModelV1;
1066
+ embeddingModelSchema(name: string): EmbeddingModelSchemaType;
1067
+ embeddingModelSchemas(): Record<string, EmbeddingModelSchemaType>;
1068
+ }
1069
+
1070
+ export { BaseChatModelVertex, BaseChatModelVertexOptions, type BaseChatModelVertexOptionsType, BaseEmbeddingModel, BaseEmbeddingModelOptions, type BaseEmbeddingModelOptionsType, Gemini1_0Pro, Gemini1_0Pro001, Gemini1_0Pro001Literal, Gemini1_0Pro001Options, type Gemini1_0Pro001OptionsType, Gemini1_0Pro001Schema, Gemini1_0ProLiteral, Gemini1_0ProOptions, type Gemini1_0ProOptionsType, Gemini1_0ProSchema, Gemini1_0ProVision, Gemini1_0ProVisionLiteral, Gemini1_0ProVisionOptions, type Gemini1_0ProVisionOptionsType, Gemini1_0ProVisionSchema, Gemini1_5Flash, Gemini1_5Flash001, Gemini1_5Flash001Literal, Gemini1_5Flash001Options, type Gemini1_5Flash001OptionsType, Gemini1_5Flash001Schema, Gemini1_5Flash002, Gemini1_5Flash002Literal, Gemini1_5Flash002Options, type Gemini1_5Flash002OptionsType, Gemini1_5Flash002Schema, Gemini1_5FlashLiteral, Gemini1_5FlashOptions, type Gemini1_5FlashOptionsType, Gemini1_5FlashSchema, Gemini1_5Pro, Gemini1_5Pro001, Gemini1_5Pro001Literal, Gemini1_5Pro001Options, type Gemini1_5Pro001OptionsType, Gemini1_5Pro001Schema, Gemini1_5Pro002, Gemini1_5Pro002Literal, Gemini1_5Pro002Options, type Gemini1_5Pro002OptionsType, Gemini1_5Pro002Schema, Gemini1_5ProLiteral, Gemini1_5ProOptions, type Gemini1_5ProOptionsType, Gemini1_5ProSchema, Text_Embedding_004, Text_Embedding_004Literal, Text_Embedding_004Options, type Text_Embedding_004OptionsType, Text_Embedding_004Schema, Text_Embedding_Gecko_003, Text_Embedding_Gecko_003Literal, Text_Embedding_Gecko_003Options, type Text_Embedding_Gecko_003OptionsType, Text_Embedding_Gecko_003Schema, Text_Embedding_Gecko_Multilingual_001, Text_Embedding_Gecko_Multilingual_001Literal, Text_Embedding_Gecko_Multilingual_001Options, type Text_Embedding_Gecko_Multilingual_001OptionsType, Text_Embedding_Gecko_Multilingual_001Schema, Text_Multilingual_Embedding_002, Text_Multilingual_Embedding_002Literal, Text_Multilingual_Embedding_002Options, type Text_Multilingual_Embedding_002OptionsType, Text_Multilingual_Embedding_002Schema, Vertex };