@promptbook/remote-server 0.92.0-24 → 0.92.0-25
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 +60 -56
- package/esm/index.es.js.map +1 -1
- package/esm/typings/src/_packages/core.index.d.ts +0 -2
- package/esm/typings/src/commands/_common/types/CommandParser.d.ts +36 -28
- package/esm/typings/src/constants.d.ts +2 -2
- package/esm/typings/src/errors/0-BoilerplateError.d.ts +2 -2
- package/esm/typings/src/execution/CommonToolsOptions.d.ts +3 -3
- package/esm/typings/src/llm-providers/_common/register/$llmToolsMetadataRegister.d.ts +3 -3
- package/esm/typings/src/llm-providers/_common/register/$llmToolsRegister.d.ts +3 -3
- package/esm/typings/src/llm-providers/_common/register/$provideLlmToolsConfigurationFromEnv.d.ts +4 -4
- package/esm/typings/src/llm-providers/_common/utils/cache/CacheItem.d.ts +5 -5
- package/esm/typings/src/llm-providers/_common/utils/cache/CacheLlmToolsOptions.d.ts +5 -3
- package/esm/typings/src/llm-providers/_common/utils/count-total-usage/limitTotalUsage.d.ts +5 -5
- package/esm/typings/src/other/templates/getBookTemplates.d.ts +2 -2
- package/esm/typings/src/pipeline/PipelineInterface/PipelineInterface.d.ts +3 -3
- package/esm/typings/src/pipeline/PipelineInterface/constants.d.ts +1 -1
- package/esm/typings/src/pipeline/PipelineInterface/getPipelineInterface.d.ts +1 -1
- package/esm/typings/src/pipeline/PipelineInterface/isPipelineImplementingInterface.d.ts +5 -4
- package/esm/typings/src/pipeline/PipelineInterface/isPipelineInterfacesEqual.d.ts +1 -1
- package/esm/typings/src/pipeline/PipelineJson/CommonTaskJson.d.ts +9 -6
- package/esm/typings/src/pipeline/PipelineJson/PipelineJson.d.ts +2 -2
- package/esm/typings/src/pipeline/PipelineString.d.ts +3 -1
- package/esm/typings/src/pipeline/book-notation.d.ts +2 -2
- package/esm/typings/src/prepare/prepareTasks.d.ts +7 -4
- package/esm/typings/src/remote-server/types/RemoteServerOptions.d.ts +2 -1
- package/esm/typings/src/scrapers/_boilerplate/BoilerplateScraper.d.ts +3 -3
- package/esm/typings/src/scrapers/_boilerplate/createBoilerplateScraper.d.ts +1 -1
- package/esm/typings/src/scrapers/_boilerplate/register-metadata.d.ts +1 -1
- package/esm/typings/src/scrapers/_common/Converter.d.ts +3 -1
- package/esm/typings/src/scrapers/_common/Scraper.d.ts +4 -3
- package/esm/typings/src/scrapers/_common/ScraperIntermediateSource.d.ts +4 -2
- package/esm/typings/src/scrapers/_common/register/$provideFilesystemForNode.d.ts +2 -1
- package/esm/typings/src/scrapers/_common/register/$provideScrapersForBrowser.d.ts +6 -3
- package/esm/typings/src/scrapers/_common/register/$provideScrapersForNode.d.ts +3 -5
- package/esm/typings/src/scrapers/_common/register/$scrapersRegister.d.ts +3 -2
- package/esm/typings/src/scrapers/_common/register/ScraperAndConverterMetadata.d.ts +8 -5
- package/esm/typings/src/scrapers/_common/register/ScraperConstructor.d.ts +2 -1
- package/esm/typings/src/scrapers/_common/utils/getScraperIntermediateSource.d.ts +6 -5
- package/esm/typings/src/scrapers/_common/utils/makeKnowledgeSourceHandler.d.ts +3 -1
- package/esm/typings/src/scrapers/document/createDocumentScraper.d.ts +1 -1
- package/esm/typings/src/scrapers/document-legacy/createLegacyDocumentScraper.d.ts +2 -1
- package/esm/typings/src/scrapers/markdown/createMarkdownScraper.d.ts +4 -1
- package/esm/typings/src/scrapers/markitdown/MarkitdownScraper.d.ts +1 -1
- package/esm/typings/src/scrapers/pdf/createPdfScraper.d.ts +2 -1
- package/esm/typings/src/scrapers/website/createWebsiteScraper.d.ts +3 -4
- package/esm/typings/src/scripting/javascript/postprocessing-functions.d.ts +5 -1
- package/esm/typings/src/storage/file-cache-storage/FileCacheStorage.d.ts +12 -5
- package/esm/typings/src/storage/file-cache-storage/FileCacheStorageOptions.d.ts +4 -2
- package/esm/typings/src/storage/file-cache-storage/utils/nameToSubfolderPath.d.ts +2 -1
- package/esm/typings/src/storage/local-storage/utils/makePromptbookStorageFromWebStorage.d.ts +2 -1
- package/esm/typings/src/types/IntermediateFilesStrategy.d.ts +2 -1
- package/esm/typings/src/types/ModelVariant.d.ts +5 -5
- package/esm/typings/src/types/typeAliases.d.ts +8 -6
- package/esm/typings/src/utils/editable/edit-pipeline-string/addPipelineCommand.d.ts +2 -2
- package/esm/typings/src/utils/editable/edit-pipeline-string/deflatePipeline.d.ts +4 -1
- package/esm/typings/src/utils/editable/utils/isFlatPipeline.d.ts +2 -1
- package/esm/typings/src/utils/markdown/extractAllListItemsFromMarkdown.d.ts +1 -1
- package/esm/typings/src/utils/normalization/nameToUriPart.d.ts +4 -4
- package/esm/typings/src/utils/normalization/nameToUriParts.d.ts +4 -4
- package/esm/typings/src/utils/normalization/normalize-to-kebab-case.d.ts +3 -3
- package/esm/typings/src/utils/normalization/normalizeTo_SCREAMING_CASE.d.ts +3 -3
- package/esm/typings/src/utils/normalization/normalizeTo_camelCase.d.ts +4 -4
- package/esm/typings/src/utils/normalization/normalizeTo_snake_case.d.ts +3 -3
- package/esm/typings/src/utils/normalization/removeDiacritics.d.ts +3 -3
- package/esm/typings/src/utils/normalization/searchKeywords.d.ts +4 -1
- package/esm/typings/src/utils/normalization/titleToName.d.ts +4 -4
- package/esm/typings/src/utils/organization/empty_object.d.ts +2 -2
- package/esm/typings/src/utils/organization/just_empty_object.d.ts +4 -4
- package/esm/typings/src/version.d.ts +2 -1
- package/package.json +2 -2
- package/umd/index.umd.js +60 -56
- package/umd/index.umd.js.map +1 -1
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
*/
|
|
7
7
|
export type string_snake_case = string;
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
9
|
+
* Normalizes a text string to snake_case format.
|
|
10
10
|
*
|
|
11
|
-
* @param text
|
|
12
|
-
* @returns
|
|
11
|
+
* @param text The text string to be converted to snake_case format.
|
|
12
|
+
* @returns The normalized text in snake_case format.
|
|
13
13
|
* @example 'hello_world'
|
|
14
14
|
* @example 'i_love_promptbook'
|
|
15
15
|
* @public exported from `@promptbook/utils`
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Removes diacritic marks (accents) from characters in a string.
|
|
3
3
|
*
|
|
4
|
-
* @param input
|
|
5
|
-
* @returns
|
|
4
|
+
* @param input The string containing diacritics to be normalized.
|
|
5
|
+
* @returns The string with diacritics removed or normalized.
|
|
6
6
|
* @public exported from `@promptbook/utils`
|
|
7
7
|
*/
|
|
8
8
|
export declare function removeDiacritics(input: string): string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Keywords } from './IKeywords';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* Searches set of keywords for a specific keyword
|
|
4
4
|
*
|
|
5
5
|
* @param haystack
|
|
6
6
|
* @param needle
|
|
@@ -8,3 +8,6 @@ import type { Keywords } from './IKeywords';
|
|
|
8
8
|
* @public exported from `@promptbook/utils`
|
|
9
9
|
*/
|
|
10
10
|
export declare function searchKeywords(haystack: Keywords, needle: Keywords): boolean;
|
|
11
|
+
/**
|
|
12
|
+
* TODO: Rename to `isKeywordInKeywords`
|
|
13
|
+
*/
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Converts a title string into a normalized name.
|
|
3
3
|
*
|
|
4
|
-
* @param value
|
|
5
|
-
* @returns
|
|
6
|
-
* @example
|
|
4
|
+
* @param value The title string to be converted to a name.
|
|
5
|
+
* @returns A normalized name derived from the input title.
|
|
6
|
+
* @example 'Hello World!' -> 'hello-world'
|
|
7
7
|
* @public exported from `@promptbook/utils`
|
|
8
8
|
*/
|
|
9
9
|
export declare function titleToName(value: string): string;
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* Organizational helper to better mark the place where to really use empty object `{}`
|
|
3
3
|
*
|
|
4
4
|
* Note: There are 2 similar types>
|
|
5
|
-
* - `empty_object`
|
|
6
|
-
* - `just_empty_object`
|
|
5
|
+
* - `empty_object` Type used for empty data objects allowing for potential future extensions
|
|
6
|
+
* - `just_empty_object` Type used when an object must remain permanently empty
|
|
7
7
|
*
|
|
8
8
|
* @private within the repository
|
|
9
9
|
*/
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Organizational helper to better
|
|
2
|
+
* Organizational helper to better distinguish different empty object use cases.
|
|
3
3
|
*
|
|
4
|
-
* Note: There are 2 similar types
|
|
5
|
-
* - `empty_object`
|
|
6
|
-
* - `just_empty_object`
|
|
4
|
+
* Note: There are 2 similar types:
|
|
5
|
+
* - `empty_object` Type used for empty data objects with potential extensions
|
|
6
|
+
* - `just_empty_object` Type used specifically for objects that must remain empty
|
|
7
7
|
*
|
|
8
8
|
* Note: In most cases, you should use `empty_object`
|
|
9
9
|
*
|
|
@@ -14,7 +14,8 @@ export declare const BOOK_LANGUAGE_VERSION: string_semantic_version;
|
|
|
14
14
|
*/
|
|
15
15
|
export declare const PROMPTBOOK_ENGINE_VERSION: string_promptbook_version;
|
|
16
16
|
/**
|
|
17
|
-
*
|
|
17
|
+
* Represents the version string of the Promptbook engine.
|
|
18
|
+
* It follows semantic versioning (e.g., `0.92.0-24`).
|
|
18
19
|
*
|
|
19
20
|
* @generated
|
|
20
21
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@promptbook/remote-server",
|
|
3
|
-
"version": "0.92.0-
|
|
3
|
+
"version": "0.92.0-25",
|
|
4
4
|
"description": "It's time for a paradigm shift. The future of software in plain English, French or Latin",
|
|
5
5
|
"private": false,
|
|
6
6
|
"sideEffects": false,
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"module": "./esm/index.es.js",
|
|
52
52
|
"typings": "./esm/typings/src/_packages/remote-server.index.d.ts",
|
|
53
53
|
"peerDependencies": {
|
|
54
|
-
"@promptbook/core": "0.92.0-
|
|
54
|
+
"@promptbook/core": "0.92.0-25"
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
57
|
"colors": "1.4.0",
|
package/umd/index.umd.js
CHANGED
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
* @generated
|
|
49
49
|
* @see https://github.com/webgptorg/promptbook
|
|
50
50
|
*/
|
|
51
|
-
const PROMPTBOOK_ENGINE_VERSION = '0.92.0-
|
|
51
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.92.0-25';
|
|
52
52
|
/**
|
|
53
53
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
54
54
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
@@ -907,7 +907,8 @@
|
|
|
907
907
|
*/
|
|
908
908
|
|
|
909
909
|
/**
|
|
910
|
-
*
|
|
910
|
+
* Provides filesystem access (for example for Node.js-based scrapers)
|
|
911
|
+
* Creates a standardized filesystem interface that scrapers can use for file operations.
|
|
911
912
|
*
|
|
912
913
|
* @public exported from `@promptbook/node`
|
|
913
914
|
*/
|
|
@@ -1379,13 +1380,13 @@
|
|
|
1379
1380
|
*/
|
|
1380
1381
|
const REPLACING_NONCE = 'ptbkauk42kV2dzao34faw7FudQUHYPtW';
|
|
1381
1382
|
/**
|
|
1382
|
-
*
|
|
1383
|
+
* Placeholder value indicating a parameter is missing its value.
|
|
1383
1384
|
*
|
|
1384
1385
|
* @private within the repository
|
|
1385
1386
|
*/
|
|
1386
1387
|
const RESERVED_PARAMETER_MISSING_VALUE = 'MISSING-' + REPLACING_NONCE;
|
|
1387
1388
|
/**
|
|
1388
|
-
*
|
|
1389
|
+
* Placeholder value indicating a parameter is restricted and cannot be used directly.
|
|
1389
1390
|
*
|
|
1390
1391
|
* @private within the repository
|
|
1391
1392
|
*/
|
|
@@ -1816,8 +1817,8 @@
|
|
|
1816
1817
|
* @public exported from `@promptbook/core`
|
|
1817
1818
|
*/
|
|
1818
1819
|
function isPipelinePrepared(pipeline) {
|
|
1819
|
-
// Note: Ignoring `pipeline.preparations`
|
|
1820
|
-
// Note: Ignoring `pipeline.knowledgePieces`
|
|
1820
|
+
// Note: Ignoring `pipeline.preparations`
|
|
1821
|
+
// Note: Ignoring `pipeline.knowledgePieces`
|
|
1821
1822
|
if (pipeline.title === undefined || pipeline.title === '' || pipeline.title === DEFAULT_BOOK_TITLE) {
|
|
1822
1823
|
// TODO: !!! Comment this out
|
|
1823
1824
|
console.log('Pipeline is not prepared because title is undefined or empty', pipeline);
|
|
@@ -3059,10 +3060,10 @@
|
|
|
3059
3060
|
}
|
|
3060
3061
|
|
|
3061
3062
|
/**
|
|
3062
|
-
*
|
|
3063
|
+
* Normalizes a text string to SCREAMING_CASE (all uppercase with underscores).
|
|
3063
3064
|
*
|
|
3064
|
-
* @param text
|
|
3065
|
-
* @returns
|
|
3065
|
+
* @param text The text string to be converted to SCREAMING_CASE format.
|
|
3066
|
+
* @returns The normalized text in SCREAMING_CASE format.
|
|
3066
3067
|
* @example 'HELLO_WORLD'
|
|
3067
3068
|
* @example 'I_LOVE_PROMPTBOOK'
|
|
3068
3069
|
* @public exported from `@promptbook/utils`
|
|
@@ -3114,10 +3115,10 @@
|
|
|
3114
3115
|
*/
|
|
3115
3116
|
|
|
3116
3117
|
/**
|
|
3117
|
-
*
|
|
3118
|
+
* Normalizes a text string to snake_case format.
|
|
3118
3119
|
*
|
|
3119
|
-
* @param text
|
|
3120
|
-
* @returns
|
|
3120
|
+
* @param text The text string to be converted to snake_case format.
|
|
3121
|
+
* @returns The normalized text in snake_case format.
|
|
3121
3122
|
* @example 'hello_world'
|
|
3122
3123
|
* @example 'i_love_promptbook'
|
|
3123
3124
|
* @public exported from `@promptbook/utils`
|
|
@@ -3187,10 +3188,11 @@
|
|
|
3187
3188
|
*/
|
|
3188
3189
|
|
|
3189
3190
|
/**
|
|
3190
|
-
*
|
|
3191
|
+
* Registry for all available scrapers in the system.
|
|
3192
|
+
* Central point for registering and accessing different types of content scrapers.
|
|
3191
3193
|
*
|
|
3192
3194
|
* Note: `$` is used to indicate that this interacts with the global scope
|
|
3193
|
-
* @singleton Only one instance of each register is created per build, but
|
|
3195
|
+
* @singleton Only one instance of each register is created per build, but there can be more than one in different build modules
|
|
3194
3196
|
* @public exported from `@promptbook/core`
|
|
3195
3197
|
*/
|
|
3196
3198
|
const $scrapersRegister = new $Register('scraper_constructors');
|
|
@@ -3530,10 +3532,10 @@
|
|
|
3530
3532
|
*/
|
|
3531
3533
|
|
|
3532
3534
|
/**
|
|
3533
|
-
*
|
|
3535
|
+
* Removes diacritic marks (accents) from characters in a string.
|
|
3534
3536
|
*
|
|
3535
|
-
* @param input
|
|
3536
|
-
* @returns
|
|
3537
|
+
* @param input The string containing diacritics to be normalized.
|
|
3538
|
+
* @returns The string with diacritics removed or normalized.
|
|
3537
3539
|
* @public exported from `@promptbook/utils`
|
|
3538
3540
|
*/
|
|
3539
3541
|
function removeDiacritics(input) {
|
|
@@ -3547,10 +3549,10 @@
|
|
|
3547
3549
|
*/
|
|
3548
3550
|
|
|
3549
3551
|
/**
|
|
3550
|
-
*
|
|
3552
|
+
* Converts a given text to kebab-case format.
|
|
3551
3553
|
*
|
|
3552
|
-
* @param text
|
|
3553
|
-
* @returns
|
|
3554
|
+
* @param text The text to be converted.
|
|
3555
|
+
* @returns The kebab-case formatted string.
|
|
3554
3556
|
* @example 'hello-world'
|
|
3555
3557
|
* @example 'i-love-promptbook'
|
|
3556
3558
|
* @public exported from `@promptbook/utils`
|
|
@@ -3619,7 +3621,8 @@
|
|
|
3619
3621
|
*/
|
|
3620
3622
|
|
|
3621
3623
|
/**
|
|
3622
|
-
*
|
|
3624
|
+
* Converts a name to a properly formatted subfolder path for cache storage.
|
|
3625
|
+
* Handles normalization and path formatting to create consistent cache directory structures.
|
|
3623
3626
|
*
|
|
3624
3627
|
* @private for `FileCacheStorage`
|
|
3625
3628
|
*/
|
|
@@ -3699,11 +3702,11 @@
|
|
|
3699
3702
|
}
|
|
3700
3703
|
|
|
3701
3704
|
/**
|
|
3702
|
-
*
|
|
3705
|
+
* Converts a title string into a normalized name.
|
|
3703
3706
|
*
|
|
3704
|
-
* @param value
|
|
3705
|
-
* @returns
|
|
3706
|
-
* @example
|
|
3707
|
+
* @param value The title string to be converted to a name.
|
|
3708
|
+
* @returns A normalized name derived from the input title.
|
|
3709
|
+
* @example 'Hello World!' -> 'hello-world'
|
|
3707
3710
|
* @public exported from `@promptbook/utils`
|
|
3708
3711
|
*/
|
|
3709
3712
|
function titleToName(value) {
|
|
@@ -3754,7 +3757,9 @@
|
|
|
3754
3757
|
*/
|
|
3755
3758
|
|
|
3756
3759
|
/**
|
|
3757
|
-
*
|
|
3760
|
+
* Factory function that creates a handler for processing knowledge sources.
|
|
3761
|
+
* Provides standardized processing of different types of knowledge sources
|
|
3762
|
+
* across various scraper implementations.
|
|
3758
3763
|
*
|
|
3759
3764
|
* @public exported from `@promptbook/core`
|
|
3760
3765
|
*/
|
|
@@ -3995,9 +4000,12 @@
|
|
|
3995
4000
|
*/
|
|
3996
4001
|
|
|
3997
4002
|
/**
|
|
3998
|
-
*
|
|
4003
|
+
* Prepares tasks by adding knowledge to the prompt and ensuring all necessary parameters are included.
|
|
3999
4004
|
*
|
|
4000
|
-
* @
|
|
4005
|
+
* @param tasks Sequence of tasks that are chained together to form a pipeline
|
|
4006
|
+
* @returns A promise that resolves to the prepared tasks.
|
|
4007
|
+
*
|
|
4008
|
+
* @private internal utility of `preparePipeline`
|
|
4001
4009
|
*/
|
|
4002
4010
|
async function prepareTasks(pipeline, tools, options) {
|
|
4003
4011
|
const { maxParallelCount = DEFAULT_MAX_PARALLEL_COUNT } = options;
|
|
@@ -4760,7 +4768,7 @@
|
|
|
4760
4768
|
else if (!availableParametersNames.has(parameterName) && expectedParameterNames.has(parameterName)) ;
|
|
4761
4769
|
}
|
|
4762
4770
|
if (expectedParameterNames.size === 0) {
|
|
4763
|
-
// Note: [👨👨👧] Now we can freeze `mappedParameters` to prevent
|
|
4771
|
+
// Note: [👨👨👧] Now we can freeze `mappedParameters` to prevent accidental modifications after mapping
|
|
4764
4772
|
Object.freeze(mappedParameters);
|
|
4765
4773
|
return mappedParameters;
|
|
4766
4774
|
}
|
|
@@ -4791,7 +4799,7 @@
|
|
|
4791
4799
|
for (let i = 0; i < expectedParameterNames.size; i++) {
|
|
4792
4800
|
mappedParameters[expectedParameterNamesArray[i]] = availableParameters[availableParametersNamesArray[i]];
|
|
4793
4801
|
}
|
|
4794
|
-
// Note: [👨👨👧] Now we can freeze `mappedParameters` to prevent
|
|
4802
|
+
// Note: [👨👨👧] Now we can freeze `mappedParameters` to prevent accidental modifications after mapping
|
|
4795
4803
|
Object.freeze(mappedParameters);
|
|
4796
4804
|
return mappedParameters;
|
|
4797
4805
|
}
|
|
@@ -5561,11 +5569,10 @@
|
|
|
5561
5569
|
const highLevelError = new PipelineExecutionError(spaceTrim__default["default"]((block) => `
|
|
5562
5570
|
${error.message}
|
|
5563
5571
|
|
|
5564
|
-
This is error in FOREACH command when mapping data
|
|
5572
|
+
This is error in FOREACH command when mapping ${formatDefinition.formatName} ${subvalueParser.subvalueName} data (${index + 1}/${length})
|
|
5565
5573
|
You have probbably passed wrong data to pipeline or wrong data was generated which are processed by FOREACH command
|
|
5566
5574
|
|
|
5567
5575
|
${block(pipelineIdentification)}
|
|
5568
|
-
Subparameter index: ${index}
|
|
5569
5576
|
`));
|
|
5570
5577
|
if (length > BIG_DATASET_TRESHOLD) {
|
|
5571
5578
|
console.error(highLevelError);
|
|
@@ -5593,12 +5600,11 @@
|
|
|
5593
5600
|
catch (error) {
|
|
5594
5601
|
if (length > BIG_DATASET_TRESHOLD) {
|
|
5595
5602
|
console.error(spaceTrim__default["default"]((block) => `
|
|
5596
|
-
|
|
5603
|
+
${error.message}
|
|
5597
5604
|
|
|
5598
|
-
${
|
|
5605
|
+
This is error in FOREACH command when processing ${formatDefinition.formatName} ${subvalueParser.subvalueName} data (${index + 1}/${length})
|
|
5599
5606
|
|
|
5600
5607
|
${block(pipelineIdentification)}
|
|
5601
|
-
Subparameter index: ${index}
|
|
5602
5608
|
`));
|
|
5603
5609
|
return FAILED_VALUE_PLACEHOLDER;
|
|
5604
5610
|
}
|
|
@@ -6271,10 +6277,10 @@
|
|
|
6271
6277
|
}
|
|
6272
6278
|
|
|
6273
6279
|
/**
|
|
6274
|
-
*
|
|
6280
|
+
* Register for LLM tools.
|
|
6275
6281
|
*
|
|
6276
6282
|
* Note: `$` is used to indicate that this interacts with the global scope
|
|
6277
|
-
* @singleton Only one instance of each register is created per build, but
|
|
6283
|
+
* @singleton Only one instance of each register is created per build, but there can be more instances across different builds or environments.
|
|
6278
6284
|
* @public exported from `@promptbook/core`
|
|
6279
6285
|
*/
|
|
6280
6286
|
const $llmToolsRegister = new $Register('llm_execution_tools_constructors');
|
|
@@ -6283,10 +6289,10 @@
|
|
|
6283
6289
|
*/
|
|
6284
6290
|
|
|
6285
6291
|
/**
|
|
6286
|
-
*
|
|
6292
|
+
* Register for LLM tools metadata.
|
|
6287
6293
|
*
|
|
6288
6294
|
* Note: `$` is used to indicate that this interacts with the global scope
|
|
6289
|
-
* @singleton Only one instance of each register is created per build, but
|
|
6295
|
+
* @singleton Only one instance of each register is created per build, but there can be more instances across different builds or environments.
|
|
6290
6296
|
* @public exported from `@promptbook/core`
|
|
6291
6297
|
*/
|
|
6292
6298
|
const $llmToolsMetadataRegister = new $Register('llm_tools_metadata');
|
|
@@ -6470,11 +6476,9 @@
|
|
|
6470
6476
|
*/
|
|
6471
6477
|
|
|
6472
6478
|
/**
|
|
6473
|
-
*
|
|
6474
|
-
*
|
|
6475
|
-
*
|
|
6476
|
-
* 2) @@@
|
|
6477
|
-
*
|
|
6479
|
+
* Provides a collection of scrapers optimized for Node.js environment.
|
|
6480
|
+
* 1) `provideScrapersForNode` use as default
|
|
6481
|
+
* 2) `provideScrapersForBrowser` use in limited browser environment *
|
|
6478
6482
|
* @public exported from `@promptbook/node`
|
|
6479
6483
|
*/
|
|
6480
6484
|
async function $provideScrapersForNode(tools, options) {
|
|
@@ -6499,11 +6503,11 @@
|
|
|
6499
6503
|
*/
|
|
6500
6504
|
|
|
6501
6505
|
/**
|
|
6502
|
-
*
|
|
6506
|
+
* Normalizes a given text to camelCase format.
|
|
6503
6507
|
*
|
|
6504
|
-
* @param text
|
|
6505
|
-
* @param _isFirstLetterCapital
|
|
6506
|
-
* @returns
|
|
6508
|
+
* @param text The text to be normalized.
|
|
6509
|
+
* @param _isFirstLetterCapital Whether the first letter should be capitalized.
|
|
6510
|
+
* @returns The camelCase formatted string.
|
|
6507
6511
|
* @example 'helloWorld'
|
|
6508
6512
|
* @example 'iLovePromptbook'
|
|
6509
6513
|
* @public exported from `@promptbook/utils`
|
|
@@ -6633,11 +6637,11 @@
|
|
|
6633
6637
|
}
|
|
6634
6638
|
|
|
6635
6639
|
/**
|
|
6636
|
-
*
|
|
6640
|
+
* Converts a name string into a URI-compatible format.
|
|
6637
6641
|
*
|
|
6638
|
-
* @param name
|
|
6639
|
-
* @returns
|
|
6640
|
-
* @example
|
|
6642
|
+
* @param name The string to be converted to a URI-compatible format.
|
|
6643
|
+
* @returns A URI-compatible string derived from the input name.
|
|
6644
|
+
* @example 'Hello World' -> 'hello-world'
|
|
6641
6645
|
* @public exported from `@promptbook/utils`
|
|
6642
6646
|
*/
|
|
6643
6647
|
function nameToUriPart(name) {
|
|
@@ -6651,11 +6655,11 @@
|
|
|
6651
6655
|
}
|
|
6652
6656
|
|
|
6653
6657
|
/**
|
|
6654
|
-
*
|
|
6658
|
+
* Converts a given name into URI-compatible parts.
|
|
6655
6659
|
*
|
|
6656
|
-
* @param name
|
|
6657
|
-
* @returns
|
|
6658
|
-
* @example
|
|
6660
|
+
* @param name The name to be converted into URI parts.
|
|
6661
|
+
* @returns An array of URI-compatible parts derived from the name.
|
|
6662
|
+
* @example 'Example Name' -> ['example', 'name']
|
|
6659
6663
|
* @public exported from `@promptbook/utils`
|
|
6660
6664
|
*/
|
|
6661
6665
|
function nameToUriParts(name) {
|