@llumiverse/common 0.24.0 → 0.25.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. package/package.json +1 -1
  2. package/lib/cjs/capability/azure_foundry.js +0 -160
  3. package/lib/cjs/capability/azure_foundry.js.map +0 -1
  4. package/lib/cjs/capability/bedrock.js +0 -158
  5. package/lib/cjs/capability/bedrock.js.map +0 -1
  6. package/lib/cjs/capability/openai.js +0 -95
  7. package/lib/cjs/capability/openai.js.map +0 -1
  8. package/lib/cjs/capability/vertexai.js +0 -80
  9. package/lib/cjs/capability/vertexai.js.map +0 -1
  10. package/lib/cjs/capability.js +0 -82
  11. package/lib/cjs/capability.js.map +0 -1
  12. package/lib/cjs/index.js +0 -25
  13. package/lib/cjs/index.js.map +0 -1
  14. package/lib/cjs/options/azure_foundry.js +0 -428
  15. package/lib/cjs/options/azure_foundry.js.map +0 -1
  16. package/lib/cjs/options/bedrock.js +0 -462
  17. package/lib/cjs/options/bedrock.js.map +0 -1
  18. package/lib/cjs/options/fallback.js +0 -35
  19. package/lib/cjs/options/fallback.js.map +0 -1
  20. package/lib/cjs/options/groq.js +0 -37
  21. package/lib/cjs/options/groq.js.map +0 -1
  22. package/lib/cjs/options/openai.js +0 -126
  23. package/lib/cjs/options/openai.js.map +0 -1
  24. package/lib/cjs/options/vertexai.js +0 -503
  25. package/lib/cjs/options/vertexai.js.map +0 -1
  26. package/lib/cjs/options.js +0 -30
  27. package/lib/cjs/options.js.map +0 -1
  28. package/lib/cjs/package.json +0 -3
  29. package/lib/cjs/types.js +0 -195
  30. package/lib/cjs/types.js.map +0 -1
  31. package/lib/esm/capability/azure_foundry.js +0 -157
  32. package/lib/esm/capability/azure_foundry.js.map +0 -1
  33. package/lib/esm/capability/bedrock.js +0 -155
  34. package/lib/esm/capability/bedrock.js.map +0 -1
  35. package/lib/esm/capability/openai.js +0 -92
  36. package/lib/esm/capability/openai.js.map +0 -1
  37. package/lib/esm/capability/vertexai.js +0 -77
  38. package/lib/esm/capability/vertexai.js.map +0 -1
  39. package/lib/esm/capability.js +0 -77
  40. package/lib/esm/capability.js.map +0 -1
  41. package/lib/esm/index.js +0 -9
  42. package/lib/esm/index.js.map +0 -1
  43. package/lib/esm/options/azure_foundry.js +0 -424
  44. package/lib/esm/options/azure_foundry.js.map +0 -1
  45. package/lib/esm/options/bedrock.js +0 -458
  46. package/lib/esm/options/bedrock.js.map +0 -1
  47. package/lib/esm/options/fallback.js +0 -32
  48. package/lib/esm/options/fallback.js.map +0 -1
  49. package/lib/esm/options/groq.js +0 -34
  50. package/lib/esm/options/groq.js.map +0 -1
  51. package/lib/esm/options/openai.js +0 -123
  52. package/lib/esm/options/openai.js.map +0 -1
  53. package/lib/esm/options/vertexai.js +0 -498
  54. package/lib/esm/options/vertexai.js.map +0 -1
  55. package/lib/esm/options.js +0 -27
  56. package/lib/esm/options.js.map +0 -1
  57. package/lib/esm/types.js +0 -192
  58. package/lib/esm/types.js.map +0 -1
  59. package/lib/types/capability/azure_foundry.d.ts +0 -7
  60. package/lib/types/capability/azure_foundry.d.ts.map +0 -1
  61. package/lib/types/capability/bedrock.d.ts +0 -7
  62. package/lib/types/capability/bedrock.d.ts.map +0 -1
  63. package/lib/types/capability/openai.d.ts +0 -13
  64. package/lib/types/capability/openai.d.ts.map +0 -1
  65. package/lib/types/capability/vertexai.d.ts +0 -11
  66. package/lib/types/capability/vertexai.d.ts.map +0 -1
  67. package/lib/types/capability.d.ts +0 -5
  68. package/lib/types/capability.d.ts.map +0 -1
  69. package/lib/types/index.d.ts +0 -9
  70. package/lib/types/index.d.ts.map +0 -1
  71. package/lib/types/options/azure_foundry.d.ts +0 -52
  72. package/lib/types/options/azure_foundry.d.ts.map +0 -1
  73. package/lib/types/options/bedrock.d.ts +0 -52
  74. package/lib/types/options/bedrock.d.ts.map +0 -1
  75. package/lib/types/options/fallback.d.ts +0 -13
  76. package/lib/types/options/fallback.d.ts.map +0 -1
  77. package/lib/types/options/groq.d.ts +0 -12
  78. package/lib/types/options/groq.d.ts.map +0 -1
  79. package/lib/types/options/openai.d.ts +0 -21
  80. package/lib/types/options/openai.d.ts.map +0 -1
  81. package/lib/types/options/vertexai.d.ts +0 -74
  82. package/lib/types/options/vertexai.d.ts.map +0 -1
  83. package/lib/types/options.d.ts +0 -3
  84. package/lib/types/options.d.ts.map +0 -1
  85. package/lib/types/types.d.ts +0 -442
  86. package/lib/types/types.d.ts.map +0 -1
