@adaline/vertex 0.16.0 → 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.
- package/dist/index.d.mts +230 -104
- package/dist/index.d.ts +230 -104
- package/dist/index.js +75 -75
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +15 -15
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { BaseChatModel } from '@adaline/google';
|
|
3
3
|
import { ChatModelSchemaType, HeadersType, EmbeddingModelV1, EmbeddingModelSchemaType, UrlType, ParamsType, ProviderV1, ChatModelV1 } from '@adaline/provider';
|
|
4
|
-
import { EmbeddingRequestsType, ConfigType, EmbeddingResponseType } from '@adaline/types';
|
|
4
|
+
import { ChatModelPriceType, EmbeddingRequestsType, ConfigType, EmbeddingResponseType } from '@adaline/types';
|
|
5
5
|
|
|
6
6
|
declare const BaseChatModelOptions: z.ZodObject<{
|
|
7
7
|
accessToken: z.ZodString;
|
|
@@ -36,17 +36,32 @@ declare class BaseChatModelVertex extends BaseChatModel {
|
|
|
36
36
|
private readonly publisher;
|
|
37
37
|
constructor(modelSchema: ChatModelSchemaType, options: BaseChatModelOptionsType);
|
|
38
38
|
getDefaultHeaders(): HeadersType;
|
|
39
|
+
getModelPricing(): ChatModelPriceType;
|
|
39
40
|
}
|
|
40
41
|
|
|
41
42
|
declare const Gemini1_0Pro001Literal: "gemini-1.0-pro-001";
|
|
42
43
|
declare const Gemini1_0Pro001Schema: {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
44
|
+
readonly price: {
|
|
45
|
+
modelName: string;
|
|
46
|
+
currency: string;
|
|
47
|
+
tokenRanges: {
|
|
48
|
+
minTokens: number;
|
|
49
|
+
maxTokens: null;
|
|
50
|
+
prices: {
|
|
51
|
+
base: {
|
|
52
|
+
inputPricePerMillion: number;
|
|
53
|
+
outputPricePerMillion: number;
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
}[];
|
|
57
|
+
};
|
|
58
|
+
readonly description: string;
|
|
59
|
+
readonly maxOutputTokens: number;
|
|
60
|
+
readonly name: string;
|
|
61
|
+
readonly roles: Partial<Record<"system" | "user" | "assistant" | "tool", string | undefined>>;
|
|
62
|
+
readonly modalities: ["text" | "tool-call" | "tool-response", ...("text" | "tool-call" | "tool-response")[]];
|
|
63
|
+
readonly maxInputTokens: number;
|
|
64
|
+
readonly config: {
|
|
50
65
|
def: Record<string, {
|
|
51
66
|
type: "multi-string";
|
|
52
67
|
param: string;
|
|
@@ -84,7 +99,7 @@ declare const Gemini1_0Pro001Schema: {
|
|
|
84
99
|
}>;
|
|
85
100
|
schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
|
|
86
101
|
};
|
|
87
|
-
maxReasoningTokens?: number | undefined;
|
|
102
|
+
readonly maxReasoningTokens?: number | undefined;
|
|
88
103
|
};
|
|
89
104
|
declare const Gemini1_0Pro001Options: z.ZodObject<{
|
|
90
105
|
accessToken: z.ZodString;
|
|
@@ -115,6 +130,20 @@ declare class Gemini1_0Pro001 extends BaseChatModelVertex {
|
|
|
115
130
|
|
|
116
131
|
declare const Gemini1_0ProVisionLiteral: "gemini-1.0-pro-vision";
|
|
117
132
|
declare const Gemini1_0ProVisionSchema: {
|
|
133
|
+
price: {
|
|
134
|
+
modelName: string;
|
|
135
|
+
currency: string;
|
|
136
|
+
tokenRanges: {
|
|
137
|
+
minTokens: number;
|
|
138
|
+
maxTokens: null;
|
|
139
|
+
prices: {
|
|
140
|
+
base: {
|
|
141
|
+
inputPricePerMillion: number;
|
|
142
|
+
outputPricePerMillion: number;
|
|
143
|
+
};
|
|
144
|
+
};
|
|
145
|
+
}[];
|
|
146
|
+
};
|
|
118
147
|
description: string;
|
|
119
148
|
maxOutputTokens: number;
|
|
120
149
|
name: string;
|
|
@@ -190,13 +219,27 @@ declare class Gemini1_0ProVision extends BaseChatModelVertex {
|
|
|
190
219
|
|
|
191
220
|
declare const Gemini1_0ProLiteral: "gemini-1.0-pro";
|
|
192
221
|
declare const Gemini1_0ProSchema: {
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
222
|
+
readonly price: {
|
|
223
|
+
modelName: string;
|
|
224
|
+
currency: string;
|
|
225
|
+
tokenRanges: {
|
|
226
|
+
minTokens: number;
|
|
227
|
+
maxTokens: null;
|
|
228
|
+
prices: {
|
|
229
|
+
base: {
|
|
230
|
+
inputPricePerMillion: number;
|
|
231
|
+
outputPricePerMillion: number;
|
|
232
|
+
};
|
|
233
|
+
};
|
|
234
|
+
}[];
|
|
235
|
+
};
|
|
236
|
+
readonly description: string;
|
|
237
|
+
readonly maxOutputTokens: number;
|
|
238
|
+
readonly name: string;
|
|
239
|
+
readonly roles: Partial<Record<"system" | "user" | "assistant" | "tool", string | undefined>>;
|
|
240
|
+
readonly modalities: ["text" | "tool-call" | "tool-response", ...("text" | "tool-call" | "tool-response")[]];
|
|
241
|
+
readonly maxInputTokens: number;
|
|
242
|
+
readonly config: {
|
|
200
243
|
def: Record<string, {
|
|
201
244
|
type: "multi-string";
|
|
202
245
|
param: string;
|
|
@@ -234,7 +277,7 @@ declare const Gemini1_0ProSchema: {
|
|
|
234
277
|
}>;
|
|
235
278
|
schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
|
|
236
279
|
};
|
|
237
|
-
maxReasoningTokens?: number | undefined;
|
|
280
|
+
readonly maxReasoningTokens?: number | undefined;
|
|
238
281
|
};
|
|
239
282
|
declare const Gemini1_0ProOptions: z.ZodObject<{
|
|
240
283
|
accessToken: z.ZodString;
|
|
@@ -265,13 +308,36 @@ declare class Gemini1_0Pro extends BaseChatModelVertex {
|
|
|
265
308
|
|
|
266
309
|
declare const Gemini1_5Flash001Literal: "gemini-1.5-flash-001";
|
|
267
310
|
declare const Gemini1_5Flash001Schema: {
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
311
|
+
readonly price: {
|
|
312
|
+
modelName: string;
|
|
313
|
+
currency: string;
|
|
314
|
+
tokenRanges: ({
|
|
315
|
+
minTokens: number;
|
|
316
|
+
maxTokens: number;
|
|
317
|
+
prices: {
|
|
318
|
+
base: {
|
|
319
|
+
inputPricePerMillion: number;
|
|
320
|
+
outputPricePerMillion: number;
|
|
321
|
+
};
|
|
322
|
+
};
|
|
323
|
+
} | {
|
|
324
|
+
minTokens: number;
|
|
325
|
+
maxTokens: null;
|
|
326
|
+
prices: {
|
|
327
|
+
base: {
|
|
328
|
+
inputPricePerMillion: number;
|
|
329
|
+
outputPricePerMillion: number;
|
|
330
|
+
};
|
|
331
|
+
};
|
|
332
|
+
})[];
|
|
333
|
+
};
|
|
334
|
+
readonly description: string;
|
|
335
|
+
readonly maxOutputTokens: number;
|
|
336
|
+
readonly name: string;
|
|
337
|
+
readonly roles: Partial<Record<"system" | "user" | "assistant" | "tool", string | undefined>>;
|
|
338
|
+
readonly modalities: ["text" | "image" | "tool-call" | "tool-response", ...("text" | "image" | "tool-call" | "tool-response")[]];
|
|
339
|
+
readonly maxInputTokens: number;
|
|
340
|
+
readonly config: {
|
|
275
341
|
def: Record<string, {
|
|
276
342
|
type: "multi-string";
|
|
277
343
|
param: string;
|
|
@@ -309,7 +375,7 @@ declare const Gemini1_5Flash001Schema: {
|
|
|
309
375
|
}>;
|
|
310
376
|
schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
|
|
311
377
|
};
|
|
312
|
-
maxReasoningTokens?: number | undefined;
|
|
378
|
+
readonly maxReasoningTokens?: number | undefined;
|
|
313
379
|
};
|
|
314
380
|
declare const Gemini1_5Flash001Options: z.ZodObject<{
|
|
315
381
|
accessToken: z.ZodString;
|
|
@@ -340,6 +406,29 @@ declare class Gemini1_5Flash001 extends BaseChatModelVertex {
|
|
|
340
406
|
|
|
341
407
|
declare const Gemini1_5Flash002Literal: "gemini-1.5-flash-002";
|
|
342
408
|
declare const Gemini1_5Flash002Schema: {
|
|
409
|
+
price: {
|
|
410
|
+
modelName: string;
|
|
411
|
+
currency: string;
|
|
412
|
+
tokenRanges: ({
|
|
413
|
+
minTokens: number;
|
|
414
|
+
maxTokens: number;
|
|
415
|
+
prices: {
|
|
416
|
+
base: {
|
|
417
|
+
inputPricePerMillion: number;
|
|
418
|
+
outputPricePerMillion: number;
|
|
419
|
+
};
|
|
420
|
+
};
|
|
421
|
+
} | {
|
|
422
|
+
minTokens: number;
|
|
423
|
+
maxTokens: null;
|
|
424
|
+
prices: {
|
|
425
|
+
base: {
|
|
426
|
+
inputPricePerMillion: number;
|
|
427
|
+
outputPricePerMillion: number;
|
|
428
|
+
};
|
|
429
|
+
};
|
|
430
|
+
})[];
|
|
431
|
+
};
|
|
343
432
|
description: string;
|
|
344
433
|
maxOutputTokens: number;
|
|
345
434
|
name: string;
|
|
@@ -414,53 +503,7 @@ declare class Gemini1_5Flash002 extends BaseChatModelVertex {
|
|
|
414
503
|
}
|
|
415
504
|
|
|
416
505
|
declare const Gemini1_5FlashLiteral: "gemini-1.5-flash";
|
|
417
|
-
declare const Gemini1_5FlashSchema:
|
|
418
|
-
description: string;
|
|
419
|
-
maxOutputTokens: number;
|
|
420
|
-
name: string;
|
|
421
|
-
roles: Partial<Record<"system" | "user" | "assistant" | "tool", string | undefined>>;
|
|
422
|
-
modalities: ["text" | "image" | "tool-call" | "tool-response", ...("text" | "image" | "tool-call" | "tool-response")[]];
|
|
423
|
-
maxInputTokens: number;
|
|
424
|
-
config: {
|
|
425
|
-
def: Record<string, {
|
|
426
|
-
type: "multi-string";
|
|
427
|
-
param: string;
|
|
428
|
-
title: string;
|
|
429
|
-
description: string;
|
|
430
|
-
max: number;
|
|
431
|
-
} | {
|
|
432
|
-
type: "object-schema";
|
|
433
|
-
param: string;
|
|
434
|
-
title: string;
|
|
435
|
-
description: string;
|
|
436
|
-
objectSchema?: any;
|
|
437
|
-
} | {
|
|
438
|
-
type: "range";
|
|
439
|
-
param: string;
|
|
440
|
-
title: string;
|
|
441
|
-
description: string;
|
|
442
|
-
max: number;
|
|
443
|
-
default: number;
|
|
444
|
-
min: number;
|
|
445
|
-
step: number;
|
|
446
|
-
} | {
|
|
447
|
-
type: "select-boolean";
|
|
448
|
-
param: string;
|
|
449
|
-
title: string;
|
|
450
|
-
description: string;
|
|
451
|
-
default: boolean | null;
|
|
452
|
-
} | {
|
|
453
|
-
type: "select-string";
|
|
454
|
-
param: string;
|
|
455
|
-
title: string;
|
|
456
|
-
description: string;
|
|
457
|
-
default: string;
|
|
458
|
-
choices: string[];
|
|
459
|
-
}>;
|
|
460
|
-
schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
|
|
461
|
-
};
|
|
462
|
-
maxReasoningTokens?: number | undefined;
|
|
463
|
-
};
|
|
506
|
+
declare const Gemini1_5FlashSchema: ChatModelSchemaType;
|
|
464
507
|
declare const Gemini1_5FlashOptions: z.ZodObject<{
|
|
465
508
|
accessToken: z.ZodString;
|
|
466
509
|
modelName: z.ZodString;
|
|
@@ -490,13 +533,36 @@ declare class Gemini1_5Flash extends BaseChatModelVertex {
|
|
|
490
533
|
|
|
491
534
|
declare const Gemini1_5Pro001Literal: "gemini-1.5-pro-001";
|
|
492
535
|
declare const Gemini1_5Pro001Schema: {
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
536
|
+
readonly price: {
|
|
537
|
+
modelName: string;
|
|
538
|
+
currency: string;
|
|
539
|
+
tokenRanges: ({
|
|
540
|
+
minTokens: number;
|
|
541
|
+
maxTokens: number;
|
|
542
|
+
prices: {
|
|
543
|
+
base: {
|
|
544
|
+
inputPricePerMillion: number;
|
|
545
|
+
outputPricePerMillion: number;
|
|
546
|
+
};
|
|
547
|
+
};
|
|
548
|
+
} | {
|
|
549
|
+
minTokens: number;
|
|
550
|
+
maxTokens: null;
|
|
551
|
+
prices: {
|
|
552
|
+
base: {
|
|
553
|
+
inputPricePerMillion: number;
|
|
554
|
+
outputPricePerMillion: number;
|
|
555
|
+
};
|
|
556
|
+
};
|
|
557
|
+
})[];
|
|
558
|
+
};
|
|
559
|
+
readonly description: string;
|
|
560
|
+
readonly maxOutputTokens: number;
|
|
561
|
+
readonly name: string;
|
|
562
|
+
readonly roles: Partial<Record<"system" | "user" | "assistant" | "tool", string | undefined>>;
|
|
563
|
+
readonly modalities: ["text" | "image" | "tool-call" | "tool-response", ...("text" | "image" | "tool-call" | "tool-response")[]];
|
|
564
|
+
readonly maxInputTokens: number;
|
|
565
|
+
readonly config: {
|
|
500
566
|
def: Record<string, {
|
|
501
567
|
type: "multi-string";
|
|
502
568
|
param: string;
|
|
@@ -534,7 +600,7 @@ declare const Gemini1_5Pro001Schema: {
|
|
|
534
600
|
}>;
|
|
535
601
|
schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
|
|
536
602
|
};
|
|
537
|
-
maxReasoningTokens?: number | undefined;
|
|
603
|
+
readonly maxReasoningTokens?: number | undefined;
|
|
538
604
|
};
|
|
539
605
|
declare const Gemini1_5Pro001Options: z.ZodObject<{
|
|
540
606
|
accessToken: z.ZodString;
|
|
@@ -565,13 +631,36 @@ declare class Gemini1_5Pro001 extends BaseChatModelVertex {
|
|
|
565
631
|
|
|
566
632
|
declare const Gemini1_5Pro002Literal: "gemini-1.5-pro-002";
|
|
567
633
|
declare const Gemini1_5Pro002Schema: {
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
634
|
+
readonly price: {
|
|
635
|
+
modelName: string;
|
|
636
|
+
currency: string;
|
|
637
|
+
tokenRanges: ({
|
|
638
|
+
minTokens: number;
|
|
639
|
+
maxTokens: number;
|
|
640
|
+
prices: {
|
|
641
|
+
base: {
|
|
642
|
+
inputPricePerMillion: number;
|
|
643
|
+
outputPricePerMillion: number;
|
|
644
|
+
};
|
|
645
|
+
};
|
|
646
|
+
} | {
|
|
647
|
+
minTokens: number;
|
|
648
|
+
maxTokens: null;
|
|
649
|
+
prices: {
|
|
650
|
+
base: {
|
|
651
|
+
inputPricePerMillion: number;
|
|
652
|
+
outputPricePerMillion: number;
|
|
653
|
+
};
|
|
654
|
+
};
|
|
655
|
+
})[];
|
|
656
|
+
};
|
|
657
|
+
readonly description: string;
|
|
658
|
+
readonly maxOutputTokens: number;
|
|
659
|
+
readonly name: string;
|
|
660
|
+
readonly roles: Partial<Record<"system" | "user" | "assistant" | "tool", string | undefined>>;
|
|
661
|
+
readonly modalities: ["text" | "image" | "tool-call" | "tool-response", ...("text" | "image" | "tool-call" | "tool-response")[]];
|
|
662
|
+
readonly maxInputTokens: number;
|
|
663
|
+
readonly config: {
|
|
575
664
|
def: Record<string, {
|
|
576
665
|
type: "multi-string";
|
|
577
666
|
param: string;
|
|
@@ -609,7 +698,7 @@ declare const Gemini1_5Pro002Schema: {
|
|
|
609
698
|
}>;
|
|
610
699
|
schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
|
|
611
700
|
};
|
|
612
|
-
maxReasoningTokens?: number | undefined;
|
|
701
|
+
readonly maxReasoningTokens?: number | undefined;
|
|
613
702
|
};
|
|
614
703
|
declare const Gemini1_5Pro002Options: z.ZodObject<{
|
|
615
704
|
accessToken: z.ZodString;
|
|
@@ -640,13 +729,36 @@ declare class Gemini1_5Pro002 extends BaseChatModelVertex {
|
|
|
640
729
|
|
|
641
730
|
declare const Gemini1_5ProLiteral: "gemini-1.5-pro";
|
|
642
731
|
declare const Gemini1_5ProSchema: {
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
732
|
+
readonly price: {
|
|
733
|
+
modelName: string;
|
|
734
|
+
currency: string;
|
|
735
|
+
tokenRanges: ({
|
|
736
|
+
minTokens: number;
|
|
737
|
+
maxTokens: number;
|
|
738
|
+
prices: {
|
|
739
|
+
base: {
|
|
740
|
+
inputPricePerMillion: number;
|
|
741
|
+
outputPricePerMillion: number;
|
|
742
|
+
};
|
|
743
|
+
};
|
|
744
|
+
} | {
|
|
745
|
+
minTokens: number;
|
|
746
|
+
maxTokens: null;
|
|
747
|
+
prices: {
|
|
748
|
+
base: {
|
|
749
|
+
inputPricePerMillion: number;
|
|
750
|
+
outputPricePerMillion: number;
|
|
751
|
+
};
|
|
752
|
+
};
|
|
753
|
+
})[];
|
|
754
|
+
};
|
|
755
|
+
readonly description: string;
|
|
756
|
+
readonly maxOutputTokens: number;
|
|
757
|
+
readonly name: string;
|
|
758
|
+
readonly roles: Partial<Record<"system" | "user" | "assistant" | "tool", string | undefined>>;
|
|
759
|
+
readonly modalities: ["text" | "image" | "tool-call" | "tool-response", ...("text" | "image" | "tool-call" | "tool-response")[]];
|
|
760
|
+
readonly maxInputTokens: number;
|
|
761
|
+
readonly config: {
|
|
650
762
|
def: Record<string, {
|
|
651
763
|
type: "multi-string";
|
|
652
764
|
param: string;
|
|
@@ -684,7 +796,7 @@ declare const Gemini1_5ProSchema: {
|
|
|
684
796
|
}>;
|
|
685
797
|
schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
|
|
686
798
|
};
|
|
687
|
-
maxReasoningTokens?: number | undefined;
|
|
799
|
+
readonly maxReasoningTokens?: number | undefined;
|
|
688
800
|
};
|
|
689
801
|
declare const Gemini1_5ProOptions: z.ZodObject<{
|
|
690
802
|
accessToken: z.ZodString;
|
|
@@ -715,13 +827,27 @@ declare class Gemini1_5Pro extends BaseChatModelVertex {
|
|
|
715
827
|
|
|
716
828
|
declare const Gemini2_0FlashExpLiteral: "gemini-2.0-flash-exp";
|
|
717
829
|
declare const Gemini2_0FlashExpSchema: {
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
830
|
+
readonly price: {
|
|
831
|
+
modelName: string;
|
|
832
|
+
currency: string;
|
|
833
|
+
tokenRanges: {
|
|
834
|
+
minTokens: number;
|
|
835
|
+
maxTokens: null;
|
|
836
|
+
prices: {
|
|
837
|
+
base: {
|
|
838
|
+
inputPricePerMillion: number;
|
|
839
|
+
outputPricePerMillion: number;
|
|
840
|
+
};
|
|
841
|
+
};
|
|
842
|
+
}[];
|
|
843
|
+
};
|
|
844
|
+
readonly description: string;
|
|
845
|
+
readonly maxOutputTokens: number;
|
|
846
|
+
readonly name: string;
|
|
847
|
+
readonly roles: Partial<Record<"system" | "user" | "assistant" | "tool", string | undefined>>;
|
|
848
|
+
readonly modalities: ["text" | "image" | "tool-call" | "tool-response", ...("text" | "image" | "tool-call" | "tool-response")[]];
|
|
849
|
+
readonly maxInputTokens: number;
|
|
850
|
+
readonly config: {
|
|
725
851
|
def: Record<string, {
|
|
726
852
|
type: "multi-string";
|
|
727
853
|
param: string;
|
|
@@ -759,7 +885,7 @@ declare const Gemini2_0FlashExpSchema: {
|
|
|
759
885
|
}>;
|
|
760
886
|
schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
|
|
761
887
|
};
|
|
762
|
-
maxReasoningTokens?: number | undefined;
|
|
888
|
+
readonly maxReasoningTokens?: number | undefined;
|
|
763
889
|
};
|
|
764
890
|
declare const Gemini2_0FlashExpOptions: z.ZodObject<{
|
|
765
891
|
accessToken: z.ZodString;
|