llmz 0.0.81 → 0.0.82
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.cjs
CHANGED
|
@@ -53,7 +53,7 @@ var _chunkFQ4QCUTIcjs = require('./chunk-FQ4QCUTI.cjs');
|
|
|
53
53
|
var _chunk7XVBJQ53cjs = require('./chunk-7XVBJQ53.cjs');
|
|
54
54
|
|
|
55
55
|
// package.json
|
|
56
|
-
var version = "0.0.
|
|
56
|
+
var version = "0.0.82";
|
|
57
57
|
|
|
58
58
|
// src/objects.ts
|
|
59
59
|
var _zui = require('@bpinternal/zui');
|
|
@@ -1115,11 +1115,11 @@ var utils = {
|
|
|
1115
1115
|
truncateWrappedContent: _chunkTB6TCWEBcjs.truncateWrappedContent
|
|
1116
1116
|
};
|
|
1117
1117
|
var execute = async (props) => {
|
|
1118
|
-
const { executeContext } = await Promise.resolve().then(() => _interopRequireWildcard(require("./llmz-
|
|
1118
|
+
const { executeContext } = await Promise.resolve().then(() => _interopRequireWildcard(require("./llmz-2HD6WKIP.cjs")));
|
|
1119
1119
|
return executeContext(props);
|
|
1120
1120
|
};
|
|
1121
1121
|
var init = async () => {
|
|
1122
|
-
await Promise.resolve().then(() => _interopRequireWildcard(require("./llmz-
|
|
1122
|
+
await Promise.resolve().then(() => _interopRequireWildcard(require("./llmz-2HD6WKIP.cjs")));
|
|
1123
1123
|
await Promise.resolve().then(() => _interopRequireWildcard(require("./component-YMPMWSTU.cjs")));
|
|
1124
1124
|
await Promise.resolve().then(() => _interopRequireWildcard(require("./tool-IWPZD5OY.cjs")));
|
|
1125
1125
|
await Promise.resolve().then(() => _interopRequireWildcard(require("./exit-A34GODDB.cjs")));
|
package/dist/index.js
CHANGED
|
@@ -53,7 +53,7 @@ import {
|
|
|
53
53
|
} from "./chunk-BJMZIH3M.js";
|
|
54
54
|
|
|
55
55
|
// package.json
|
|
56
|
-
var version = "0.0.
|
|
56
|
+
var version = "0.0.82";
|
|
57
57
|
|
|
58
58
|
// src/objects.ts
|
|
59
59
|
import { z } from "@bpinternal/zui";
|
|
@@ -1115,11 +1115,11 @@ var utils = {
|
|
|
1115
1115
|
truncateWrappedContent
|
|
1116
1116
|
};
|
|
1117
1117
|
var execute = async (props) => {
|
|
1118
|
-
const { executeContext } = await import("./llmz-
|
|
1118
|
+
const { executeContext } = await import("./llmz-JTZUIYRP.js");
|
|
1119
1119
|
return executeContext(props);
|
|
1120
1120
|
};
|
|
1121
1121
|
var init = async () => {
|
|
1122
|
-
await import("./llmz-
|
|
1122
|
+
await import("./llmz-JTZUIYRP.js");
|
|
1123
1123
|
await import("./component-GVCCL5XU.js");
|
|
1124
1124
|
await import("./tool-B3DJ3D2F.js");
|
|
1125
1125
|
await import("./exit-J55SREDL.js");
|
|
@@ -45,6 +45,10 @@ var _chunk7XVBJQ53cjs = require('./chunk-7XVBJQ53.cjs');
|
|
|
45
45
|
|
|
46
46
|
// src/llmz.ts
|
|
47
47
|
var _client = require('@botpress/client');
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
48
52
|
var _cognitive = require('@botpress/cognitive');
|
|
49
53
|
var _zui = require('@bpinternal/zui');
|
|
50
54
|
var _ms = require('ms'); var _ms2 = _interopRequireDefault(_ms);
|
|
@@ -107,7 +111,7 @@ var _executeContext = async (props) => {
|
|
|
107
111
|
const controller = createJoinedAbortController([props.signal]);
|
|
108
112
|
const { onIterationStart, onIterationEnd, onTrace, onExit, onBeforeExecution, onAfterTool, onBeforeTool } = props;
|
|
109
113
|
const client = _nullishCoalesce(props.client, () => ( new (0, _client.Client)()));
|
|
110
|
-
const cognitive = _cognitive.Cognitive.isCognitiveClient(client) ? client : new (0, _cognitive.Cognitive)({ client, __experimental_beta: true });
|
|
114
|
+
const cognitive = _cognitive.Cognitive.isCognitiveClient(client) ? client : _cognitive.CognitiveBeta.isBetaClient(client) ? _cognitive.cognitiveFromBeta.call(void 0, client) : new (0, _cognitive.Cognitive)({ client, __experimental_beta: true });
|
|
111
115
|
const cleanups = [];
|
|
112
116
|
const ctx = new (0, _chunkX24YFCFYcjs.Context)({
|
|
113
117
|
chat: props.chat,
|
|
@@ -45,7 +45,11 @@ import {
|
|
|
45
45
|
|
|
46
46
|
// src/llmz.ts
|
|
47
47
|
import { Client } from "@botpress/client";
|
|
48
|
-
import {
|
|
48
|
+
import {
|
|
49
|
+
Cognitive,
|
|
50
|
+
CognitiveBeta,
|
|
51
|
+
cognitiveFromBeta
|
|
52
|
+
} from "@botpress/cognitive";
|
|
49
53
|
import { z } from "@bpinternal/zui";
|
|
50
54
|
import ms from "ms";
|
|
51
55
|
import { ulid } from "ulid";
|
|
@@ -107,7 +111,7 @@ var _executeContext = async (props) => {
|
|
|
107
111
|
const controller = createJoinedAbortController([props.signal]);
|
|
108
112
|
const { onIterationStart, onIterationEnd, onTrace, onExit, onBeforeExecution, onAfterTool, onBeforeTool } = props;
|
|
109
113
|
const client = props.client ?? new Client();
|
|
110
|
-
const cognitive = Cognitive.isCognitiveClient(client) ? client : new Cognitive({ client, __experimental_beta: true });
|
|
114
|
+
const cognitive = Cognitive.isCognitiveClient(client) ? client : CognitiveBeta.isBetaClient(client) ? cognitiveFromBeta(client) : new Cognitive({ client, __experimental_beta: true });
|
|
111
115
|
const cleanups = [];
|
|
112
116
|
const ctx = new Context({
|
|
113
117
|
chat: props.chat,
|
package/dist/llmz.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Cognitive, Models, type BotpressClientLike } from '@botpress/cognitive';
|
|
1
|
+
import { Cognitive, CognitiveBeta, Models, type BotpressClientLike } from '@botpress/cognitive';
|
|
2
2
|
import { Chat } from './chat.js';
|
|
3
3
|
import { Context, Iteration } from './context.js';
|
|
4
4
|
import { Exit, ExitResult } from './exit.js';
|
|
@@ -169,7 +169,7 @@ export type ExecutionProps = {
|
|
|
169
169
|
* This is used to generate content using the LLM and to access the Botpress API.
|
|
170
170
|
* If not provided, a default client will be created using environment variables.
|
|
171
171
|
*/
|
|
172
|
-
client?: Cognitive | BotpressClientLike;
|
|
172
|
+
client?: Cognitive | CognitiveBeta | BotpressClientLike;
|
|
173
173
|
/**
|
|
174
174
|
* When provided, the execution will immediately stop when the signal is aborted.
|
|
175
175
|
* This will stop the LLM generation, as well as kill the VM sandbox execution.
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "llmz",
|
|
3
3
|
"type": "module",
|
|
4
4
|
"description": "LLMz - An LLM-native Typescript VM built on top of Zui",
|
|
5
|
-
"version": "0.0.
|
|
5
|
+
"version": "0.0.82",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
7
7
|
"main": "./dist/index.cjs",
|
|
8
8
|
"module": "./dist/index.js",
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
},
|
|
73
73
|
"peerDependencies": {
|
|
74
74
|
"@botpress/client": "1.46.0",
|
|
75
|
-
"@botpress/cognitive": "0.6.
|
|
75
|
+
"@botpress/cognitive": "0.6.1",
|
|
76
76
|
"@bpinternal/thicktoken": "^2.0.0",
|
|
77
77
|
"@bpinternal/zui": "^2.3.0"
|
|
78
78
|
},
|