@botpress/cognitive 0.1.46 → 0.1.48
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/.turbo/turbo-build.log +7 -7
- package/build.ts +3 -3
- package/dist/index.cjs +17 -13
- package/dist/index.cjs.map +2 -2
- package/dist/index.d.ts +4 -3
- package/dist/index.mjs +17 -13
- package/dist/index.mjs.map +2 -2
- package/package.json +5 -2
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
|
|
2
|
-
> @botpress/cognitive@0.1.
|
|
2
|
+
> @botpress/cognitive@0.1.48 build /home/runner/work/botpress/botpress/packages/cognitive
|
|
3
3
|
> pnpm build:type && pnpm build:neutral && size-limit
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
> @botpress/cognitive@0.1.
|
|
6
|
+
> @botpress/cognitive@0.1.48 build:type /home/runner/work/botpress/botpress/packages/cognitive
|
|
7
7
|
> tsup --tsconfig tsconfig.build.json ./src/index.ts --dts-resolve --dts-only --clean
|
|
8
8
|
|
|
9
9
|
CLI Building entry: ./src/index.ts
|
|
10
10
|
CLI Using tsconfig: tsconfig.build.json
|
|
11
11
|
CLI tsup v8.0.2
|
|
12
12
|
DTS Build start
|
|
13
|
-
DTS ⚡️ Build success in
|
|
14
|
-
DTS dist/index.d.ts 627.
|
|
13
|
+
DTS ⚡️ Build success in 9558ms
|
|
14
|
+
DTS dist/index.d.ts 627.38 KB
|
|
15
15
|
|
|
16
|
-
> @botpress/cognitive@0.1.
|
|
16
|
+
> @botpress/cognitive@0.1.48 build:neutral /home/runner/work/botpress/botpress/packages/cognitive
|
|
17
17
|
> ts-node -T ./build.ts --neutral
|
|
18
18
|
|
|
19
19
|
Done
|
|
20
20
|
|
|
21
21
|
[1mdist/index.cjs[22m
|
|
22
22
|
Size limit: [32m[1m50 kB[22m[39m
|
|
23
|
-
Size: [32m[1m14.
|
|
23
|
+
Size: [32m[1m14.68 kB[22m[39m [90mbrotlied[39m
|
|
24
24
|
|
|
25
25
|
[1mdist/index.mjs[22m
|
|
26
26
|
Size limit: [32m[1m50 kB[22m[39m
|
|
27
|
-
Size: [32m[1m14.
|
|
27
|
+
Size: [32m[1m14.56 kB[22m[39m [90mbrotlied[39m
|
|
28
28
|
|
package/build.ts
CHANGED
|
@@ -14,11 +14,11 @@ const common: esbuild.BuildOptions = {
|
|
|
14
14
|
|
|
15
15
|
async function generateTypes() {
|
|
16
16
|
const code =
|
|
17
|
-
`export type GenerateContentInput = ${llm.schemas.GenerateContentInputSchema(z.any()).toTypescriptType()};
|
|
17
|
+
`export type GenerateContentInput = ${llm.schemas.GenerateContentInputSchema(z.any()).toTypescriptType({ treatDefaultAsOptional: true })};
|
|
18
18
|
|
|
19
|
-
export type GenerateContentOutput = ${llm.schemas.GenerateContentOutputSchema.toTypescriptType()};
|
|
19
|
+
export type GenerateContentOutput = ${llm.schemas.GenerateContentOutputSchema.toTypescriptType({ treatDefaultAsOptional: true })};
|
|
20
20
|
|
|
21
|
-
export type Model = ${llm.schemas.ModelSchema.toTypescriptType()};
|
|
21
|
+
export type Model = ${llm.schemas.ModelSchema.toTypescriptType({ treatDefaultAsOptional: true })};
|
|
22
22
|
`.trim()
|
|
23
23
|
|
|
24
24
|
const filePath = './src/schemas.gen.ts'
|
package/dist/index.cjs
CHANGED
|
@@ -919,8 +919,8 @@ var models = {
|
|
|
919
919
|
tags: ["deprecated", "general-purpose", "low-cost"],
|
|
920
920
|
lifecycle: "deprecated"
|
|
921
921
|
},
|
|
922
|
-
"anthropic:claude-sonnet-4-5-
|
|
923
|
-
id: "anthropic:claude-sonnet-4-5-
|
|
922
|
+
"anthropic:claude-sonnet-4-5-20250929": {
|
|
923
|
+
id: "anthropic:claude-sonnet-4-5-20250929",
|
|
924
924
|
name: "Claude Sonnet 4.5",
|
|
925
925
|
description: "Claude Sonnet 4.5 is Anthropic's most advanced Sonnet model to date, optimized for real-world agents and coding workflows. It delivers state-of-the-art performance on coding benchmarks, with improvements across system design, code security, and specification adherence.",
|
|
926
926
|
input: {
|
|
@@ -1087,8 +1087,8 @@ var models = {
|
|
|
1087
1087
|
tags: ["recommended", "reasoning", "agents", "general-purpose", "vision", "coding"],
|
|
1088
1088
|
lifecycle: "live"
|
|
1089
1089
|
},
|
|
1090
|
-
"google-ai:
|
|
1091
|
-
id: "google-ai:
|
|
1090
|
+
"google-ai:gemini-2.0-flash": {
|
|
1091
|
+
id: "google-ai:gemini-2.0-flash",
|
|
1092
1092
|
name: "Gemini 2.0 Flash",
|
|
1093
1093
|
description: "Next-gen Gemini model with improved capabilities, superior speed, native tool use, multimodal generation, and 1M token context window.",
|
|
1094
1094
|
input: {
|
|
@@ -1100,7 +1100,8 @@ var models = {
|
|
|
1100
1100
|
costPer1MTokens: 0.4
|
|
1101
1101
|
},
|
|
1102
1102
|
tags: ["low-cost", "general-purpose", "vision"],
|
|
1103
|
-
lifecycle: "live"
|
|
1103
|
+
lifecycle: "live",
|
|
1104
|
+
aliases: ["models/gemini-2.0-flash"]
|
|
1104
1105
|
},
|
|
1105
1106
|
"cerebras:gpt-oss-120b": {
|
|
1106
1107
|
id: "cerebras:gpt-oss-120b",
|
|
@@ -1589,7 +1590,7 @@ var models = {
|
|
|
1589
1590
|
costPer1MTokens: 8
|
|
1590
1591
|
},
|
|
1591
1592
|
tags: ["reasoning", "general-purpose", "coding"],
|
|
1592
|
-
lifecycle: "
|
|
1593
|
+
lifecycle: "discontinued",
|
|
1593
1594
|
aliases: ["accounts/fireworks/models/deepseek-r1"]
|
|
1594
1595
|
},
|
|
1595
1596
|
"fireworks-ai:deepseek-r1-basic": {
|
|
@@ -1605,7 +1606,7 @@ var models = {
|
|
|
1605
1606
|
costPer1MTokens: 2.19
|
|
1606
1607
|
},
|
|
1607
1608
|
tags: ["reasoning", "general-purpose", "coding"],
|
|
1608
|
-
lifecycle: "
|
|
1609
|
+
lifecycle: "discontinued",
|
|
1609
1610
|
aliases: ["accounts/fireworks/models/deepseek-r1-basic"]
|
|
1610
1611
|
},
|
|
1611
1612
|
"fireworks-ai:deepseek-v3": {
|
|
@@ -1621,7 +1622,7 @@ var models = {
|
|
|
1621
1622
|
costPer1MTokens: 0.9
|
|
1622
1623
|
},
|
|
1623
1624
|
tags: ["deprecated", "general-purpose"],
|
|
1624
|
-
lifecycle: "
|
|
1625
|
+
lifecycle: "discontinued",
|
|
1625
1626
|
aliases: ["accounts/fireworks/models/deepseek-v3"]
|
|
1626
1627
|
},
|
|
1627
1628
|
"fireworks-ai:llama-v3p1-405b-instruct": {
|
|
@@ -1637,7 +1638,7 @@ var models = {
|
|
|
1637
1638
|
costPer1MTokens: 3
|
|
1638
1639
|
},
|
|
1639
1640
|
tags: ["deprecated", "general-purpose"],
|
|
1640
|
-
lifecycle: "
|
|
1641
|
+
lifecycle: "discontinued",
|
|
1641
1642
|
aliases: ["accounts/fireworks/models/llama-v3p1-405b-instruct"]
|
|
1642
1643
|
},
|
|
1643
1644
|
"fireworks-ai:llama-v3p1-70b-instruct": {
|
|
@@ -1653,7 +1654,7 @@ var models = {
|
|
|
1653
1654
|
costPer1MTokens: 0.9
|
|
1654
1655
|
},
|
|
1655
1656
|
tags: ["deprecated", "general-purpose"],
|
|
1656
|
-
lifecycle: "
|
|
1657
|
+
lifecycle: "discontinued",
|
|
1657
1658
|
aliases: ["accounts/fireworks/models/llama-v3p1-70b-instruct"]
|
|
1658
1659
|
},
|
|
1659
1660
|
"fireworks-ai:llama-v3p1-8b-instruct": {
|
|
@@ -1685,7 +1686,7 @@ var models = {
|
|
|
1685
1686
|
costPer1MTokens: 1.2
|
|
1686
1687
|
},
|
|
1687
1688
|
tags: ["deprecated", "general-purpose"],
|
|
1688
|
-
lifecycle: "
|
|
1689
|
+
lifecycle: "discontinued",
|
|
1689
1690
|
aliases: ["accounts/fireworks/models/mixtral-8x22b-instruct"]
|
|
1690
1691
|
},
|
|
1691
1692
|
"fireworks-ai:mixtral-8x7b-instruct": {
|
|
@@ -1733,7 +1734,7 @@ var models = {
|
|
|
1733
1734
|
costPer1MTokens: 0.2
|
|
1734
1735
|
},
|
|
1735
1736
|
tags: ["deprecated", "low-cost", "general-purpose"],
|
|
1736
|
-
lifecycle: "
|
|
1737
|
+
lifecycle: "discontinued",
|
|
1737
1738
|
aliases: ["accounts/fireworks/models/gemma2-9b-it"]
|
|
1738
1739
|
}
|
|
1739
1740
|
};
|
|
@@ -1920,7 +1921,10 @@ var getCognitiveV2Model = (model) => {
|
|
|
1920
1921
|
if (models[model]) {
|
|
1921
1922
|
return models[model];
|
|
1922
1923
|
}
|
|
1923
|
-
const
|
|
1924
|
+
const [_provider, baseModel] = model.split(":");
|
|
1925
|
+
const alias = Object.values(models).find(
|
|
1926
|
+
(x) => x.aliases ? x.aliases.includes(model) || baseModel && x.aliases.includes(baseModel) : false
|
|
1927
|
+
);
|
|
1924
1928
|
if (alias) {
|
|
1925
1929
|
return alias;
|
|
1926
1930
|
}
|