aimodels 0.3.2 → 0.3.3
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 +8 -2
- package/dist/index.d.ts +8 -2
- package/dist/index.js +15 -9
- package/dist/index.mjs +15 -9
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -31,10 +31,16 @@ declare class ModelCollection extends Array<Model> {
|
|
|
31
31
|
withMinContext(tokens: number): ModelCollection;
|
|
32
32
|
}
|
|
33
33
|
interface TokenModelContext {
|
|
34
|
-
/** Maximum
|
|
34
|
+
/** Maximum input tokens the model can accept */
|
|
35
35
|
total: number | null;
|
|
36
|
-
/** Maximum
|
|
36
|
+
/** Maximum tokens the model can generate in response */
|
|
37
37
|
maxOutput: number | null;
|
|
38
|
+
/**
|
|
39
|
+
* When set to 1, indicates the model can generate up to maxOutput tokens
|
|
40
|
+
* regardless of input size (as long as input is within total limit).
|
|
41
|
+
* When not set, available output tokens may be reduced based on input size.
|
|
42
|
+
*/
|
|
43
|
+
outputIsFixed?: 1;
|
|
38
44
|
}
|
|
39
45
|
interface ImageModelContext {
|
|
40
46
|
/** Maximum outputs per request */
|
package/dist/index.d.ts
CHANGED
|
@@ -31,10 +31,16 @@ declare class ModelCollection extends Array<Model> {
|
|
|
31
31
|
withMinContext(tokens: number): ModelCollection;
|
|
32
32
|
}
|
|
33
33
|
interface TokenModelContext {
|
|
34
|
-
/** Maximum
|
|
34
|
+
/** Maximum input tokens the model can accept */
|
|
35
35
|
total: number | null;
|
|
36
|
-
/** Maximum
|
|
36
|
+
/** Maximum tokens the model can generate in response */
|
|
37
37
|
maxOutput: number | null;
|
|
38
|
+
/**
|
|
39
|
+
* When set to 1, indicates the model can generate up to maxOutput tokens
|
|
40
|
+
* regardless of input size (as long as input is within total limit).
|
|
41
|
+
* When not set, available output tokens may be reduced based on input size.
|
|
42
|
+
*/
|
|
43
|
+
outputIsFixed?: 1;
|
|
38
44
|
}
|
|
39
45
|
interface ImageModelContext {
|
|
40
46
|
/** Maximum outputs per request */
|
package/dist/index.js
CHANGED
|
@@ -68,7 +68,10 @@ var ModelCollection = class _ModelCollection extends Array {
|
|
|
68
68
|
withMinContext(tokens) {
|
|
69
69
|
return this.filter((model) => {
|
|
70
70
|
const context = model.context;
|
|
71
|
-
|
|
71
|
+
if (!("total" in context) || context.total === null) {
|
|
72
|
+
return false;
|
|
73
|
+
}
|
|
74
|
+
return context.total >= tokens;
|
|
72
75
|
});
|
|
73
76
|
}
|
|
74
77
|
};
|
|
@@ -313,7 +316,7 @@ var anthropic_models_default = {
|
|
|
313
316
|
creator: "anthropic",
|
|
314
317
|
models: [
|
|
315
318
|
{
|
|
316
|
-
id: "claude-3-opus",
|
|
319
|
+
id: "claude-3-opus-20240229",
|
|
317
320
|
name: "Claude 3 Opus",
|
|
318
321
|
license: "proprietary",
|
|
319
322
|
providers: [
|
|
@@ -331,11 +334,12 @@ var anthropic_models_default = {
|
|
|
331
334
|
],
|
|
332
335
|
context: {
|
|
333
336
|
total: 2e5,
|
|
334
|
-
maxOutput: 4096
|
|
337
|
+
maxOutput: 4096,
|
|
338
|
+
outputIsFixed: 1
|
|
335
339
|
}
|
|
336
340
|
},
|
|
337
341
|
{
|
|
338
|
-
id: "claude-3-sonnet",
|
|
342
|
+
id: "claude-3-5-sonnet-20241022",
|
|
339
343
|
name: "Claude 3 Sonnet",
|
|
340
344
|
license: "proprietary",
|
|
341
345
|
providers: [
|
|
@@ -353,11 +357,12 @@ var anthropic_models_default = {
|
|
|
353
357
|
],
|
|
354
358
|
context: {
|
|
355
359
|
total: 2e5,
|
|
356
|
-
maxOutput:
|
|
360
|
+
maxOutput: 8192,
|
|
361
|
+
outputIsFixed: 1
|
|
357
362
|
}
|
|
358
363
|
},
|
|
359
364
|
{
|
|
360
|
-
id: "claude-3-haiku",
|
|
365
|
+
id: "claude-3-5-haiku-20241022",
|
|
361
366
|
name: "Claude 3 Haiku",
|
|
362
367
|
license: "proprietary",
|
|
363
368
|
providers: [
|
|
@@ -375,7 +380,8 @@ var anthropic_models_default = {
|
|
|
375
380
|
],
|
|
376
381
|
context: {
|
|
377
382
|
total: 2e5,
|
|
378
|
-
maxOutput:
|
|
383
|
+
maxOutput: 8192,
|
|
384
|
+
outputIsFixed: 1
|
|
379
385
|
}
|
|
380
386
|
}
|
|
381
387
|
]
|
|
@@ -645,7 +651,7 @@ var deepseek_models_default = {
|
|
|
645
651
|
],
|
|
646
652
|
context: {
|
|
647
653
|
total: 131072,
|
|
648
|
-
maxOutput:
|
|
654
|
+
maxOutput: 8192
|
|
649
655
|
}
|
|
650
656
|
},
|
|
651
657
|
{
|
|
@@ -663,7 +669,7 @@ var deepseek_models_default = {
|
|
|
663
669
|
],
|
|
664
670
|
context: {
|
|
665
671
|
total: 131072,
|
|
666
|
-
maxOutput:
|
|
672
|
+
maxOutput: 8192
|
|
667
673
|
}
|
|
668
674
|
}
|
|
669
675
|
]
|
package/dist/index.mjs
CHANGED
|
@@ -40,7 +40,10 @@ var ModelCollection = class _ModelCollection extends Array {
|
|
|
40
40
|
withMinContext(tokens) {
|
|
41
41
|
return this.filter((model) => {
|
|
42
42
|
const context = model.context;
|
|
43
|
-
|
|
43
|
+
if (!("total" in context) || context.total === null) {
|
|
44
|
+
return false;
|
|
45
|
+
}
|
|
46
|
+
return context.total >= tokens;
|
|
44
47
|
});
|
|
45
48
|
}
|
|
46
49
|
};
|
|
@@ -285,7 +288,7 @@ var anthropic_models_default = {
|
|
|
285
288
|
creator: "anthropic",
|
|
286
289
|
models: [
|
|
287
290
|
{
|
|
288
|
-
id: "claude-3-opus",
|
|
291
|
+
id: "claude-3-opus-20240229",
|
|
289
292
|
name: "Claude 3 Opus",
|
|
290
293
|
license: "proprietary",
|
|
291
294
|
providers: [
|
|
@@ -303,11 +306,12 @@ var anthropic_models_default = {
|
|
|
303
306
|
],
|
|
304
307
|
context: {
|
|
305
308
|
total: 2e5,
|
|
306
|
-
maxOutput: 4096
|
|
309
|
+
maxOutput: 4096,
|
|
310
|
+
outputIsFixed: 1
|
|
307
311
|
}
|
|
308
312
|
},
|
|
309
313
|
{
|
|
310
|
-
id: "claude-3-sonnet",
|
|
314
|
+
id: "claude-3-5-sonnet-20241022",
|
|
311
315
|
name: "Claude 3 Sonnet",
|
|
312
316
|
license: "proprietary",
|
|
313
317
|
providers: [
|
|
@@ -325,11 +329,12 @@ var anthropic_models_default = {
|
|
|
325
329
|
],
|
|
326
330
|
context: {
|
|
327
331
|
total: 2e5,
|
|
328
|
-
maxOutput:
|
|
332
|
+
maxOutput: 8192,
|
|
333
|
+
outputIsFixed: 1
|
|
329
334
|
}
|
|
330
335
|
},
|
|
331
336
|
{
|
|
332
|
-
id: "claude-3-haiku",
|
|
337
|
+
id: "claude-3-5-haiku-20241022",
|
|
333
338
|
name: "Claude 3 Haiku",
|
|
334
339
|
license: "proprietary",
|
|
335
340
|
providers: [
|
|
@@ -347,7 +352,8 @@ var anthropic_models_default = {
|
|
|
347
352
|
],
|
|
348
353
|
context: {
|
|
349
354
|
total: 2e5,
|
|
350
|
-
maxOutput:
|
|
355
|
+
maxOutput: 8192,
|
|
356
|
+
outputIsFixed: 1
|
|
351
357
|
}
|
|
352
358
|
}
|
|
353
359
|
]
|
|
@@ -617,7 +623,7 @@ var deepseek_models_default = {
|
|
|
617
623
|
],
|
|
618
624
|
context: {
|
|
619
625
|
total: 131072,
|
|
620
|
-
maxOutput:
|
|
626
|
+
maxOutput: 8192
|
|
621
627
|
}
|
|
622
628
|
},
|
|
623
629
|
{
|
|
@@ -635,7 +641,7 @@ var deepseek_models_default = {
|
|
|
635
641
|
],
|
|
636
642
|
context: {
|
|
637
643
|
total: 131072,
|
|
638
|
-
maxOutput:
|
|
644
|
+
maxOutput: 8192
|
|
639
645
|
}
|
|
640
646
|
}
|
|
641
647
|
]
|