@@ -1,458 +0,0 @@
1
- import { OptionType } from "../types.js";
2
- import { textOptionsFallback } from "./fallback.js";
3
- export function getMaxTokensLimitBedrock(model) {
4
- // Claude models
5
- if (model.includes("claude")) {
6
- if (model.includes("-4-")) {
7
- if (model.includes("opus-")) {
8
- return 32768;
9
- }
10
- return 65536;
11
- }
12
- else if (model.includes("-3-7-")) {
13
- return 131072;
14
- }
15
- else if (model.includes("-3-5-")) {
16
- return 8192;
17
- }
18
- else {
19
- return 4096;
20
- }
21
- }
22
- // Amazon models
23
- else if (model.includes("amazon")) {
24
- if (model.includes("titan")) {
25
- if (model.includes("lite")) {
26
- return 4096;
27
- }
28
- else if (model.includes("express")) {
29
- return 8192;
30
- }
31
- else if (model.includes("premier")) {
32
- return 3072;
33
- }
34
- }
35
- else if (model.includes("nova")) {
36
- return 10000;
37
- }
38
- }
39
- // Mistral models
40
- else if (model.includes("mistral")) {
41
- if (model.includes("8x7b")) {
42
- return 4096;
43
- }
44
- if (model.includes("pixtral-large")) {
45
- return 131072;
46
- }
47
- return 8192;
48
- }
49
- // AI21 models
50
- else if (model.includes("ai21")) {
51
- if (model.includes("j2")) {
52
- if (model.includes("large") || model.includes("mid") || model.includes("ultra")) {
53
- return 8191;
54
- }
55
- return 2048;
56
- }
57
- if (model.includes("jamba")) {
58
- return 4096;
59
- }
60
- }
61
- // Cohere models
62
- else if (model.includes("cohere.command")) {
63
- if (model.includes("command-a")) {
64
- return 8192;
65
- }
66
- return 4096;
67
- }
68
- // Meta models
69
- else if (model.includes("llama")) {
70
- if (model.includes("3-70b") || model.includes("3-8b")) {
71
- return 2048;
72
- }
73
- return 8192;
74
- }
75
- //Writer models
76
- else if (model.includes("writer")) {
77
- if (model.includes("palmyra-x5")) {
78
- return 8192;
79
- }
80
- else if (model.includes("palmyra-x4")) {
81
- return 8192;
82
- }
83
- }
84
- // OpenAI gpt-oss models
85
- if (model.includes("gpt-oss")) {
86
- return 128000;
87
- }
88
- // TwelveLabs models
89
- else if (model.includes("twelvelabs")) {
90
- if (model.includes("pegasus")) {
91
- return 4096; // Max output tokens for Pegasus
92
- }
93
- // Marengo is an embedding model, doesn't generate text
94
- return undefined;
95
- }
96
- // Default fallback
97
- return undefined;
98
- }
99
- export function getBedrockOptions(model, option) {
100
- if (model.includes("canvas")) {
101
- const taskTypeList = {
102
- name: "taskType",
103
- type: OptionType.enum,
104
- enum: {
105
- "Text-To-Image": "TEXT_IMAGE",
106
- "Text-To-Image-with-Image-Conditioning": "TEXT_IMAGE_WITH_IMAGE_CONDITIONING",
107
- "Color-Guided-Generation": "COLOR_GUIDED_GENERATION",
108
- "Image-Variation": "IMAGE_VARIATION",
109
- "Inpainting": "INPAINTING",
110
- "Outpainting": "OUTPAINTING",
111
- "Background-Removal": "BACKGROUND_REMOVAL",
112
- },
113
- default: "TEXT_IMAGE",
114
- description: "The type of task to perform",
115
- refresh: true,
116
- };
117
- let otherOptions = [
118
- { name: "width", type: OptionType.numeric, min: 320, max: 4096, default: 512, step: 16, integer: true, description: "The width of the generated image" },
119
- { name: "height", type: OptionType.numeric, min: 320, max: 4096, default: 512, step: 16, integer: true, description: "The height of the generated image" },
120
- {
121
- name: "quality",
122
- type: OptionType.enum,
123
- enum: { "standard": "standard", "premium": "premium" },
124
- default: "standard",
125
- description: "The quality of the generated image"
126
- },
127
- { name: "cfgScale", type: OptionType.numeric, min: 1.1, max: 10.0, default: 6.5, step: 0.1, integer: false, description: "The scale of the generated image" },
128
- { name: "seed", type: OptionType.numeric, min: 0, max: 858993459, default: 12, integer: true, description: "The seed of the generated image" },
129
- { name: "numberOfImages", type: OptionType.numeric, min: 1, max: 5, default: 1, integer: true, description: "The number of images to generate" },
130
- ];
131
- let dependentOptions = [];
132
- switch (option?.taskType ?? "TEXT_IMAGE") {
133
- case "TEXT_IMAGE_WITH_IMAGE_CONDITIONING":
134
- dependentOptions.push({
135
- name: "controlMode", type: OptionType.enum, enum: { "CANNY_EDGE": "CANNY_EDGE", "SEGMENTATION": "SEGMENTATION" },
136
- default: "CANNY_EDGE", description: "The control mode of the generated image"
137
- }, { name: "controlStrength", type: OptionType.numeric, min: 0, max: 1, default: 0.7, description: "The control strength of the generated image" });
138
- break;
139
- case "COLOR_GUIDED_GENERATION":
140
- dependentOptions.push({ name: "colors", type: OptionType.string_list, value: [], description: "Hexadecimal color values to guide generation" });
141
- break;
142
- case "IMAGE_VARIATION":
143
- dependentOptions.push({ name: "similarityStrength", type: OptionType.numeric, min: 0.2, max: 1, default: 0.7, description: "The similarity strength of the generated image" });
144
- break;
145
- case "INPAINTING":
146
- //No changes
147
- break;
148
- case "OUTPAINTING":
149
- dependentOptions.push({
150
- name: "outPaintingMode", type: OptionType.enum, enum: { "DEFAULT": "DEFAULT", "PRECISE": "PRECISE" },
151
- default: "default", description: "The outpainting mode of the generated image"
152
- });
153
- break;
154
- case "BACKGROUND_REMOVAL":
155
- dependentOptions = [];
156
- otherOptions = [];
157
- break;
158
- }
159
- return {
160
- _option_id: "bedrock-nova-canvas",
161
- options: [
162
- taskTypeList,
163
- ...otherOptions,
164
- ...dependentOptions,
165
- ]
166
- };
167
- }
168
- else {
169
- const max_tokens_limit = getMaxTokensLimitBedrock(model);
170
- //Not canvas, i.e normal AWS bedrock converse
171
- const baseConverseOptions = [
172
- {
173
- name: "max_tokens",
174
- type: OptionType.numeric,
175
- min: 1,
176
- max: max_tokens_limit,
177
- integer: true,
178
- step: 200,
179
- description: "The maximum number of tokens to generate",
180
- },
181
- {
182
- name: "temperature",
183
- type: OptionType.numeric,
184
- min: 0.0,
185
- default: 0.7,
186
- step: 0.1,
187
- description: "A higher temperature biases toward less likely tokens, making the model more creative"
188
- },
189
- {
190
- name: "top_p",
191
- type: OptionType.numeric,
192
- min: 0,
193
- max: 1,
194
- step: 0.1,
195
- description: "Limits token sampling to the cumulative probability of the top p tokens"
196
- },
197
- {
198
- name: "stop_sequence",
199
- type: OptionType.string_list,
200
- value: [],
201
- description: "The generation will halt if one of the stop sequences is output"
202
- }
203
- ];
204
- if (model.includes("claude")) {
205
- const claudeConverseOptions = [
206
- {
207
- name: "top_k",
208
- type: OptionType.numeric,
209
- min: 1,
210
- integer: true,
211
- step: 1,
212
- description: "Limits token sampling to the top k tokens"
213
- },
214
- ];
215
- if (model.includes("-3-7-") || model.includes("-4-")) {
216
- const claudeModeOptions = [
217
- {
218
- name: "thinking_mode",
219
- type: OptionType.boolean,
220
- default: false,
221
- description: "If true, use the extended reasoning mode"
222
- },
223
- ];
224
- const claudeThinkingOptions = option?.thinking_mode ? [
225
- {
226
- name: "thinking_budget_tokens",
227
- type: OptionType.numeric,
228
- min: 1024,
229
- default: 1024,
230
- integer: true,
231
- step: 100,
232
- description: "The target number of tokens to use for reasoning, not a hard limit."
233
- },
234
- {
235
- name: "include_thoughts",
236
- type: OptionType.boolean,
237
- default: false,
238
- description: "If true, include the reasoning in the response"
239
- },
240
- ] : [];
241
- return {
242
- _option_id: "bedrock-claude",
243
- options: [
244
- ...baseConverseOptions,
245
- ...claudeConverseOptions,
246
- ...claudeModeOptions,
247
- ...claudeThinkingOptions
248
- ]
249
- };
250
- }
251
- return {
252
- _option_id: "bedrock-claude",
253
- options: [...baseConverseOptions, ...claudeConverseOptions]
254
- };
255
- }
256
- else if (model.includes("amazon")) {
257
- //Titan models also exists but does not support any additional options
258
- if (model.includes("nova")) {
259
- const novaConverseOptions = [
260
- {
261
- name: "top_k",
262
- type: OptionType.numeric,
263
- min: 1,
264
- integer: true,
265
- step: 1,
266
- description: "Limits token sampling to the top k tokens"
267
- },
268
- ];
269
- return {
270
- _option_id: "bedrock-nova",
271
- options: [...baseConverseOptions, ...novaConverseOptions]
272
- };
273
- }
274
- }
275
- else if (model.includes("mistral")) {
276
- //7b and 8x7b instruct
277
- if (model.includes("7b")) {
278
- const mistralConverseOptions = [
279
- {
280
- name: "top_k",
281
- type: OptionType.numeric,
282
- min: 1,
283
- integer: true,
284
- step: 1,
285
- description: "Limits token sampling to the top k tokens"
286
- },
287
- ];
288
- return {
289
- _option_id: "bedrock-mistral",
290
- options: [...baseConverseOptions, ...mistralConverseOptions]
291
- };
292
- }
293
- //Other models such as Mistral Small, Large and Large 2
294
- //Support no additional options
295
- }
296
- else if (model.includes("ai21")) {
297
- const ai21ConverseOptions = [
298
- {
299
- name: "presence_penalty",
300
- type: OptionType.numeric,
301
- min: -2,
302
- max: 2,
303
- default: 0,
304
- step: 0.1,
305
- description: "A higher presence penalty encourages the model to talk about new topics"
306
- },
307
- {
308
- name: "frequency_penalty",
309
- type: OptionType.numeric,
310
- min: -2,
311
- max: 2,
312
- default: 0,
313
- step: 0.1,
314
- description: "A higher frequency penalty encourages the model to use less common words"
315
- },
316
- ];
317
- return {
318
- _option_id: "bedrock-ai21",
319
- options: [...baseConverseOptions, ...ai21ConverseOptions]
320
- };
321
- }
322
- else if (model.includes("cohere.command")) {
323
- const cohereCommandOptions = [
324
- {
325
- name: "top_k",
326
- type: OptionType.numeric,
327
- min: 1,
328
- integer: true,
329
- step: 1,
330
- description: "Limits token sampling to the top k tokens"
331
- },
332
- ];
333
- if (model.includes("command-r")) {
334
- const cohereCommandROptions = [
335
- {
336
- name: "frequency_penalty",
337
- type: OptionType.numeric,
338
- min: -2,
339
- max: 2,
340
- default: 0,
341
- step: 0.1,
342
- description: "A higher frequency penalty encourages the model to use less common words"
343
- },
344
- {
345
- name: "presence_penalty",
346
- type: OptionType.numeric,
347
- min: -2,
348
- max: 2,
349
- default: 0,
350
- step: 0.1,
351
- description: "A higher presence penalty encourages the model to talk about new topics"
352
- },
353
- ];
354
- return {
355
- _option_id: "bedrock-cohere-command",
356
- options: [...baseConverseOptions, ...cohereCommandOptions, ...cohereCommandROptions]
357
- };
358
- }
359
- }
360
- else if (model.includes("writer")) {
361
- const palmyraConverseOptions = [
362
- {
363
- name: "min_tokens",
364
- type: OptionType.numeric,
365
- min: 1,
366
- max: max_tokens_limit,
367
- integer: false,
368
- step: 100,
369
- },
370
- {
371
- name: "seed",
372
- type: OptionType.numeric,
373
- integer: true,
374
- description: "Random seed for generation"
375
- },
376
- {
377
- name: "frequency_penalty",
378
- type: OptionType.numeric,
379
- min: -2,
380
- max: 2,
381
- default: 0,
382
- step: 0.1,
383
- description: "A higher frequency penalty encourages the model to use less common words"
384
- },
385
- {
386
- name: "presence_penalty",
387
- type: OptionType.numeric,
388
- min: -2,
389
- max: 2,
390
- default: 0,
391
- step: 0.1,
392
- description: "A higher presence penalty encourages the model to talk about new topics"
393
- },
394
- ];
395
- return {
396
- _option_id: "bedrock-palmyra",
397
- options: [...baseConverseOptions, ...palmyraConverseOptions]
398
- };
399
- }
400
- else if (model.includes("gpt-oss")) {
401
- const gptOssOptions = [
402
- {
403
- name: "reasoning_effort",
404
- type: OptionType.enum,
405
- enum: {
406
- "low": "low",
407
- "medium": "medium",
408
- "high": "high"
409
- },
410
- default: "medium",
411
- description: "The reasoning effort of the model, which affects the quality and speed of the response"
412
- },
413
- ];
414
- const baseConverseOptionsNoStop = [...baseConverseOptions];
415
- // Remove stop_sequence for gpt-oss
416
- baseConverseOptionsNoStop.splice(baseConverseOptionsNoStop.findIndex(o => o.name === "stop_sequence"), 1);
417
- return {
418
- _option_id: "bedrock-gpt-oss",
419
- options: [...baseConverseOptionsNoStop, ...gptOssOptions]
420
- };
421
- }
422
- else if (model.includes("twelvelabs")) {
423
- if (model.includes("pegasus")) {
424
- const pegasusOptions = [
425
- {
426
- name: "temperature",
427
- type: OptionType.numeric,
428
- min: 0.0,
429
- max: 1.0,
430
- default: 0.2,
431
- step: 0.1,
432
- description: "Controls randomness in the output"
433
- },
434
- {
435
- name: "max_tokens",
436
- type: OptionType.numeric,
437
- min: 1,
438
- max: 4096,
439
- integer: true,
440
- step: 100,
441
- description: "The maximum number of tokens to generate"
442
- }
443
- ];
444
- return {
445
- _option_id: "bedrock-twelvelabs-pegasus",
446
- options: pegasusOptions
447
- };
448
- }
449
- }
450
- //Fallback to converse standard.
451
- return {
452
- _option_id: "bedrock-converse",
453
- options: baseConverseOptions
454
- };
455
- }
456
- return textOptionsFallback;
457
- }
458
- //# sourceMappingURL=bedrock.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"bedrock.js","sourceRoot":"","sources":["../../../src/options/bedrock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkC,UAAU,EAAuB,MAAM,aAAa,CAAC;AAC9F,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AA0DpD,MAAM,UAAU,wBAAwB,CAAC,KAAa;IAClD,gBAAgB;IAChB,IAAI,KAAK,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC3B,IAAI,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;YACxB,IAAI,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;gBAC1B,OAAO,KAAK,CAAC;YACjB,CAAC;YACD,OAAO,KAAK,CAAC;QACjB,CAAC;aACI,IAAI,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;YAC/B,OAAO,MAAM,CAAC;QAClB,CAAC;aACI,IAAI,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;YAC/B,OAAO,IAAI,CAAC;QAChB,CAAC;aACI,CAAC;YACF,OAAO,IAAI,CAAC;QAChB,CAAC;IACL,CAAC;IACD,gBAAgB;SACX,IAAI,KAAK,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC;QAChC,IAAI,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;YAC1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T,WAAW,EAAE,mCAAmC;qBACnD;oBACD;wBACI,IAAI,EAAE,YAAY;wBAClB,IAAI,EAAE,UAAU,CAAC,OAAO;wBACxB,GAAG,EAAE,CAAC;wBACN,GAAG,EAAE,IAAI;wBACT,OAAO,EAAE,IAAI;wBACb,IAAI,EAAE,GAAG;wBACT,WAAW,EAAE,0CAA0C;qBAC1D;iBACJ,CAAC;gBACF,OAAO;oBACH,UAAU,EAAE,4BAA4B;oBACxC,OAAO,EAAE,cAAc;iBAC1B,CAAC;YACN,CAAC;QACL,CAAC;QAED,gCAAgC;QAChC,OAAO;YACH,UAAU,EAAE,kBAAkB;YAC9B,OAAO,EAAE,mBAAmB;SAC/B,CAAC;IACN,CAAC;IACD,OAAO,mBAAmB,CAAC;AAC/B,CAAC"}
@@ -1,32 +0,0 @@
1
- import { OptionType, SharedOptions } from "../types.js";
2
- export const textOptionsFallback = {
3
- _option_id: "text-fallback",
4
- options: [
5
- {
6
- name: SharedOptions.max_tokens, type: OptionType.numeric, min: 1,
7
- integer: true, step: 200, description: "The maximum number of tokens to generate"
8
- },
9
- {
10
- name: SharedOptions.temperature, type: OptionType.numeric, min: 0.0, default: 0.7,
11
- integer: false, step: 0.1, description: "A higher temperature biases toward less likely tokens, making the model more creative"
12
- },
13
- {
14
- name: SharedOptions.top_p, type: OptionType.numeric, min: 0, max: 1,
15
- integer: false, step: 0.1, description: "Limits token sampling to the cumulative probability of the top p tokens"
16
- },
17
- {
18
- name: SharedOptions.top_k, type: OptionType.numeric, min: 1,
19
- integer: true, step: 1, description: "Limits token sampling to the top k tokens"
20
- },
21
- {
22
- name: SharedOptions.presence_penalty, type: OptionType.numeric, min: -2.0, max: 2.0,
23
- integer: false, step: 0.1, description: "Penalise tokens if they appear at least once in the text"
24
- },
25
- {
26
- name: SharedOptions.frequency_penalty, type: OptionType.numeric, min: -2.0, max: 2.0,
27
- integer: false, step: 0.1, description: "Penalise tokens based on their frequency in the text"
28
- },
29
- { name: SharedOptions.stop_sequence, type: OptionType.string_list, value: [], description: "The generation will halt if one of the stop sequences is output" },
30
- ]
31
- };
32
- //# sourceMappingURL=fallback.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"fallback.js","sourceRoot":"","sources":["../../../src/options/fallback.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,UAAU,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAa1E,MAAM,CAAC,MAAM,mBAAmB,GAAqB;IACjD,UAAU,EAAE,eAAe;IAC3B,OAAO,EAAE;QACL;YACI,IAAI,EAAE,aAAa,CAAC,UAAU,EAAE,IAAI,EAAE,UAAU,CAAC,OAAO,EAAE,GAAG,EAAE,CAAC;YAChE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,WAAW,EAAE,0CAA0C;SACpF;QACD;YACI,IAAI,EAAE,aAAa,CAAC,WAAW,EAAE,IAAI,EAAE,UAAU,CAAC,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG;YACjF,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,WAAW,EAAE,uFAAuF;SAClI;QACD;YACI,IAAI,EAAE,aAAa,CAAC,KAAK,EAAE,IAAI,EAAE,UAAU,CAAC,OAAO,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC;YACnE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,WAAW,EAAE,yEAAyE;SACpH;QACD;YACI,IAAI,EAAE,aAAa,CAAC,KAAK,EAAE,IAAI,EAAE,UAAU,CAAC,OAAO,EAAE,GAAG,EAAE,CAAC;YAC3D,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,WAAW,EAAE,2CAA2C;SACnF;QACD;YACI,IAAI,EAAE,aAAa,CAAC,gBAAgB,EAAE,IAAI,EAAE,UAAU,CAAC,OAAO,EAAE,GAAG,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG;YACnF,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,WAAW,EAAE,0DAA0D;SACrG;QACD;YACI,IAAI,EAAE,aAAa,CAAC,iBAAiB,EAAE,IAAI,EAAE,UAAU,CAAC,OAAO,EAAE,GAAG,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG;YACpF,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,WAAW,EAAE,sDAAsD;SACjG;QACD,EAAE,IAAI,EAAE,aAAa,CAAC,aAAa,EAAE,IAAI,EAAE,UAAU,CAAC,WAAW,EAAE,KAAK,EAAE,EAAE,EAAE,WAAW,EAAE,iEAAiE,EAAE;KACjK;CACJ,CAAC"}
@@ -1,34 +0,0 @@
1
- import { OptionType, SharedOptions } from "../types.js";
2
- import { textOptionsFallback } from "./fallback.js";
3
- export function getGroqOptions(model, _option) {
4
- if (model.includes("deepseek") && model.includes("r1")) {
5
- const commonOptions = [
6
- {
7
- name: SharedOptions.max_tokens, type: OptionType.numeric, min: 1, max: 131072,
8
- integer: true, description: "The maximum number of tokens to generate",
9
- },
10
- {
11
- name: SharedOptions.temperature, type: OptionType.numeric, min: 0.0, default: 0.7, max: 2.0,
12
- integer: false, step: 0.1, description: "A higher temperature biases toward less likely tokens, making the model more creative. A lower temperature than other models is recommended for deepseek R1, 0.3-0.7 approximately.",
13
- },
14
- {
15
- name: SharedOptions.top_p, type: OptionType.numeric, min: 0, max: 1,
16
- integer: false, step: 0.1, description: "Limits token sampling to the cumulative probability of the top p tokens",
17
- },
18
- {
19
- name: SharedOptions.stop_sequence, type: OptionType.string_list, value: [],
20
- description: "The generation will halt if one of the stop sequences is output",
21
- },
22
- {
23
- name: "reasoning_format", type: OptionType.enum, enum: { "Parsed": "parsed", "Raw": "raw", "Hidden": "hidden" },
24
- default: "parsed", description: "Controls how the reasoning is returned.",
25
- },
26
- ];
27
- return {
28
- _option_id: "groq-deepseek-thinking",
29
- options: commonOptions,
30
- };
31
- }
32
- return textOptionsFall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