@botpress/cognitive 0.3.0 → 0.3.2
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/dist/index.cjs +19 -9
- package/dist/index.cjs.map +2 -2
- package/dist/index.d.ts +232 -27
- package/dist/index.mjs +19 -9
- package/dist/index.mjs.map +2 -2
- package/package.json +3 -2
package/dist/index.mjs
CHANGED
|
@@ -605,10 +605,6 @@ var getExtendedClient = (_client) => {
|
|
|
605
605
|
if (typeof client.constructor !== "function" || typeof client.callAction !== "function" || !client.config || typeof client.config !== "object" || !client.config.headers) {
|
|
606
606
|
throw new Error("Client must be a valid instance of a Botpress client (@botpress/client)");
|
|
607
607
|
}
|
|
608
|
-
const botId = client.config.headers["x-bot-id"];
|
|
609
|
-
if (!botId?.length) {
|
|
610
|
-
throw new Error("Client must be instanciated with Bot ID");
|
|
611
|
-
}
|
|
612
608
|
const clone = () => {
|
|
613
609
|
const c = client;
|
|
614
610
|
if (c.clone && typeof c.clone === "function") {
|
|
@@ -618,7 +614,6 @@ var getExtendedClient = (_client) => {
|
|
|
618
614
|
};
|
|
619
615
|
return {
|
|
620
616
|
...client,
|
|
621
|
-
botId,
|
|
622
617
|
axios: client.axiosInstance,
|
|
623
618
|
clone,
|
|
624
619
|
abortable: (signal) => {
|
|
@@ -636,6 +631,21 @@ import axios from "axios";
|
|
|
636
631
|
|
|
637
632
|
// src/cognitive-v2/models.ts
|
|
638
633
|
var models = {
|
|
634
|
+
"openai:gpt-5.2-2025-12-11": {
|
|
635
|
+
id: "openai:gpt-5.2-2025-12-11",
|
|
636
|
+
name: "GPT-5.2",
|
|
637
|
+
description: "GPT-5.2 is the latest frontier-grade model in the GPT-5 series, offering stronger agentic and long context perfomance compared to GPT-5.1. It uses adaptive reasoning to allocate computation dynamically, responding quickly to simple queries while spending more depth on complex tasks.",
|
|
638
|
+
input: {
|
|
639
|
+
maxTokens: 4e5,
|
|
640
|
+
costPer1MTokens: 1.75
|
|
641
|
+
},
|
|
642
|
+
output: {
|
|
643
|
+
maxTokens: 128e3,
|
|
644
|
+
costPer1MTokens: 14
|
|
645
|
+
},
|
|
646
|
+
tags: ["recommended", "reasoning", "general-purpose", "vision"],
|
|
647
|
+
lifecycle: "production"
|
|
648
|
+
},
|
|
639
649
|
"openai:gpt-5.1-2025-11-13": {
|
|
640
650
|
id: "openai:gpt-5.1-2025-11-13",
|
|
641
651
|
name: "GPT-5.1",
|
|
@@ -648,7 +658,7 @@ var models = {
|
|
|
648
658
|
maxTokens: 128e3,
|
|
649
659
|
costPer1MTokens: 10
|
|
650
660
|
},
|
|
651
|
-
tags: ["recommended", "reasoning", "general-purpose"],
|
|
661
|
+
tags: ["recommended", "reasoning", "general-purpose", "vision"],
|
|
652
662
|
lifecycle: "production"
|
|
653
663
|
},
|
|
654
664
|
"openai:gpt-5-2025-08-07": {
|
|
@@ -663,7 +673,7 @@ var models = {
|
|
|
663
673
|
maxTokens: 128e3,
|
|
664
674
|
costPer1MTokens: 10
|
|
665
675
|
},
|
|
666
|
-
tags: ["reasoning", "general-purpose"],
|
|
676
|
+
tags: ["reasoning", "general-purpose", "vision"],
|
|
667
677
|
lifecycle: "production",
|
|
668
678
|
aliases: ["gpt-5"]
|
|
669
679
|
},
|
|
@@ -679,7 +689,7 @@ var models = {
|
|
|
679
689
|
maxTokens: 128e3,
|
|
680
690
|
costPer1MTokens: 2
|
|
681
691
|
},
|
|
682
|
-
tags: ["recommended", "reasoning", "general-purpose"],
|
|
692
|
+
tags: ["recommended", "reasoning", "general-purpose", "vision"],
|
|
683
693
|
lifecycle: "production",
|
|
684
694
|
aliases: ["gpt-5-mini"]
|
|
685
695
|
},
|
|
@@ -695,7 +705,7 @@ var models = {
|
|
|
695
705
|
maxTokens: 128e3,
|
|
696
706
|
costPer1MTokens: 0.4
|
|
697
707
|
},
|
|
698
|
-
tags: ["low-cost", "reasoning", "general-purpose"],
|
|
708
|
+
tags: ["low-cost", "reasoning", "general-purpose", "vision"],
|
|
699
709
|
lifecycle: "production",
|
|
700
710
|
aliases: ["gpt-5-nano"]
|
|
701
711
|
},
|