@adaline/groq 0.14.0 → 0.16.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 +19 -320
- package/dist/index.d.ts +19 -320
- package/dist/index.js +42 -62
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +6 -6
package/dist/index.d.ts
CHANGED
|
@@ -23,68 +23,6 @@ declare class BaseChatModelGroq extends BaseChatModel {
|
|
|
23
23
|
transformMessages(messages: MessageType[]): ParamsType;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
declare const Gemma_7b_ITLiteral: "gemma-7b-it";
|
|
27
|
-
declare const Gemma_7b_ITSchema: {
|
|
28
|
-
name: string;
|
|
29
|
-
description: string;
|
|
30
|
-
roles: Partial<Record<"system" | "user" | "assistant" | "tool", string | undefined>>;
|
|
31
|
-
modalities: ["text" | "tool-call" | "tool-response", ...("text" | "tool-call" | "tool-response")[]];
|
|
32
|
-
maxInputTokens: number;
|
|
33
|
-
maxOutputTokens: number;
|
|
34
|
-
config: {
|
|
35
|
-
def: Record<string, {
|
|
36
|
-
type: "multi-string";
|
|
37
|
-
param: string;
|
|
38
|
-
title: string;
|
|
39
|
-
description: string;
|
|
40
|
-
max: number;
|
|
41
|
-
} | {
|
|
42
|
-
type: "object-schema";
|
|
43
|
-
param: string;
|
|
44
|
-
title: string;
|
|
45
|
-
description: string;
|
|
46
|
-
objectSchema?: any;
|
|
47
|
-
} | {
|
|
48
|
-
type: "range";
|
|
49
|
-
param: string;
|
|
50
|
-
title: string;
|
|
51
|
-
description: string;
|
|
52
|
-
max: number;
|
|
53
|
-
default: number;
|
|
54
|
-
min: number;
|
|
55
|
-
step: number;
|
|
56
|
-
} | {
|
|
57
|
-
type: "select-boolean";
|
|
58
|
-
param: string;
|
|
59
|
-
title: string;
|
|
60
|
-
description: string;
|
|
61
|
-
default: boolean | null;
|
|
62
|
-
} | {
|
|
63
|
-
type: "select-string";
|
|
64
|
-
param: string;
|
|
65
|
-
title: string;
|
|
66
|
-
description: string;
|
|
67
|
-
default: string | null;
|
|
68
|
-
choices: string[];
|
|
69
|
-
}>;
|
|
70
|
-
schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
|
|
71
|
-
};
|
|
72
|
-
};
|
|
73
|
-
declare const Gemma_7b_ITOptions: z.ZodObject<{
|
|
74
|
-
modelName: z.ZodString;
|
|
75
|
-
apiKey: z.ZodString;
|
|
76
|
-
}, "strip", z.ZodTypeAny, {
|
|
77
|
-
modelName: string;
|
|
78
|
-
apiKey: string;
|
|
79
|
-
}, {
|
|
80
|
-
modelName: string;
|
|
81
|
-
apiKey: string;
|
|
82
|
-
}>;
|
|
83
|
-
type Gemma_7b_ITOptionsType = z.infer<typeof Gemma_7b_ITOptions>;
|
|
84
|
-
declare class Gemma_7b_IT extends BaseChatModelGroq {
|
|
85
|
-
constructor(options: Gemma_7b_ITOptionsType);
|
|
86
|
-
}
|
|
87
|
-
|
|
88
26
|
declare const Gemma2_9b_ITLiteral: "gemma2-9b-it";
|
|
89
27
|
declare const Gemma2_9b_ITSchema: {
|
|
90
28
|
name: string;
|
|
@@ -126,11 +64,12 @@ declare const Gemma2_9b_ITSchema: {
|
|
|
126
64
|
param: string;
|
|
127
65
|
title: string;
|
|
128
66
|
description: string;
|
|
129
|
-
default: string
|
|
67
|
+
default: string;
|
|
130
68
|
choices: string[];
|
|
131
69
|
}>;
|
|
132
70
|
schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
|
|
133
71
|
};
|
|
72
|
+
maxReasoningTokens?: number | undefined;
|
|
134
73
|
};
|
|
135
74
|
declare const Gemma2_9b_ITOptions: z.ZodObject<{
|
|
136
75
|
modelName: z.ZodString;
|
|
@@ -147,68 +86,6 @@ declare class Gemma2_9b_IT extends BaseChatModelGroq {
|
|
|
147
86
|
constructor(options: Gemma2_9b_ITOptionsType);
|
|
148
87
|
}
|
|
149
88
|
|
|
150
|
-
declare const Llama_3_1_70bLiteral: "llama-3.1-70b-versatile";
|
|
151
|
-
declare const Llama_3_1_70bSchema: {
|
|
152
|
-
name: string;
|
|
153
|
-
description: string;
|
|
154
|
-
roles: Partial<Record<"system" | "user" | "assistant" | "tool", string | undefined>>;
|
|
155
|
-
modalities: ["text" | "tool-call" | "tool-response", ...("text" | "tool-call" | "tool-response")[]];
|
|
156
|
-
maxInputTokens: number;
|
|
157
|
-
maxOutputTokens: number;
|
|
158
|
-
config: {
|
|
159
|
-
def: Record<string, {
|
|
160
|
-
type: "multi-string";
|
|
161
|
-
param: string;
|
|
162
|
-
title: string;
|
|
163
|
-
description: string;
|
|
164
|
-
max: number;
|
|
165
|
-
} | {
|
|
166
|
-
type: "object-schema";
|
|
167
|
-
param: string;
|
|
168
|
-
title: string;
|
|
169
|
-
description: string;
|
|
170
|
-
objectSchema?: any;
|
|
171
|
-
} | {
|
|
172
|
-
type: "range";
|
|
173
|
-
param: string;
|
|
174
|
-
title: string;
|
|
175
|
-
description: string;
|
|
176
|
-
max: number;
|
|
177
|
-
default: number;
|
|
178
|
-
min: number;
|
|
179
|
-
step: number;
|
|
180
|
-
} | {
|
|
181
|
-
type: "select-boolean";
|
|
182
|
-
param: string;
|
|
183
|
-
title: string;
|
|
184
|
-
description: string;
|
|
185
|
-
default: boolean | null;
|
|
186
|
-
} | {
|
|
187
|
-
type: "select-string";
|
|
188
|
-
param: string;
|
|
189
|
-
title: string;
|
|
190
|
-
description: string;
|
|
191
|
-
default: string | null;
|
|
192
|
-
choices: string[];
|
|
193
|
-
}>;
|
|
194
|
-
schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
|
|
195
|
-
};
|
|
196
|
-
};
|
|
197
|
-
declare const Llama_3_1_70b_Options: z.ZodObject<{
|
|
198
|
-
modelName: z.ZodString;
|
|
199
|
-
apiKey: z.ZodString;
|
|
200
|
-
}, "strip", z.ZodTypeAny, {
|
|
201
|
-
modelName: string;
|
|
202
|
-
apiKey: string;
|
|
203
|
-
}, {
|
|
204
|
-
modelName: string;
|
|
205
|
-
apiKey: string;
|
|
206
|
-
}>;
|
|
207
|
-
type Llama_3_1_70b_OptionsType = z.infer<typeof Llama_3_1_70b_Options>;
|
|
208
|
-
declare class Llama_3_1_70b extends BaseChatModelGroq {
|
|
209
|
-
constructor(options: Llama_3_1_70b_OptionsType);
|
|
210
|
-
}
|
|
211
|
-
|
|
212
89
|
declare const Llama_3_1_8bLiteral: "llama-3.1-8b-instant";
|
|
213
90
|
declare const Llama_3_1_8bSchema: {
|
|
214
91
|
name: string;
|
|
@@ -250,11 +127,12 @@ declare const Llama_3_1_8bSchema: {
|
|
|
250
127
|
param: string;
|
|
251
128
|
title: string;
|
|
252
129
|
description: string;
|
|
253
|
-
default: string
|
|
130
|
+
default: string;
|
|
254
131
|
choices: string[];
|
|
255
132
|
}>;
|
|
256
133
|
schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
|
|
257
134
|
};
|
|
135
|
+
maxReasoningTokens?: number | undefined;
|
|
258
136
|
};
|
|
259
137
|
declare const Llama_3_1_8b_Options: z.ZodObject<{
|
|
260
138
|
modelName: z.ZodString;
|
|
@@ -312,11 +190,12 @@ declare const Llama_3_2_11b_VisionSchema: {
|
|
|
312
190
|
param: string;
|
|
313
191
|
title: string;
|
|
314
192
|
description: string;
|
|
315
|
-
default: string
|
|
193
|
+
default: string;
|
|
316
194
|
choices: string[];
|
|
317
195
|
}>;
|
|
318
196
|
schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
|
|
319
197
|
};
|
|
198
|
+
maxReasoningTokens?: number | undefined;
|
|
320
199
|
};
|
|
321
200
|
declare const Llama_3_2_11b_VisionOptions: z.ZodObject<{
|
|
322
201
|
modelName: z.ZodString;
|
|
@@ -374,11 +253,12 @@ declare const Llama_3_2_1bSchema: {
|
|
|
374
253
|
param: string;
|
|
375
254
|
title: string;
|
|
376
255
|
description: string;
|
|
377
|
-
default: string
|
|
256
|
+
default: string;
|
|
378
257
|
choices: string[];
|
|
379
258
|
}>;
|
|
380
259
|
schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
|
|
381
260
|
};
|
|
261
|
+
maxReasoningTokens?: number | undefined;
|
|
382
262
|
};
|
|
383
263
|
declare const Llama_3_2_1b_Options: z.ZodObject<{
|
|
384
264
|
modelName: z.ZodString;
|
|
@@ -436,11 +316,12 @@ declare const Llama_3_2_3bSchema: {
|
|
|
436
316
|
param: string;
|
|
437
317
|
title: string;
|
|
438
318
|
description: string;
|
|
439
|
-
default: string
|
|
319
|
+
default: string;
|
|
440
320
|
choices: string[];
|
|
441
321
|
}>;
|
|
442
322
|
schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
|
|
443
323
|
};
|
|
324
|
+
maxReasoningTokens?: number | undefined;
|
|
444
325
|
};
|
|
445
326
|
declare const Llama_3_2_3b_Options: z.ZodObject<{
|
|
446
327
|
modelName: z.ZodString;
|
|
@@ -498,11 +379,12 @@ declare const Llama_3_2_90b_VisionSchema: {
|
|
|
498
379
|
param: string;
|
|
499
380
|
title: string;
|
|
500
381
|
description: string;
|
|
501
|
-
default: string
|
|
382
|
+
default: string;
|
|
502
383
|
choices: string[];
|
|
503
384
|
}>;
|
|
504
385
|
schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
|
|
505
386
|
};
|
|
387
|
+
maxReasoningTokens?: number | undefined;
|
|
506
388
|
};
|
|
507
389
|
declare const Llama_3_2_90b_VisionOptions: z.ZodObject<{
|
|
508
390
|
modelName: z.ZodString;
|
|
@@ -519,68 +401,6 @@ declare class Llama_3_2_90b_Vision extends BaseChatModelGroq {
|
|
|
519
401
|
constructor(options: Llama_3_2_90b_VisionOptionsType);
|
|
520
402
|
}
|
|
521
403
|
|
|
522
|
-
declare const Llama_3_70b_Tool_UseLiteral: "llama3-groq-70b-8192-tool-use-preview";
|
|
523
|
-
declare const Llama_3_70b_Tool_UseSchema: {
|
|
524
|
-
name: string;
|
|
525
|
-
description: string;
|
|
526
|
-
roles: Partial<Record<"system" | "user" | "assistant" | "tool", string | undefined>>;
|
|
527
|
-
modalities: ["text" | "tool-call" | "tool-response", ...("text" | "tool-call" | "tool-response")[]];
|
|
528
|
-
maxInputTokens: number;
|
|
529
|
-
maxOutputTokens: number;
|
|
530
|
-
config: {
|
|
531
|
-
def: Record<string, {
|
|
532
|
-
type: "multi-string";
|
|
533
|
-
param: string;
|
|
534
|
-
title: string;
|
|
535
|
-
description: string;
|
|
536
|
-
max: number;
|
|
537
|
-
} | {
|
|
538
|
-
type: "object-schema";
|
|
539
|
-
param: string;
|
|
540
|
-
title: string;
|
|
541
|
-
description: string;
|
|
542
|
-
objectSchema?: any;
|
|
543
|
-
} | {
|
|
544
|
-
type: "range";
|
|
545
|
-
param: string;
|
|
546
|
-
title: string;
|
|
547
|
-
description: string;
|
|
548
|
-
max: number;
|
|
549
|
-
default: number;
|
|
550
|
-
min: number;
|
|
551
|
-
step: number;
|
|
552
|
-
} | {
|
|
553
|
-
type: "select-boolean";
|
|
554
|
-
param: string;
|
|
555
|
-
title: string;
|
|
556
|
-
description: string;
|
|
557
|
-
default: boolean | null;
|
|
558
|
-
} | {
|
|
559
|
-
type: "select-string";
|
|
560
|
-
param: string;
|
|
561
|
-
title: string;
|
|
562
|
-
description: string;
|
|
563
|
-
default: string | null;
|
|
564
|
-
choices: string[];
|
|
565
|
-
}>;
|
|
566
|
-
schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
|
|
567
|
-
};
|
|
568
|
-
};
|
|
569
|
-
declare const Llama_3_70b_Tool_Use_Options: z.ZodObject<{
|
|
570
|
-
modelName: z.ZodString;
|
|
571
|
-
apiKey: z.ZodString;
|
|
572
|
-
}, "strip", z.ZodTypeAny, {
|
|
573
|
-
modelName: string;
|
|
574
|
-
apiKey: string;
|
|
575
|
-
}, {
|
|
576
|
-
modelName: string;
|
|
577
|
-
apiKey: string;
|
|
578
|
-
}>;
|
|
579
|
-
type Llama_3_70b_Tool_Use_OptionsType = z.infer<typeof Llama_3_70b_Tool_Use_Options>;
|
|
580
|
-
declare class Llama_3_70b_Tool_Use extends BaseChatModelGroq {
|
|
581
|
-
constructor(options: Llama_3_70b_Tool_Use_OptionsType);
|
|
582
|
-
}
|
|
583
|
-
|
|
584
404
|
declare const Llama_3_70bLiteral: "llama3-70b-8192";
|
|
585
405
|
declare const Llama_3_70bSchema: {
|
|
586
406
|
name: string;
|
|
@@ -622,11 +442,12 @@ declare const Llama_3_70bSchema: {
|
|
|
622
442
|
param: string;
|
|
623
443
|
title: string;
|
|
624
444
|
description: string;
|
|
625
|
-
default: string
|
|
445
|
+
default: string;
|
|
626
446
|
choices: string[];
|
|
627
447
|
}>;
|
|
628
448
|
schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
|
|
629
449
|
};
|
|
450
|
+
maxReasoningTokens?: number | undefined;
|
|
630
451
|
};
|
|
631
452
|
declare const Llama_3_70bOptions: z.ZodObject<{
|
|
632
453
|
modelName: z.ZodString;
|
|
@@ -643,68 +464,6 @@ declare class Llama_3_70b extends BaseChatModelGroq {
|
|
|
643
464
|
constructor(options: Llama_3_70bOptionsType);
|
|
644
465
|
}
|
|
645
466
|
|
|
646
|
-
declare const Llama_3_8b_Tool_UseLiteral: "llama3-groq-8b-8192-tool-use-preview";
|
|
647
|
-
declare const Llama_3_8b_Tool_UseSchema: {
|
|
648
|
-
name: string;
|
|
649
|
-
description: string;
|
|
650
|
-
roles: Partial<Record<"system" | "user" | "assistant" | "tool", string | undefined>>;
|
|
651
|
-
modalities: ["text" | "tool-call" | "tool-response", ...("text" | "tool-call" | "tool-response")[]];
|
|
652
|
-
maxInputTokens: number;
|
|
653
|
-
maxOutputTokens: number;
|
|
654
|
-
config: {
|
|
655
|
-
def: Record<string, {
|
|
656
|
-
type: "multi-string";
|
|
657
|
-
param: string;
|
|
658
|
-
title: string;
|
|
659
|
-
description: string;
|
|
660
|
-
max: number;
|
|
661
|
-
} | {
|
|
662
|
-
type: "object-schema";
|
|
663
|
-
param: string;
|
|
664
|
-
title: string;
|
|
665
|
-
description: string;
|
|
666
|
-
objectSchema?: any;
|
|
667
|
-
} | {
|
|
668
|
-
type: "range";
|
|
669
|
-
param: string;
|
|
670
|
-
title: string;
|
|
671
|
-
description: string;
|
|
672
|
-
max: number;
|
|
673
|
-
default: number;
|
|
674
|
-
min: number;
|
|
675
|
-
step: number;
|
|
676
|
-
} | {
|
|
677
|
-
type: "select-boolean";
|
|
678
|
-
param: string;
|
|
679
|
-
title: string;
|
|
680
|
-
description: string;
|
|
681
|
-
default: boolean | null;
|
|
682
|
-
} | {
|
|
683
|
-
type: "select-string";
|
|
684
|
-
param: string;
|
|
685
|
-
title: string;
|
|
686
|
-
description: string;
|
|
687
|
-
default: string | null;
|
|
688
|
-
choices: string[];
|
|
689
|
-
}>;
|
|
690
|
-
schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
|
|
691
|
-
};
|
|
692
|
-
};
|
|
693
|
-
declare const Llama_3_8b_Tool_Use_Options: z.ZodObject<{
|
|
694
|
-
modelName: z.ZodString;
|
|
695
|
-
apiKey: z.ZodString;
|
|
696
|
-
}, "strip", z.ZodTypeAny, {
|
|
697
|
-
modelName: string;
|
|
698
|
-
apiKey: string;
|
|
699
|
-
}, {
|
|
700
|
-
modelName: string;
|
|
701
|
-
apiKey: string;
|
|
702
|
-
}>;
|
|
703
|
-
type Llama_3_8b_Tool_Use_OptionsType = z.infer<typeof Llama_3_8b_Tool_Use_Options>;
|
|
704
|
-
declare class Llama_3_8b_Tool_Use extends BaseChatModelGroq {
|
|
705
|
-
constructor(options: Llama_3_8b_Tool_Use_OptionsType);
|
|
706
|
-
}
|
|
707
|
-
|
|
708
467
|
declare const Llama_3_8bLiteral: "llama3-8b-8192";
|
|
709
468
|
declare const Llama_3_8bSchema: {
|
|
710
469
|
name: string;
|
|
@@ -746,11 +505,12 @@ declare const Llama_3_8bSchema: {
|
|
|
746
505
|
param: string;
|
|
747
506
|
title: string;
|
|
748
507
|
description: string;
|
|
749
|
-
default: string
|
|
508
|
+
default: string;
|
|
750
509
|
choices: string[];
|
|
751
510
|
}>;
|
|
752
511
|
schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
|
|
753
512
|
};
|
|
513
|
+
maxReasoningTokens?: number | undefined;
|
|
754
514
|
};
|
|
755
515
|
declare const Llama_3_8bOptions: z.ZodObject<{
|
|
756
516
|
modelName: z.ZodString;
|
|
@@ -808,11 +568,12 @@ declare const LlamaGuard_3_8bSchema: {
|
|
|
808
568
|
param: string;
|
|
809
569
|
title: string;
|
|
810
570
|
description: string;
|
|
811
|
-
default: string
|
|
571
|
+
default: string;
|
|
812
572
|
choices: string[];
|
|
813
573
|
}>;
|
|
814
574
|
schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
|
|
815
575
|
};
|
|
576
|
+
maxReasoningTokens?: number | undefined;
|
|
816
577
|
};
|
|
817
578
|
declare const LlamaGuard_3_8bOptions: z.ZodObject<{
|
|
818
579
|
modelName: z.ZodString;
|
|
@@ -829,68 +590,6 @@ declare class LlamaGuard_3_8b extends BaseChatModelGroq {
|
|
|
829
590
|
constructor(options: LlamaGuard_3_8bOptionsType);
|
|
830
591
|
}
|
|
831
592
|
|
|
832
|
-
declare const Mixtral_8x7bLiteral: "mixtral-8x7b-32768";
|
|
833
|
-
declare const Mixtral_8x7bSchema: {
|
|
834
|
-
name: string;
|
|
835
|
-
description: string;
|
|
836
|
-
roles: Partial<Record<"system" | "user" | "assistant" | "tool", string | undefined>>;
|
|
837
|
-
modalities: ["text" | "tool-call" | "tool-response", ...("text" | "tool-call" | "tool-response")[]];
|
|
838
|
-
maxInputTokens: number;
|
|
839
|
-
maxOutputTokens: number;
|
|
840
|
-
config: {
|
|
841
|
-
def: Record<string, {
|
|
842
|
-
type: "multi-string";
|
|
843
|
-
param: string;
|
|
844
|
-
title: string;
|
|
845
|
-
description: string;
|
|
846
|
-
max: number;
|
|
847
|
-
} | {
|
|
848
|
-
type: "object-schema";
|
|
849
|
-
param: string;
|
|
850
|
-
title: string;
|
|
851
|
-
description: string;
|
|
852
|
-
objectSchema?: any;
|
|
853
|
-
} | {
|
|
854
|
-
type: "range";
|
|
855
|
-
param: string;
|
|
856
|
-
title: string;
|
|
857
|
-
description: string;
|
|
858
|
-
max: number;
|
|
859
|
-
default: number;
|
|
860
|
-
min: number;
|
|
861
|
-
step: number;
|
|
862
|
-
} | {
|
|
863
|
-
type: "select-boolean";
|
|
864
|
-
param: string;
|
|
865
|
-
title: string;
|
|
866
|
-
description: string;
|
|
867
|
-
default: boolean | null;
|
|
868
|
-
} | {
|
|
869
|
-
type: "select-string";
|
|
870
|
-
param: string;
|
|
871
|
-
title: string;
|
|
872
|
-
description: string;
|
|
873
|
-
default: string | null;
|
|
874
|
-
choices: string[];
|
|
875
|
-
}>;
|
|
876
|
-
schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
|
|
877
|
-
};
|
|
878
|
-
};
|
|
879
|
-
declare const Mixtral_8x7bOptions: z.ZodObject<{
|
|
880
|
-
modelName: z.ZodString;
|
|
881
|
-
apiKey: z.ZodString;
|
|
882
|
-
}, "strip", z.ZodTypeAny, {
|
|
883
|
-
modelName: string;
|
|
884
|
-
apiKey: string;
|
|
885
|
-
}, {
|
|
886
|
-
modelName: string;
|
|
887
|
-
apiKey: string;
|
|
888
|
-
}>;
|
|
889
|
-
type Mixtral_8x7bOptionsType = z.infer<typeof Mixtral_8x7bOptions>;
|
|
890
|
-
declare class Mixtral_8x7b extends BaseChatModelGroq {
|
|
891
|
-
constructor(options: Mixtral_8x7bOptionsType);
|
|
892
|
-
}
|
|
893
|
-
|
|
894
593
|
declare class Groq<C extends BaseChatModelOptionsType, E extends Record<string, any> = Record<string, any>> implements ProviderV1<C, E> {
|
|
895
594
|
readonly version: "v1";
|
|
896
595
|
readonly name = "groq";
|
|
@@ -905,4 +604,4 @@ declare class Groq<C extends BaseChatModelOptionsType, E extends Record<string,
|
|
|
905
604
|
embeddingModel(options: E): EmbeddingModelV1;
|
|
906
605
|
}
|
|
907
606
|
|
|
908
|
-
export { BaseChatModelGroq, BaseChatModelOptions, type BaseChatModelOptionsType, Gemma2_9b_IT, Gemma2_9b_ITLiteral, Gemma2_9b_ITOptions, type Gemma2_9b_ITOptionsType, Gemma2_9b_ITSchema,
|
|
607
|
+
export { BaseChatModelGroq, BaseChatModelOptions, type BaseChatModelOptionsType, Gemma2_9b_IT, Gemma2_9b_ITLiteral, Gemma2_9b_ITOptions, type Gemma2_9b_ITOptionsType, Gemma2_9b_ITSchema, Groq, LlamaGuard_3_8b, LlamaGuard_3_8bLiteral, LlamaGuard_3_8bOptions, type LlamaGuard_3_8bOptionsType, LlamaGuard_3_8bSchema, Llama_3_1_8b, Llama_3_1_8bLiteral, Llama_3_1_8bSchema, Llama_3_1_8b_Options, type Llama_3_1_8b_OptionsType, Llama_3_2_11b_Vision, Llama_3_2_11b_VisionLiteral, Llama_3_2_11b_VisionOptions, type Llama_3_2_11b_VisionOptionsType, Llama_3_2_11b_VisionSchema, Llama_3_2_1b, Llama_3_2_1bLiteral, Llama_3_2_1bSchema, Llama_3_2_1b_Options, type Llama_3_2_1b_OptionsType, Llama_3_2_3b, Llama_3_2_3bLiteral, Llama_3_2_3bSchema, Llama_3_2_3b_Options, type Llama_3_2_3b_OptionsType, Llama_3_2_90b_Vision, Llama_3_2_90b_VisionLiteral, Llama_3_2_90b_VisionOptions, type Llama_3_2_90b_VisionOptionsType, Llama_3_2_90b_VisionSchema, Llama_3_70b, Llama_3_70bLiteral, Llama_3_70bOptions, type Llama_3_70bOptionsType, Llama_3_70bSchema, Llama_3_8b, Llama_3_8bLiteral, Llama_3_8bOptions, type Llama_3_8bOptionsType, Llama_3_8bSchema };
|
package/dist/index.js
CHANGED
|
@@ -4,69 +4,49 @@ var provider = require('@adaline/provider');
|
|
|
4
4
|
var zod = require('zod');
|
|
5
5
|
var openai = require('@adaline/openai');
|
|
6
6
|
|
|
7
|
-
var
|
|
8
|
-
`)):
|
|
9
|
-
`));}),r}};var S=provider.RangeConfigItem({param:"temperature",title:provider.CHAT_CONFIG.TEMPERATURE.title,description:provider.CHAT_CONFIG.TEMPERATURE.description,min:0,max:2,step:.01,default:1}),G=s=>provider.RangeConfigItem({param:"max_tokens",title:provider.CHAT_CONFIG.MAX_TOKENS.title,description:provider.CHAT_CONFIG.MAX_TOKENS.description,min:0,max:s,step:1,default:0}),A=provider.MultiStringConfigItem({param:"stop",title:provider.CHAT_CONFIG.STOP(4).title,description:provider.CHAT_CONFIG.STOP(4).description,max:4}),E=provider.RangeConfigItem({param:"top_p",title:provider.CHAT_CONFIG.TOP_P.title,description:provider.CHAT_CONFIG.TOP_P.description,min:0,max:1,step:.01,default:1}),R=provider.RangeConfigItem({param:"frequency_penalty",title:provider.CHAT_CONFIG.FREQUENCY_PENALTY.title,description:provider.CHAT_CONFIG.FREQUENCY_PENALTY.description,min:-2,max:2,step:.01,default:0}),q=provider.RangeConfigItem({param:"presence_penalty",title:provider.CHAT_CONFIG.PRESENCE_PENALTY.title,description:provider.CHAT_CONFIG.PRESENCE_PENALTY.description,min:-2,max:2,step:.01,default:0}),B=provider.RangeConfigItem({param:"seed",title:provider.CHAT_CONFIG.SEED.title,description:provider.CHAT_CONFIG.SEED.description,min:0,max:1e6,step:1,default:0}),k=provider.SelectStringConfigItem({param:"response_format",title:provider.CHAT_CONFIG.RESPONSE_FORMAT.title,description:provider.CHAT_CONFIG.RESPONSE_FORMAT.description,default:"text",choices:["text","json_object"]}),z=provider.SelectStringConfigItem({param:"tool_choice",title:"Tool choice",description:"Controls which (if any) tool is called by the model. 'none' means the model will not call a function. 'auto' means the model can pick between generating a message or calling a tool.",default:"auto",choices:["auto","required","none"]});var de=s=>zod.z.object({temperature:S.schema,maxTokens:G(s).schema,stop:A.schema,topP:E.schema,frequencyPenalty:R.schema,presencePenalty:q.schema,seed:B.schema.transform(o=>o===0?void 0:o),responseFormat:k.schema,toolChoice:z.schema}),_e=s=>({temperature:S.def,maxTokens:G(s).def,stop:A.def,topP:E.def,frequencyPenalty:R.def,presencePenalty:q.def,seed:B.def,responseFormat:k.def,toolChoice:z.def});var e={base:s=>({def:_e(s),schema:de(s)})};var v="gemma-7b-it",ve="Gemma is a family of lightweight, state-of-the-art open models from Google, built from the same research and technology used to create the Gemini models.",P=provider.ChatModelSchema(openai.OpenAIChatModelRoles,openai.OpenAIChatModelTextToolModalitiesEnum).parse({name:v,description:ve,maxInputTokens:8192,maxOutputTokens:4096,roles:openai.OpenAIChatModelRolesMap,modalities:openai.OpenAIChatModelTextToolModalities,config:{def:e.base(4096).def,schema:e.base(4096).schema}}),ce=t,_=class extends a{constructor(o){super(P,o);}};var U="gemma2-9b-it",Fe="Gemma is a family of lightweight, state-of-the-art open models from Google, built from the same research and technology used to create the Gemini models.",V=provider.ChatModelSchema(openai.OpenAIChatModelRoles,openai.OpenAIChatModelTextToolModalitiesEnum).parse({name:U,description:Fe,maxInputTokens:8192,maxOutputTokens:4096,roles:openai.OpenAIChatModelRolesMap,modalities:openai.OpenAIChatModelTextToolModalities,config:{def:e.base(4096).def,schema:e.base(4096).schema}}),he=t,c=class extends a{constructor(o){super(V,o);}};var w="llama-3.1-70b-versatile",Qe="The Llama 3.1 instruction tuned text only models (8B, 70B, 405B) are optimized for multilingual dialogue use cases and outperform many of the available open source and closed chat models on common industry benchmarks.",N=provider.ChatModelSchema(openai.OpenAIChatModelRoles,openai.OpenAIChatModelTextToolModalitiesEnum).parse({name:w,description:Qe,maxInputTokens:128e3,maxOutputTokens:8192,roles:openai.OpenAIChatModelRolesMap,modalities:openai.OpenAIChatModelTextToolModalities,config:{def:e.base(8192).def,schema:e.base(8192).schema}}),Me=t,h=class extends a{constructor(o){super(N,o);}};var F="llama-3.1-8b-instant",eo="The Llama 3.1 instruction tuned text only models (8B, 70B, 405B) are optimized for multilingual dialogue use cases and outperform many of the available open source and closed chat models on common industry benchmarks.",D=provider.ChatModelSchema(openai.OpenAIChatModelRoles,openai.OpenAIChatModelTextToolModalitiesEnum).parse({name:F,description:eo,maxInputTokens:128e3,maxOutputTokens:8192,roles:openai.OpenAIChatModelRolesMap,modalities:openai.OpenAIChatModelTextToolModalities,config:{def:e.base(8192).def,schema:e.base(8192).schema}}),fe=t,M=class extends a{constructor(o){super(D,o);}};var j="llama-3.2-11b-vision-preview",lo="The Llama 3.2-Vision instruction-tuned models are optimized for visual recognition, image reasoning, captioning, and answering general questions about an image. The models outperform many of the available open source and closed multimodal models on common industry benchmarks.",K=provider.ChatModelSchema(openai.OpenAIChatModelRoles,openai.OpenAIChatModelModalitiesEnum).parse({name:j,description:lo,maxInputTokens:128e3,maxOutputTokens:8192,roles:openai.OpenAIChatModelRolesMap,modalities:openai.OpenAIChatModelModalities,config:{def:e.base(8192).def,schema:e.base(8192).schema}}),be=t,f=class extends a{constructor(o){super(K,o);}};var Y="llama-3.2-1b-preview",co="The Llama 3.2 instruction-tuned text only models are optimized for multilingual dialogue use cases, including agentic retrieval and summarization tasks. They outperform many of the available open source and closed chat models on common industry benchmarks.",$=provider.ChatModelSchema(openai.OpenAIChatModelRoles,openai.OpenAIChatModelTextToolModalitiesEnum).parse({name:Y,description:co,maxInputTokens:128e3,maxOutputTokens:8192,roles:openai.OpenAIChatModelRolesMap,modalities:openai.OpenAIChatModelTextToolModalities,config:{def:e.base(8192).def,schema:e.base(8192).schema}}),ue=t,b=class extends a{constructor(o){super($,o);}};var Q="llama-3.2-3b-preview",To="The Llama 3.2 instruction-tuned text only models are optimized for multilingual dialogue use cases, including agentic retrieval and summarization tasks. They outperform many of the available open source and closed chat models on common industry benchmarks.",X=provider.ChatModelSchema(openai.OpenAIChatModelRoles,openai.OpenAIChatModelTextToolModalitiesEnum).parse({name:Q,description:To,maxInputTokens:128e3,maxOutputTokens:8192,roles:openai.OpenAIChatModelRolesMap,modalities:openai.OpenAIChatModelTextToolModalities,config:{def:e.base(8192).def,schema:e.base(8192).schema}}),Te=t,u=class extends a{constructor(o){super(X,o);}};var Z="llama-3.2-90b-vision-preview",go="The Llama 3.2-90B Vision instruction-tuned models are optimized for advanced visual recognition, complex image reasoning, detailed captioning, and answering intricate questions about images. These models achieve state-of-the-art results on multiple industry benchmarks for multimodal tasks.",H=provider.ChatModelSchema(openai.OpenAIChatModelRoles,openai.OpenAIChatModelModalitiesEnum).parse({name:Z,description:go,maxInputTokens:131072,maxOutputTokens:8192,roles:openai.OpenAIChatModelRolesMap,modalities:openai.OpenAIChatModelModalities,config:{def:e.base(8192).def,schema:e.base(8192).schema}}),Oe=t,T=class extends a{constructor(o){super(H,o);}};var J="llama3-groq-70b-8192-tool-use-preview",Ro="This is the 70B parameter version of the Llama 3 Groq Tool Use model, specifically designed for advanced tool use and function calling tasks.",W=provider.ChatModelSchema(openai.OpenAIChatModelRoles,openai.OpenAIChatModelTextToolModalitiesEnum).parse({name:J,description:Ro,maxInputTokens:8192,maxOutputTokens:4096,roles:openai.OpenAIChatModelRolesMap,modalities:openai.OpenAIChatModelTextToolModalities,config:{def:e.base(4096).def,schema:e.base(4096).schema}}),ye=t,O=class extends a{constructor(o){super(W,o);}};var ee="llama3-70b-8192",Po="The Llama 3 instruction tuned models are optimized for dialogue use cases and outperform many of the available open source chat models on common industry benchmarks.",oe=provider.ChatModelSchema(openai.OpenAIChatModelRoles,openai.OpenAIChatModelTextToolModalitiesEnum).parse({name:ee,description:Po,maxInputTokens:8192,maxOutputTokens:4096,roles:openai.OpenAIChatModelRolesMap,modalities:openai.OpenAIChatModelTextToolModalities,config:{def:e.base(4096).def,schema:e.base(4096).schema}}),Ce=t,y=class extends a{constructor(o){super(oe,o);}};var ae="llama3-groq-8b-8192-tool-use-preview",Do="This is the 8B parameter version of the Llama 3 Groq Tool Use model, specifically designed for advanced tool use and function calling tasks.",te=provider.ChatModelSchema(openai.OpenAIChatModelRoles,openai.OpenAIChatModelTextToolModalitiesEnum).parse({name:ae,description:Do,maxInputTokens:8192,maxOutputTokens:4096,roles:openai.OpenAIChatModelRolesMap,modalities:openai.OpenAIChatModelTextToolModalities,config:{def:e.base(4096).def,schema:e.base(4096).schema}}),Le=t,C=class extends a{constructor(o){super(te,o);}};var se="llama3-8b-8192",Xo="The Llama 3 instruction tuned models are optimized for dialogue use cases and outperform many of the available open source chat models on common industry benchmarks.",ne=provider.ChatModelSchema(openai.OpenAIChatModelRoles,openai.OpenAIChatModelTextToolModalitiesEnum).parse({name:se,description:Xo,maxInputTokens:8192,maxOutputTokens:4096,roles:openai.OpenAIChatModelRolesMap,modalities:openai.OpenAIChatModelTextToolModalities,config:{def:e.base(4096).def,schema:e.base(4096).schema}}),xe=t,L=class extends a{constructor(o){super(ne,o);}};var le="llama-guard-3-8b",oa="Llama Guard 3 is a Llama-3.1-8B pretrained model, fine-tuned for content safety classification.",ie=provider.ChatModelSchema(openai.OpenAIChatModelRoles,openai.OpenAIChatModelTextToolModalitiesEnum).parse({name:le,description:oa,maxInputTokens:8192,maxOutputTokens:4096,roles:openai.OpenAIChatModelRolesMap,modalities:openai.OpenAIChatModelTextToolModalities,config:{def:e.base(4096).def,schema:e.base(4096).schema}}),ge=t,x=class extends a{constructor(o){super(ie,o);}};var me="mixtral-8x7b-32768",ia="The Mixtral-8x7B Large Language Model (LLM) is a pretrained generative Sparse Mixture of Experts.",re=provider.ChatModelSchema(openai.OpenAIChatModelRoles,openai.OpenAIChatModelTextToolModalitiesEnum).parse({name:me,description:ia,maxInputTokens:32768,maxOutputTokens:4096,roles:openai.OpenAIChatModelRolesMap,modalities:openai.OpenAIChatModelTextToolModalities,config:{def:e.base(4096).def,schema:e.base(4096).schema}}),Ie=t,g=class extends a{constructor(o){super(re,o);}};var ma="groq",d=class{constructor(){this.version="v1";this.name=ma;this.chatModelFactories={[v]:{model:_,modelOptions:ce,modelSchema:P},[U]:{model:c,modelOptions:he,modelSchema:V},[le]:{model:x,modelOptions:ge,modelSchema:ie},[se]:{model:L,modelOptions:xe,modelSchema:ne},[ee]:{model:y,modelOptions:Ce,modelSchema:oe},[F]:{model:M,modelOptions:fe,modelSchema:D},[ae]:{model:C,modelOptions:Le,modelSchema:te},[w]:{model:h,modelOptions:Me,modelSchema:N},[J]:{model:O,modelOptions:ye,modelSchema:W},[j]:{model:f,modelOptions:be,modelSchema:K},[Z]:{model:T,modelOptions:Oe,modelSchema:H},[Q]:{model:u,modelOptions:Te,modelSchema:X},[Y]:{model:b,modelOptions:ue,modelSchema:$},[me]:{model:g,modelOptions:Ie,modelSchema:re}};this.embeddingModelFactories={};}chatModelLiterals(){return Object.keys(this.chatModelFactories)}chatModelSchemas(){return Object.keys(this.chatModelFactories).reduce((o,n)=>(o[n]=this.chatModelFactories[n].modelSchema,o),{})}chatModel(o){let n=o.modelName;if(!(n in this.chatModelFactories))throw new provider.ProviderError({info:`Groq chat model: ${n} not found`,cause:new Error(`Groq chat model: ${n} not found, available chat models:
|
|
10
|
-
${this.chatModelLiterals().join(", ")}`)});let
|
|
7
|
+
var s=zod.z.object({modelName:zod.z.string().min(1),apiKey:zod.z.string().min(1)}),a=class extends openai.BaseChatModel{constructor(n,p){let l=s.parse(p),r=_.baseUrl;super(n,{modelName:l.modelName,apiKey:l.apiKey,baseUrl:r,completeChatUrl:`${r}/chat/completions`,streamChatUrl:`${r}/chat/completions`});this.version="v1";this.modelSchema=n,this.modelName=l.modelName,this.groqApiKey=l.apiKey;}transformMessages(n){let p=n.some(m=>m.role==="system"),l=n.some(m=>m.content.some(c=>c.modality==="image"));if(p&&l)throw new provider.InvalidMessagesError({info:`Invalid message content for model : '${this.modelName}'`,cause:new Error("Prompting with images is incompatible with system messages`)")});let r=super.transformMessages(n);return r.messages.forEach(m=>{m.role==="system"?typeof m.content!="string"&&(m.content=m.content.map(c=>c.text).join(`
|
|
8
|
+
`)):m.role==="assistant"&&m.content&&typeof m.content!="string"&&(m.content=m.content.map(c=>c.text).join(`
|
|
9
|
+
`));}),r}};var g=provider.RangeConfigItem({param:"temperature",title:provider.CHAT_CONFIG.TEMPERATURE.title,description:provider.CHAT_CONFIG.TEMPERATURE.description,min:0,max:2,step:.01,default:1}),x=t=>provider.RangeConfigItem({param:"max_tokens",title:provider.CHAT_CONFIG.MAX_TOKENS.title,description:provider.CHAT_CONFIG.MAX_TOKENS.description,min:0,max:t,step:1,default:0}),S=provider.MultiStringConfigItem({param:"stop",title:provider.CHAT_CONFIG.STOP(4).title,description:provider.CHAT_CONFIG.STOP(4).description,max:4}),I=provider.RangeConfigItem({param:"top_p",title:provider.CHAT_CONFIG.TOP_P.title,description:provider.CHAT_CONFIG.TOP_P.description,min:0,max:1,step:.01,default:1}),E=provider.RangeConfigItem({param:"frequency_penalty",title:provider.CHAT_CONFIG.FREQUENCY_PENALTY.title,description:provider.CHAT_CONFIG.FREQUENCY_PENALTY.description,min:-2,max:2,step:.01,default:0}),A=provider.RangeConfigItem({param:"presence_penalty",title:provider.CHAT_CONFIG.PRESENCE_PENALTY.title,description:provider.CHAT_CONFIG.PRESENCE_PENALTY.description,min:-2,max:2,step:.01,default:0}),G=provider.RangeConfigItem({param:"seed",title:provider.CHAT_CONFIG.SEED.title,description:provider.CHAT_CONFIG.SEED.description,min:0,max:1e6,step:1,default:0}),R=provider.SelectStringConfigItem({param:"response_format",title:provider.CHAT_CONFIG.RESPONSE_FORMAT.title,description:provider.CHAT_CONFIG.RESPONSE_FORMAT.description,default:"text",choices:["text","json_object"]}),k=provider.SelectStringConfigItem({param:"tool_choice",title:"Tool choice",description:"Controls which (if any) tool is called by the model. 'none' means the model will not call a function. 'auto' means the model can pick between generating a message or calling a tool.",default:"auto",choices:["auto","required","none"]});var J=t=>zod.z.object({temperature:g.schema,maxTokens:x(t).schema,stop:S.schema,topP:I.schema,frequencyPenalty:E.schema,presencePenalty:A.schema,seed:G.schema.transform(e=>e===0?void 0:e),responseFormat:R.schema,toolChoice:k.schema}),W=t=>({temperature:g.def,maxTokens:x(t).def,stop:S.def,topP:I.def,frequencyPenalty:E.def,presencePenalty:A.def,seed:G.def,responseFormat:R.def,toolChoice:k.def});var o={base:t=>({def:W(t),schema:J(t)})};var q="gemma2-9b-it",ye="Gemma is a family of lightweight, state-of-the-art open models from Google, built from the same research and technology used to create the Gemini models.",P=provider.ChatModelSchema(openai.OpenAIChatModelRoles,openai.OpenAIChatModelTextToolModalitiesEnum).parse({name:q,description:ye,maxInputTokens:8192,maxOutputTokens:4096,roles:openai.OpenAIChatModelRolesMap,modalities:openai.OpenAIChatModelTextToolModalities,config:{def:o.base(4096).def,schema:o.base(4096).schema}}),ee=s,h=class extends a{constructor(e){super(P,e);}};var z="llama-3.1-8b-instant",xe="The Llama 3.1 instruction tuned text only models (8B, 70B, 405B) are optimized for multilingual dialogue use cases and outperform many of the available open source and closed chat models on common industry benchmarks.",B=provider.ChatModelSchema(openai.OpenAIChatModelRoles,openai.OpenAIChatModelTextToolModalitiesEnum).parse({name:z,description:xe,maxInputTokens:128e3,maxOutputTokens:8192,roles:openai.OpenAIChatModelRolesMap,modalities:openai.OpenAIChatModelTextToolModalities,config:{def:o.base(8192).def,schema:o.base(8192).schema}}),oe=s,f=class extends a{constructor(e){super(B,e);}};var v="llama-3.2-11b-vision-preview",Re="The Llama 3.2-Vision instruction-tuned models are optimized for visual recognition, image reasoning, captioning, and answering general questions about an image. The models outperform many of the available open source and closed multimodal models on common industry benchmarks.",V=provider.ChatModelSchema(openai.OpenAIChatModelRoles,openai.OpenAIChatModelModalitiesEnum).parse({name:v,description:Re,maxInputTokens:128e3,maxOutputTokens:8192,roles:openai.OpenAIChatModelRolesMap,modalities:openai.OpenAIChatModelModalities,config:{def:o.base(8192).def,schema:o.base(8192).schema}}),ae=s,M=class extends a{constructor(e){super(V,e);}};var w="llama-3.2-1b-preview",ve="The Llama 3.2 instruction-tuned text only models are optimized for multilingual dialogue use cases, including agentic retrieval and summarization tasks. They outperform many of the available open source and closed chat models on common industry benchmarks.",N=provider.ChatModelSchema(openai.OpenAIChatModelRoles,openai.OpenAIChatModelTextToolModalitiesEnum).parse({name:w,description:ve,maxInputTokens:128e3,maxOutputTokens:8192,roles:openai.OpenAIChatModelRolesMap,modalities:openai.OpenAIChatModelTextToolModalities,config:{def:o.base(8192).def,schema:o.base(8192).schema}}),te=s,u=class extends a{constructor(e){super(N,e);}};var F="llama-3.2-3b-preview",je="The Llama 3.2 instruction-tuned text only models are optimized for multilingual dialogue use cases, including agentic retrieval and summarization tasks. They outperform many of the available open source and closed chat models on common industry benchmarks.",D=provider.ChatModelSchema(openai.OpenAIChatModelRoles,openai.OpenAIChatModelTextToolModalitiesEnum).parse({name:F,description:je,maxInputTokens:128e3,maxOutputTokens:8192,roles:openai.OpenAIChatModelRolesMap,modalities:openai.OpenAIChatModelTextToolModalities,config:{def:o.base(8192).def,schema:o.base(8192).schema}}),se=s,b=class extends a{constructor(e){super(D,e);}};var j="llama-3.2-90b-vision-preview",Xe="The Llama 3.2-90B Vision instruction-tuned models are optimized for advanced visual recognition, complex image reasoning, detailed captioning, and answering intricate questions about images. These models achieve state-of-the-art results on multiple industry benchmarks for multimodal tasks.",U=provider.ChatModelSchema(openai.OpenAIChatModelRoles,openai.OpenAIChatModelModalitiesEnum).parse({name:j,description:Xe,maxInputTokens:131072,maxOutputTokens:8192,roles:openai.OpenAIChatModelRolesMap,modalities:openai.OpenAIChatModelModalities,config:{def:o.base(8192).def,schema:o.base(8192).schema}}),ne=s,y=class extends a{constructor(e){super(U,e);}};var K="llama3-70b-8192",oo="The Llama 3 instruction tuned models are optimized for dialogue use cases and outperform many of the available open source chat models on common industry benchmarks.",Y=provider.ChatModelSchema(openai.OpenAIChatModelRoles,openai.OpenAIChatModelTextToolModalitiesEnum).parse({name:K,description:oo,maxInputTokens:8192,maxOutputTokens:4096,roles:openai.OpenAIChatModelRolesMap,modalities:openai.OpenAIChatModelTextToolModalities,config:{def:o.base(4096).def,schema:o.base(4096).schema}}),ie=s,O=class extends a{constructor(e){super(Y,e);}};var $="llama3-8b-8192",mo="The Llama 3 instruction tuned models are optimized for dialogue use cases and outperform many of the available open source chat models on common industry benchmarks.",Q=provider.ChatModelSchema(openai.OpenAIChatModelRoles,openai.OpenAIChatModelTextToolModalitiesEnum).parse({name:$,description:mo,maxInputTokens:8192,maxOutputTokens:4096,roles:openai.OpenAIChatModelRolesMap,modalities:openai.OpenAIChatModelTextToolModalities,config:{def:o.base(4096).def,schema:o.base(4096).schema}}),me=s,T=class extends a{constructor(e){super(Q,e);}};var X="llama-guard-3-8b",ho="Llama Guard 3 is a Llama-3.1-8B pretrained model, fine-tuned for content safety classification.",Z=provider.ChatModelSchema(openai.OpenAIChatModelRoles,openai.OpenAIChatModelTextToolModalitiesEnum).parse({name:X,description:ho,maxInputTokens:8192,maxOutputTokens:4096,roles:openai.OpenAIChatModelRolesMap,modalities:openai.OpenAIChatModelTextToolModalities,config:{def:o.base(4096).def,schema:o.base(4096).schema}}),le=s,C=class extends a{constructor(e){super(Z,e);}};var fo="groq",_=class{constructor(){this.version="v1";this.name=fo;this.chatModelFactories={[q]:{model:h,modelOptions:ee,modelSchema:P},[X]:{model:C,modelOptions:le,modelSchema:Z},[$]:{model:T,modelOptions:me,modelSchema:Q},[K]:{model:O,modelOptions:ie,modelSchema:Y},[z]:{model:f,modelOptions:oe,modelSchema:B},[v]:{model:M,modelOptions:ae,modelSchema:V},[j]:{model:y,modelOptions:ne,modelSchema:U},[F]:{model:b,modelOptions:se,modelSchema:D},[w]:{model:u,modelOptions:te,modelSchema:N}};this.embeddingModelFactories={};}chatModelLiterals(){return Object.keys(this.chatModelFactories)}chatModelSchemas(){return Object.keys(this.chatModelFactories).reduce((e,n)=>(e[n]=this.chatModelFactories[n].modelSchema,e),{})}chatModel(e){let n=e.modelName;if(!(n in this.chatModelFactories))throw new provider.ProviderError({info:`Groq chat model: ${n} not found`,cause:new Error(`Groq chat model: ${n} not found, available chat models:
|
|
10
|
+
${this.chatModelLiterals().join(", ")}`)});let p=this.chatModelFactories[n].model,l=this.chatModelFactories[n].modelOptions.parse(e);return new p(l)}embeddingModelLiterals(){return Object.keys(this.embeddingModelFactories)}embeddingModelSchemas(){return Object.keys(this.embeddingModelFactories).reduce((e,n)=>(e[n]=this.embeddingModelFactories[n].modelSchema,e),{})}embeddingModel(e){throw new provider.ProviderError({info:"Groq does not support embedding models yet",cause:new Error("Groq does not support embedding models yet")})}};_.baseUrl="https://api.groq.com/openai/v1";
|
|
11
11
|
|
|
12
12
|
exports.BaseChatModelGroq = a;
|
|
13
|
-
exports.BaseChatModelOptions =
|
|
14
|
-
exports.Gemma2_9b_IT =
|
|
15
|
-
exports.Gemma2_9b_ITLiteral =
|
|
16
|
-
exports.Gemma2_9b_ITOptions =
|
|
17
|
-
exports.Gemma2_9b_ITSchema =
|
|
18
|
-
exports.
|
|
19
|
-
exports.
|
|
20
|
-
exports.
|
|
21
|
-
exports.
|
|
22
|
-
exports.
|
|
23
|
-
exports.
|
|
24
|
-
exports.
|
|
25
|
-
exports.
|
|
26
|
-
exports.
|
|
27
|
-
exports.
|
|
28
|
-
exports.
|
|
29
|
-
exports.
|
|
30
|
-
exports.
|
|
31
|
-
exports.
|
|
32
|
-
exports.
|
|
33
|
-
exports.
|
|
34
|
-
exports.
|
|
35
|
-
exports.
|
|
36
|
-
exports.
|
|
37
|
-
exports.
|
|
38
|
-
exports.
|
|
39
|
-
exports.
|
|
40
|
-
exports.
|
|
41
|
-
exports.
|
|
42
|
-
exports.
|
|
43
|
-
exports.
|
|
44
|
-
exports.
|
|
45
|
-
exports.
|
|
46
|
-
exports.
|
|
47
|
-
exports.
|
|
48
|
-
exports.
|
|
49
|
-
exports.
|
|
50
|
-
exports.
|
|
51
|
-
exports.Llama_3_70b = y;
|
|
52
|
-
exports.Llama_3_70bLiteral = ee;
|
|
53
|
-
exports.Llama_3_70bOptions = Ce;
|
|
54
|
-
exports.Llama_3_70bSchema = oe;
|
|
55
|
-
exports.Llama_3_70b_Tool_Use = O;
|
|
56
|
-
exports.Llama_3_70b_Tool_UseLiteral = J;
|
|
57
|
-
exports.Llama_3_70b_Tool_UseSchema = W;
|
|
58
|
-
exports.Llama_3_70b_Tool_Use_Options = ye;
|
|
59
|
-
exports.Llama_3_8b = L;
|
|
60
|
-
exports.Llama_3_8bLiteral = se;
|
|
61
|
-
exports.Llama_3_8bOptions = xe;
|
|
62
|
-
exports.Llama_3_8bSchema = ne;
|
|
63
|
-
exports.Llama_3_8b_Tool_Use = C;
|
|
64
|
-
exports.Llama_3_8b_Tool_UseLiteral = ae;
|
|
65
|
-
exports.Llama_3_8b_Tool_UseSchema = te;
|
|
66
|
-
exports.Llama_3_8b_Tool_Use_Options = Le;
|
|
67
|
-
exports.Mixtral_8x7b = g;
|
|
68
|
-
exports.Mixtral_8x7bLiteral = me;
|
|
69
|
-
exports.Mixtral_8x7bOptions = Ie;
|
|
70
|
-
exports.Mixtral_8x7bSchema = re;
|
|
13
|
+
exports.BaseChatModelOptions = s;
|
|
14
|
+
exports.Gemma2_9b_IT = h;
|
|
15
|
+
exports.Gemma2_9b_ITLiteral = q;
|
|
16
|
+
exports.Gemma2_9b_ITOptions = ee;
|
|
17
|
+
exports.Gemma2_9b_ITSchema = P;
|
|
18
|
+
exports.Groq = _;
|
|
19
|
+
exports.LlamaGuard_3_8b = C;
|
|
20
|
+
exports.LlamaGuard_3_8bLiteral = X;
|
|
21
|
+
exports.LlamaGuard_3_8bOptions = le;
|
|
22
|
+
exports.LlamaGuard_3_8bSchema = Z;
|
|
23
|
+
exports.Llama_3_1_8b = f;
|
|
24
|
+
exports.Llama_3_1_8bLiteral = z;
|
|
25
|
+
exports.Llama_3_1_8bSchema = B;
|
|
26
|
+
exports.Llama_3_1_8b_Options = oe;
|
|
27
|
+
exports.Llama_3_2_11b_Vision = M;
|
|
28
|
+
exports.Llama_3_2_11b_VisionLiteral = v;
|
|
29
|
+
exports.Llama_3_2_11b_VisionOptions = ae;
|
|
30
|
+
exports.Llama_3_2_11b_VisionSchema = V;
|
|
31
|
+
exports.Llama_3_2_1b = u;
|
|
32
|
+
exports.Llama_3_2_1bLiteral = w;
|
|
33
|
+
exports.Llama_3_2_1bSchema = N;
|
|
34
|
+
exports.Llama_3_2_1b_Options = te;
|
|
35
|
+
exports.Llama_3_2_3b = b;
|
|
36
|
+
exports.Llama_3_2_3bLiteral = F;
|
|
37
|
+
exports.Llama_3_2_3bSchema = D;
|
|
38
|
+
exports.Llama_3_2_3b_Options = se;
|
|
39
|
+
exports.Llama_3_2_90b_Vision = y;
|
|
40
|
+
exports.Llama_3_2_90b_VisionLiteral = j;
|
|
41
|
+
exports.Llama_3_2_90b_VisionOptions = ne;
|
|
42
|
+
exports.Llama_3_2_90b_VisionSchema = U;
|
|
43
|
+
exports.Llama_3_70b = O;
|
|
44
|
+
exports.Llama_3_70bLiteral = K;
|
|
45
|
+
exports.Llama_3_70bOptions = ie;
|
|
46
|
+
exports.Llama_3_70bSchema = Y;
|
|
47
|
+
exports.Llama_3_8b = T;
|
|
48
|
+
exports.Llama_3_8bLiteral = $;
|
|
49
|
+
exports.Llama_3_8bOptions = me;
|
|
50
|
+
exports.Llama_3_8bSchema = Q;
|
|
71
51
|
//# sourceMappingURL=index.js.map
|
|
72
52
|
//# sourceMappingURL=index.js.map
|