@promptbook/node 0.98.0-9 → 0.99.0-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.
- package/esm/index.es.js +43 -42
- package/esm/index.es.js.map +1 -1
- package/esm/typings/src/config.d.ts +10 -0
- package/esm/typings/src/remote-server/connection-improvements.test.d.ts +1 -0
- package/esm/typings/src/remote-server/utils/connectionProgress.d.ts +72 -0
- package/esm/typings/src/version.d.ts +1 -1
- package/package.json +59 -40
- package/umd/index.umd.js +43 -42
- package/umd/index.umd.js.map +1 -1
package/esm/index.es.js
CHANGED
|
@@ -30,7 +30,7 @@ const BOOK_LANGUAGE_VERSION = '1.0.0';
|
|
|
30
30
|
* @generated
|
|
31
31
|
* @see https://github.com/webgptorg/promptbook
|
|
32
32
|
*/
|
|
33
|
-
const PROMPTBOOK_ENGINE_VERSION = '0.
|
|
33
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.99.0-0';
|
|
34
34
|
/**
|
|
35
35
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
36
36
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
@@ -10178,6 +10178,46 @@ async function $provideLlmToolsConfigurationFromEnv() {
|
|
|
10178
10178
|
* Note: [🟢] Code in this file should never be never released in packages that could be imported into browser environment
|
|
10179
10179
|
*/
|
|
10180
10180
|
|
|
10181
|
+
/**
|
|
10182
|
+
* Detects if the code is running in a browser environment in main thread (Not in a web worker)
|
|
10183
|
+
*
|
|
10184
|
+
* Note: `$` is used to indicate that this function is not a pure function - it looks at the global object to determine the environment
|
|
10185
|
+
*
|
|
10186
|
+
* @public exported from `@promptbook/utils`
|
|
10187
|
+
*/
|
|
10188
|
+
const $isRunningInBrowser = new Function(`
|
|
10189
|
+
try {
|
|
10190
|
+
return this === window;
|
|
10191
|
+
} catch (e) {
|
|
10192
|
+
return false;
|
|
10193
|
+
}
|
|
10194
|
+
`);
|
|
10195
|
+
/**
|
|
10196
|
+
* TODO: [🎺]
|
|
10197
|
+
*/
|
|
10198
|
+
|
|
10199
|
+
/**
|
|
10200
|
+
* Detects if the code is running in a web worker
|
|
10201
|
+
*
|
|
10202
|
+
* Note: `$` is used to indicate that this function is not a pure function - it looks at the global object to determine the environment
|
|
10203
|
+
*
|
|
10204
|
+
* @public exported from `@promptbook/utils`
|
|
10205
|
+
*/
|
|
10206
|
+
const $isRunningInWebWorker = new Function(`
|
|
10207
|
+
try {
|
|
10208
|
+
if (typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope) {
|
|
10209
|
+
return true;
|
|
10210
|
+
} else {
|
|
10211
|
+
return false;
|
|
10212
|
+
}
|
|
10213
|
+
} catch (e) {
|
|
10214
|
+
return false;
|
|
10215
|
+
}
|
|
10216
|
+
`);
|
|
10217
|
+
/**
|
|
10218
|
+
* TODO: [🎺]
|
|
10219
|
+
*/
|
|
10220
|
+
|
|
10181
10221
|
/**
|
|
10182
10222
|
* Creates LLM execution tools from provided configuration objects
|
|
10183
10223
|
*
|
|
@@ -10198,9 +10238,10 @@ function createLlmToolsFromConfiguration(configuration, options = {}) {
|
|
|
10198
10238
|
.list()
|
|
10199
10239
|
.find(({ packageName, className }) => llmConfiguration.packageName === packageName && llmConfiguration.className === className);
|
|
10200
10240
|
if (registeredItem === undefined) {
|
|
10201
|
-
console.log('
|
|
10241
|
+
// console.log('$llmToolsRegister.list()', $llmToolsRegister.list());
|
|
10202
10242
|
throw new Error(spaceTrim((block) => `
|
|
10203
10243
|
There is no constructor for LLM provider \`${llmConfiguration.className}\` from \`${llmConfiguration.packageName}\`
|
|
10244
|
+
Running in ${!$isRunningInBrowser() ? '' : 'browser environment'}${!$isRunningInNode() ? '' : 'node environment'}${!$isRunningInWebWorker() ? '' : 'worker environment'}
|
|
10204
10245
|
|
|
10205
10246
|
You have probably forgotten install and import the provider package.
|
|
10206
10247
|
To fix this issue, you can:
|
|
@@ -10327,24 +10368,6 @@ async function $provideScrapersForNode(tools, options) {
|
|
|
10327
10368
|
* Note: [🟢] Code in this file should never be never released in packages that could be imported into browser environment
|
|
10328
10369
|
*/
|
|
10329
10370
|
|
|
10330
|
-
/**
|
|
10331
|
-
* Detects if the code is running in a browser environment in main thread (Not in a web worker)
|
|
10332
|
-
*
|
|
10333
|
-
* Note: `$` is used to indicate that this function is not a pure function - it looks at the global object to determine the environment
|
|
10334
|
-
*
|
|
10335
|
-
* @public exported from `@promptbook/utils`
|
|
10336
|
-
*/
|
|
10337
|
-
new Function(`
|
|
10338
|
-
try {
|
|
10339
|
-
return this === window;
|
|
10340
|
-
} catch (e) {
|
|
10341
|
-
return false;
|
|
10342
|
-
}
|
|
10343
|
-
`);
|
|
10344
|
-
/**
|
|
10345
|
-
* TODO: [🎺]
|
|
10346
|
-
*/
|
|
10347
|
-
|
|
10348
10371
|
/**
|
|
10349
10372
|
* Detects if the code is running in jest environment
|
|
10350
10373
|
*
|
|
@@ -10363,28 +10386,6 @@ new Function(`
|
|
|
10363
10386
|
* TODO: [🎺]
|
|
10364
10387
|
*/
|
|
10365
10388
|
|
|
10366
|
-
/**
|
|
10367
|
-
* Detects if the code is running in a web worker
|
|
10368
|
-
*
|
|
10369
|
-
* Note: `$` is used to indicate that this function is not a pure function - it looks at the global object to determine the environment
|
|
10370
|
-
*
|
|
10371
|
-
* @public exported from `@promptbook/utils`
|
|
10372
|
-
*/
|
|
10373
|
-
new Function(`
|
|
10374
|
-
try {
|
|
10375
|
-
if (typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope) {
|
|
10376
|
-
return true;
|
|
10377
|
-
} else {
|
|
10378
|
-
return false;
|
|
10379
|
-
}
|
|
10380
|
-
} catch (e) {
|
|
10381
|
-
return false;
|
|
10382
|
-
}
|
|
10383
|
-
`);
|
|
10384
|
-
/**
|
|
10385
|
-
* TODO: [🎺]
|
|
10386
|
-
*/
|
|
10387
|
-
|
|
10388
10389
|
/**
|
|
10389
10390
|
* Makes first letter of a string uppercase
|
|
10390
10391
|
*
|