@promptbook/fake-llm 0.92.0-9 → 0.93.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/README.md +140 -88
- package/esm/index.es.js +54 -50
- package/esm/index.es.js.map +1 -1
- package/esm/typings/src/_packages/browser.index.d.ts +2 -0
- package/esm/typings/src/_packages/core.index.d.ts +26 -14
- package/esm/typings/src/_packages/types.index.d.ts +6 -2
- package/esm/typings/src/collection/PipelineCollection.d.ts +0 -2
- package/esm/typings/src/collection/SimplePipelineCollection.d.ts +1 -1
- package/esm/typings/src/commands/FOREACH/ForeachJson.d.ts +6 -6
- package/esm/typings/src/commands/FOREACH/foreachCommandParser.d.ts +0 -2
- package/esm/typings/src/commands/FORMFACTOR/formfactorCommandParser.d.ts +1 -1
- package/esm/typings/src/commands/_BOILERPLATE/boilerplateCommandParser.d.ts +1 -1
- package/esm/typings/src/commands/_common/types/CommandParser.d.ts +36 -28
- package/esm/typings/src/config.d.ts +41 -11
- package/esm/typings/src/constants.d.ts +43 -2
- package/esm/typings/src/conversion/parsePipeline.d.ts +2 -2
- package/esm/typings/src/errors/0-BoilerplateError.d.ts +2 -2
- package/esm/typings/src/errors/CollectionError.d.ts +1 -1
- package/esm/typings/src/executables/$provideExecutablesForNode.d.ts +1 -1
- package/esm/typings/src/executables/apps/locateLibreoffice.d.ts +2 -1
- package/esm/typings/src/executables/apps/locatePandoc.d.ts +2 -1
- package/esm/typings/src/executables/locateApp.d.ts +2 -2
- package/esm/typings/src/executables/platforms/locateAppOnLinux.d.ts +2 -1
- package/esm/typings/src/executables/platforms/locateAppOnMacOs.d.ts +2 -1
- package/esm/typings/src/executables/platforms/locateAppOnWindows.d.ts +2 -1
- package/esm/typings/src/execution/AbstractTaskResult.d.ts +1 -1
- package/esm/typings/src/execution/CommonToolsOptions.d.ts +3 -3
- package/esm/typings/src/execution/ExecutionTask.d.ts +19 -1
- package/esm/typings/src/execution/LlmExecutionToolsConstructor.d.ts +2 -1
- package/esm/typings/src/execution/PipelineExecutorResult.d.ts +4 -2
- package/esm/typings/src/execution/PromptbookFetch.d.ts +1 -1
- package/esm/typings/src/execution/ScriptExecutionTools.d.ts +1 -1
- package/esm/typings/src/execution/createPipelineExecutor/$OngoingTaskResult.d.ts +12 -9
- package/esm/typings/src/execution/createPipelineExecutor/10-executePipeline.d.ts +13 -10
- package/esm/typings/src/execution/createPipelineExecutor/20-executeTask.d.ts +12 -9
- package/esm/typings/src/execution/createPipelineExecutor/30-executeFormatSubvalues.d.ts +15 -3
- package/esm/typings/src/execution/createPipelineExecutor/40-executeAttempts.d.ts +21 -15
- package/esm/typings/src/execution/createPipelineExecutor/computeCosineSimilarity.d.ts +13 -0
- package/esm/typings/src/execution/createPipelineExecutor/filterJustOutputParameters.d.ts +7 -6
- package/esm/typings/src/execution/createPipelineExecutor/getContextForTask.d.ts +5 -1
- package/esm/typings/src/execution/createPipelineExecutor/getExamplesForTask.d.ts +1 -1
- package/esm/typings/src/execution/createPipelineExecutor/getKnowledgeForTask.d.ts +12 -9
- package/esm/typings/src/execution/createPipelineExecutor/getReservedParametersForTask.d.ts +18 -5
- package/esm/typings/src/execution/createPipelineExecutor/knowledgePiecesToString.d.ts +9 -0
- package/esm/typings/src/execution/execution-report/ExecutionReportJson.d.ts +1 -1
- package/esm/typings/src/execution/execution-report/ExecutionReportString.d.ts +1 -1
- package/esm/typings/src/execution/translation/automatic-translate/automatic-translators/LindatAutomaticTranslator.d.ts +4 -4
- package/esm/typings/src/execution/utils/checkExpectations.d.ts +3 -3
- package/esm/typings/src/execution/utils/uncertainNumber.d.ts +3 -2
- package/esm/typings/src/execution/utils/usageToWorktime.d.ts +1 -1
- package/esm/typings/src/formats/_common/{FormatDefinition.d.ts → FormatParser.d.ts} +8 -6
- package/esm/typings/src/formats/_common/FormatSubvalueParser.d.ts +66 -0
- package/esm/typings/src/formats/csv/CsvFormatParser.d.ts +17 -0
- package/esm/typings/src/formats/csv/CsvSettings.d.ts +2 -2
- package/esm/typings/src/formats/csv/utils/csvParse.d.ts +12 -0
- package/esm/typings/src/formats/csv/utils/isValidCsvString.d.ts +1 -1
- package/esm/typings/src/formats/index.d.ts +2 -2
- package/esm/typings/src/formats/json/JsonFormatParser.d.ts +19 -0
- package/esm/typings/src/formats/json/utils/isValidJsonString.d.ts +1 -1
- package/esm/typings/src/formats/json/utils/jsonParse.d.ts +0 -3
- package/esm/typings/src/formats/text/{TextFormatDefinition.d.ts → TextFormatParser.d.ts} +7 -7
- package/esm/typings/src/formats/xml/XmlFormatParser.d.ts +19 -0
- package/esm/typings/src/formats/xml/utils/isValidXmlString.d.ts +1 -1
- package/esm/typings/src/formfactors/_boilerplate/BoilerplateFormfactorDefinition.d.ts +3 -2
- package/esm/typings/src/formfactors/_common/AbstractFormfactorDefinition.d.ts +16 -7
- package/esm/typings/src/formfactors/_common/FormfactorDefinition.d.ts +3 -1
- package/esm/typings/src/formfactors/_common/string_formfactor_name.d.ts +2 -1
- package/esm/typings/src/formfactors/chatbot/ChatbotFormfactorDefinition.d.ts +2 -2
- package/esm/typings/src/formfactors/completion/CompletionFormfactorDefinition.d.ts +29 -0
- package/esm/typings/src/formfactors/generator/GeneratorFormfactorDefinition.d.ts +2 -1
- package/esm/typings/src/formfactors/generic/GenericFormfactorDefinition.d.ts +2 -2
- package/esm/typings/src/formfactors/index.d.ts +33 -8
- package/esm/typings/src/formfactors/matcher/MatcherFormfactorDefinition.d.ts +4 -2
- package/esm/typings/src/formfactors/sheets/SheetsFormfactorDefinition.d.ts +3 -2
- package/esm/typings/src/formfactors/translator/TranslatorFormfactorDefinition.d.ts +3 -2
- package/esm/typings/src/high-level-abstractions/index.d.ts +2 -2
- 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/register/$provideLlmToolsForTestingAndScriptsAndPlayground.d.ts +4 -3
- package/esm/typings/src/llm-providers/_common/register/$provideLlmToolsFromEnv.d.ts +18 -5
- package/esm/typings/src/llm-providers/_common/register/LlmToolsConfiguration.d.ts +11 -4
- package/esm/typings/src/llm-providers/_common/register/LlmToolsMetadata.d.ts +21 -42
- package/esm/typings/src/llm-providers/_common/register/LlmToolsOptions.d.ts +9 -2
- package/esm/typings/src/llm-providers/_common/register/createLlmToolsFromConfiguration.d.ts +13 -4
- package/esm/typings/src/llm-providers/_common/utils/cache/CacheItem.d.ts +10 -5
- package/esm/typings/src/llm-providers/_common/utils/cache/CacheLlmToolsOptions.d.ts +11 -3
- package/esm/typings/src/llm-providers/_common/utils/cache/cacheLlmTools.d.ts +3 -3
- package/esm/typings/src/llm-providers/_common/utils/count-total-usage/limitTotalUsage.d.ts +5 -5
- package/esm/typings/src/llm-providers/anthropic-claude/AnthropicClaudeExecutionTools.d.ts +6 -0
- package/esm/typings/src/llm-providers/anthropic-claude/anthropic-claude-models.d.ts +1 -1
- package/esm/typings/src/llm-providers/azure-openai/AzureOpenAiExecutionTools.d.ts +1 -1
- package/esm/typings/src/llm-providers/azure-openai/AzureOpenAiExecutionToolsOptions.d.ts +4 -4
- package/esm/typings/src/llm-providers/deepseek/deepseek-models.d.ts +1 -1
- package/esm/typings/src/llm-providers/google/google-models.d.ts +1 -1
- package/esm/typings/src/llm-providers/openai/OpenAiAssistantExecutionTools.d.ts +1 -1
- package/esm/typings/src/llm-providers/openai/openai-models.d.ts +1 -1
- package/esm/typings/src/llm-providers/openai/register-configuration.d.ts +2 -2
- package/esm/typings/src/llm-providers/openai/register-constructor.d.ts +2 -2
- package/esm/typings/src/migrations/migratePipeline.d.ts +9 -0
- 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 +10 -7
- package/esm/typings/src/pipeline/PipelineJson/ParameterJson.d.ts +1 -1
- package/esm/typings/src/pipeline/PipelineJson/PipelineJson.d.ts +3 -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/postprocessing/utils/extractBlock.d.ts +1 -1
- package/esm/typings/src/postprocessing/utils/extractJsonBlock.d.ts +2 -2
- package/esm/typings/src/prepare/prepareTasks.d.ts +8 -5
- package/esm/typings/src/remote-server/openapi.d.ts +1 -1
- package/esm/typings/src/remote-server/socket-types/listModels/PromptbookServer_ListModels_Response.d.ts +1 -1
- package/esm/typings/src/remote-server/startRemoteServer.d.ts +1 -1
- package/esm/typings/src/remote-server/types/RemoteServerOptions.d.ts +7 -6
- 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/prepareKnowledgePieces.d.ts +2 -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/$scrapersMetadataRegister.d.ts +3 -3
- 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/JavascriptExecutionTools.d.ts +1 -1
- package/esm/typings/src/scripting/javascript/postprocessing-functions.d.ts +5 -1
- package/esm/typings/src/scripting/javascript/utils/preserve.d.ts +1 -1
- package/esm/typings/src/storage/_common/PromptbookStorage.d.ts +1 -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/getIndexedDbStorage.d.ts +11 -0
- package/esm/typings/src/storage/local-storage/utils/IndexedDbStorageOptions.d.ts +14 -0
- package/esm/typings/src/storage/local-storage/utils/makePromptbookStorageFromIndexedDb.d.ts +8 -0
- 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/ModelRequirements.d.ts +2 -2
- package/esm/typings/src/types/ModelVariant.d.ts +5 -5
- package/esm/typings/src/types/typeAliases.d.ts +22 -19
- package/esm/typings/src/utils/$Register.d.ts +8 -7
- 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/editable/utils/stringifyPipelineJson.d.ts +1 -1
- package/esm/typings/src/utils/environment/$getGlobalScope.d.ts +2 -1
- package/esm/typings/src/utils/expectation-counters/index.d.ts +1 -1
- package/esm/typings/src/utils/markdown/extractAllBlocksFromMarkdown.d.ts +2 -2
- package/esm/typings/src/utils/markdown/extractAllListItemsFromMarkdown.d.ts +1 -1
- package/esm/typings/src/utils/markdown/extractOneBlockFromMarkdown.d.ts +2 -2
- 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/TODO_USE.d.ts +1 -1
- package/esm/typings/src/utils/organization/empty_object.d.ts +2 -2
- package/esm/typings/src/utils/organization/just.d.ts +1 -1
- package/esm/typings/src/utils/organization/just_empty_object.d.ts +4 -4
- package/esm/typings/src/utils/organization/keepUnused.d.ts +1 -1
- package/esm/typings/src/utils/parameters/mapAvailableToExpectedParameters.d.ts +7 -7
- package/esm/typings/src/utils/removeQuotes.d.ts +2 -2
- package/esm/typings/src/utils/serialization/clonePipeline.d.ts +4 -3
- package/esm/typings/src/utils/serialization/deepClone.d.ts +5 -1
- package/esm/typings/src/utils/trimCodeBlock.d.ts +1 -1
- package/esm/typings/src/utils/trimEndOfCodeBlock.d.ts +1 -1
- package/esm/typings/src/utils/unwrapResult.d.ts +2 -2
- package/esm/typings/src/utils/validators/javascriptName/isValidJavascriptName.d.ts +3 -3
- package/esm/typings/src/utils/validators/parameterName/validateParameterName.d.ts +5 -4
- package/esm/typings/src/utils/validators/semanticVersion/isValidPromptbookVersion.d.ts +1 -1
- package/esm/typings/src/utils/validators/semanticVersion/isValidSemanticVersion.d.ts +1 -1
- package/esm/typings/src/utils/validators/url/isHostnameOnPrivateNetwork.d.ts +1 -1
- package/esm/typings/src/utils/validators/url/isUrlOnPrivateNetwork.d.ts +1 -1
- package/esm/typings/src/utils/validators/url/isValidPipelineUrl.d.ts +1 -1
- package/esm/typings/src/utils/validators/url/isValidUrl.d.ts +1 -1
- package/esm/typings/src/version.d.ts +2 -1
- package/esm/typings/src/wizzard/wizzard.d.ts +1 -1
- package/package.json +15 -3
- package/umd/index.umd.js +54 -50
- package/umd/index.umd.js.map +1 -1
- package/esm/typings/src/formats/_common/FormatSubvalueDefinition.d.ts +0 -31
- package/esm/typings/src/formats/csv/CsvFormatDefinition.d.ts +0 -17
- package/esm/typings/src/formats/json/JsonFormatDefinition.d.ts +0 -19
- package/esm/typings/src/formats/xml/XmlFormatDefinition.d.ts +0 -19
- /package/esm/typings/src/llm-providers/{multiple → _multiple}/MultipleLlmExecutionTools.d.ts +0 -0
- /package/esm/typings/src/llm-providers/{multiple → _multiple}/joinLlmExecutionTools.d.ts +0 -0
- /package/esm/typings/src/llm-providers/{multiple → _multiple}/playground/playground.d.ts +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Removes quotes from a string
|
|
3
3
|
*
|
|
4
|
-
* Tip: This is very
|
|
4
|
+
* Tip: This is very useful for post-processing of the result of the LLM model
|
|
5
5
|
* Note: This function removes only the same quotes from the beginning and the end of the string
|
|
6
|
-
* Note: There are two
|
|
6
|
+
* Note: There are two similar functions:
|
|
7
7
|
* - `removeQuotes` which removes only bounding quotes
|
|
8
8
|
* - `unwrapResult` which removes whole introduce sentence
|
|
9
9
|
*
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import type { PipelineJson } from '../../pipeline/PipelineJson/PipelineJson';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* Creates a deep clone of a PipelineJson object, copying all properties explicitly.
|
|
4
4
|
*
|
|
5
|
-
* Note: It is
|
|
5
|
+
* Note: It is useful for ensuring that modifications to the returned pipeline do not affect the original.
|
|
6
6
|
*
|
|
7
|
-
* @param pipeline
|
|
7
|
+
* @param pipeline The pipeline to clone.
|
|
8
|
+
* @returns A new PipelineJson object with the same properties as the input.
|
|
8
9
|
* @public exported from `@promptbook/utils`
|
|
9
10
|
*/
|
|
10
11
|
export declare function clonePipeline(pipeline: PipelineJson): PipelineJson;
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import type { WritableDeep } from 'type-fest';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* Creates a deep clone of the given object
|
|
4
4
|
*
|
|
5
|
+
* Note: This method only works for objects that are fully serializable to JSON and do not contain functions, Dates, or special types.
|
|
6
|
+
*
|
|
7
|
+
* @param objectValue The object to clone.
|
|
8
|
+
* @returns A deep, writable clone of the input object.
|
|
5
9
|
* @public exported from `@promptbook/utils`
|
|
6
10
|
*/
|
|
7
11
|
export declare function deepClone<TObject>(objectValue: TObject): WritableDeep<TObject>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Function trimCodeBlock will trim starting and ending code block from the string if it is present.
|
|
3
3
|
*
|
|
4
|
-
* Note: This is
|
|
4
|
+
* Note: This is useful for post-processing of the result of the chat LLM model
|
|
5
5
|
* when the model wraps the result in the (markdown) code block.
|
|
6
6
|
*
|
|
7
7
|
* @public exported from `@promptbook/utils`
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Function trimEndOfCodeBlock will remove ending code block from the string if it is present.
|
|
3
3
|
*
|
|
4
|
-
* Note: This is
|
|
4
|
+
* Note: This is useful for post-processing of the result of the completion LLM model
|
|
5
5
|
* if you want to start code block in the prompt but you don't want to end it in the result.
|
|
6
6
|
*
|
|
7
7
|
* @public exported from `@promptbook/utils`
|
|
@@ -20,9 +20,9 @@ type UnwrapResultOptions = {
|
|
|
20
20
|
/**
|
|
21
21
|
* Removes quotes and optional introduce text from a string
|
|
22
22
|
*
|
|
23
|
-
* Tip: This is very
|
|
23
|
+
* Tip: This is very useful for post-processing of the result of the LLM model
|
|
24
24
|
* Note: This function trims the text and removes whole introduce sentence if it is present
|
|
25
|
-
* Note: There are two
|
|
25
|
+
* Note: There are two similar functions:
|
|
26
26
|
* - `removeQuotes` which removes only bounding quotes
|
|
27
27
|
* - `unwrapResult` which removes whole introduce sentence
|
|
28
28
|
*
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { string_javascript_name } from '../../../types/typeAliases';
|
|
2
2
|
import type { really_unknown } from '../../organization/really_unknown';
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* Checks if the given value is a valid JavaScript identifier name.
|
|
5
5
|
*
|
|
6
|
-
* @param javascriptName
|
|
7
|
-
* @returns
|
|
6
|
+
* @param javascriptName The value to check for JavaScript identifier validity.
|
|
7
|
+
* @returns `true` if the value is a valid JavaScript name, false otherwise.
|
|
8
8
|
* @public exported from `@promptbook/utils`
|
|
9
9
|
*/
|
|
10
10
|
export declare function isValidJavascriptName(javascriptName: really_unknown): javascriptName is string_javascript_name;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import type { string_parameter_name } from '../../../types/typeAliases';
|
|
2
2
|
/**
|
|
3
|
-
* Function `validateParameterName` will
|
|
3
|
+
* Function `validateParameterName` will normalize and validate a parameter name for use in pipelines.
|
|
4
|
+
* It removes diacritics, emojis, and quotes, normalizes to camelCase, and checks for reserved names and invalid characters.
|
|
4
5
|
*
|
|
5
|
-
* @param parameterName
|
|
6
|
-
* @returns
|
|
7
|
-
* @throws {ParseError}
|
|
6
|
+
* @param parameterName The parameter name to validate and normalize.
|
|
7
|
+
* @returns The validated and normalized parameter name.
|
|
8
|
+
* @throws {ParseError} If the parameter name is empty, reserved, or contains invalid characters.
|
|
8
9
|
* @private within the repository
|
|
9
10
|
*/
|
|
10
11
|
export declare function validateParameterName(parameterName: string): string_parameter_name;
|
|
@@ -6,7 +6,7 @@ import type { really_unknown } from '../../organization/really_unknown';
|
|
|
6
6
|
*
|
|
7
7
|
* @see https://www.npmjs.com/package/promptbook?activeTab=versions
|
|
8
8
|
* Note: When you are using for example promptbook 2.0.0 and there already is promptbook 3.0.0 it don`t know about it.
|
|
9
|
-
* Note: There are two
|
|
9
|
+
* Note: There are two similar functions:
|
|
10
10
|
* - `isValidSemanticVersion` which tests any semantic version
|
|
11
11
|
* - `isValidPromptbookVersion` *(this one)* which tests just Promptbook versions
|
|
12
12
|
*
|
|
@@ -3,7 +3,7 @@ import type { really_unknown } from '../../organization/really_unknown';
|
|
|
3
3
|
/**
|
|
4
4
|
* Tests if given string is valid semantic version
|
|
5
5
|
*
|
|
6
|
-
* Note: There are two
|
|
6
|
+
* Note: There are two similar functions:
|
|
7
7
|
* - `isValidSemanticVersion` which tests any semantic version
|
|
8
8
|
* - `isValidPromptbookVersion` *(this one)* which tests just Promptbook versions
|
|
9
9
|
*
|
|
@@ -2,7 +2,7 @@ import type { string_hostname } from '../../../types/typeAliases';
|
|
|
2
2
|
/**
|
|
3
3
|
* Checks if an URL is reserved for private networks or localhost.
|
|
4
4
|
*
|
|
5
|
-
* Note: There are two
|
|
5
|
+
* Note: There are two similar functions:
|
|
6
6
|
* - `isUrlOnPrivateNetwork` which tests full URL
|
|
7
7
|
* - `isHostnameOnPrivateNetwork` *(this one)* which tests just hostname
|
|
8
8
|
*
|
|
@@ -2,7 +2,7 @@ import type { string_url } from '../../../types/typeAliases';
|
|
|
2
2
|
/**
|
|
3
3
|
* Checks if an IP address or hostname is reserved for private networks or localhost.
|
|
4
4
|
*
|
|
5
|
-
* Note: There are two
|
|
5
|
+
* Note: There are two similar functions:
|
|
6
6
|
* - `isUrlOnPrivateNetwork` *(this one)* which tests full URL
|
|
7
7
|
* - `isHostnameOnPrivateNetwork` which tests just hostname
|
|
8
8
|
*
|
|
@@ -3,7 +3,7 @@ import type { really_unknown } from '../../organization/really_unknown';
|
|
|
3
3
|
/**
|
|
4
4
|
* Tests if given string is valid pipeline URL URL.
|
|
5
5
|
*
|
|
6
|
-
* Note: There are two
|
|
6
|
+
* Note: There are two similar functions:
|
|
7
7
|
* - `isValidUrl` which tests any URL
|
|
8
8
|
* - `isValidPipelineUrl` *(this one)* which tests just pipeline URL
|
|
9
9
|
*
|
|
@@ -4,7 +4,7 @@ import type { really_unknown } from '../../organization/really_unknown';
|
|
|
4
4
|
* Tests if given string is valid URL.
|
|
5
5
|
*
|
|
6
6
|
* Note: Dataurl are considered perfectly valid.
|
|
7
|
-
* Note: There are two
|
|
7
|
+
* Note: There are two similar functions:
|
|
8
8
|
* - `isValidUrl` which tests any URL
|
|
9
9
|
* - `isValidPipelineUrl` *(this one)* which tests just promptbook URL
|
|
10
10
|
*
|
|
@@ -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`).
|
|
18
19
|
*
|
|
19
20
|
* @generated
|
|
20
21
|
*/
|
|
@@ -24,7 +24,7 @@ declare class Wizzard {
|
|
|
24
24
|
* 2) As a URL https://promptbook.studio/hejny/write-cv.book fetched from the internet
|
|
25
25
|
* 3) As a string
|
|
26
26
|
*
|
|
27
|
-
* Note: This works
|
|
27
|
+
* Note: This works similar to the `ptbk run` command
|
|
28
28
|
*/
|
|
29
29
|
execute(book: string_pipeline_url | string_filename | PipelineString, inputParameters: InputParameters): Promise<{
|
|
30
30
|
/**
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@promptbook/fake-llm",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.93.0",
|
|
4
|
+
"description": "Promptbook: Run AI apps in plain human language across multiple models and platforms",
|
|
5
5
|
"private": false,
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"repository": {
|
|
@@ -47,11 +47,23 @@
|
|
|
47
47
|
"node": ">=16.0.0",
|
|
48
48
|
"npm": ">=8.0.0"
|
|
49
49
|
},
|
|
50
|
+
"cspell": {
|
|
51
|
+
"version": "0.2",
|
|
52
|
+
"language": "en",
|
|
53
|
+
"ignorePaths": [
|
|
54
|
+
"node_modules",
|
|
55
|
+
".next",
|
|
56
|
+
"coverage",
|
|
57
|
+
"dist",
|
|
58
|
+
".git"
|
|
59
|
+
],
|
|
60
|
+
"words": []
|
|
61
|
+
},
|
|
50
62
|
"main": "./umd/index.umd.js",
|
|
51
63
|
"module": "./esm/index.es.js",
|
|
52
64
|
"typings": "./esm/typings/src/_packages/fake-llm.index.d.ts",
|
|
53
65
|
"peerDependencies": {
|
|
54
|
-
"@promptbook/core": "0.
|
|
66
|
+
"@promptbook/core": "0.93.0"
|
|
55
67
|
},
|
|
56
68
|
"dependencies": {
|
|
57
69
|
"crypto": "1.0.1",
|
package/umd/index.umd.js
CHANGED
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
* @generated
|
|
24
24
|
* @see https://github.com/webgptorg/promptbook
|
|
25
25
|
*/
|
|
26
|
-
const PROMPTBOOK_ENGINE_VERSION = '0.
|
|
26
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.93.0';
|
|
27
27
|
/**
|
|
28
28
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
29
29
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
@@ -192,7 +192,7 @@
|
|
|
192
192
|
const SMALL_NUMBER = 0.001;
|
|
193
193
|
// <- TODO: [🧜♂️]
|
|
194
194
|
/**
|
|
195
|
-
*
|
|
195
|
+
* Default settings for parsing and generating CSV files in Promptbook.
|
|
196
196
|
*
|
|
197
197
|
* @public exported from `@promptbook/core`
|
|
198
198
|
*/
|
|
@@ -277,7 +277,7 @@
|
|
|
277
277
|
${block(message)}
|
|
278
278
|
|
|
279
279
|
Note: This error should not happen.
|
|
280
|
-
It's
|
|
280
|
+
It's probably a bug in the pipeline collection
|
|
281
281
|
|
|
282
282
|
Please report issue:
|
|
283
283
|
${block(getErrorReportUrl(new Error(message)).href)}
|
|
@@ -477,8 +477,12 @@
|
|
|
477
477
|
*/
|
|
478
478
|
|
|
479
479
|
/**
|
|
480
|
-
*
|
|
480
|
+
* Creates a deep clone of the given object
|
|
481
481
|
*
|
|
482
|
+
* Note: This method only works for objects that are fully serializable to JSON and do not contain functions, Dates, or special types.
|
|
483
|
+
*
|
|
484
|
+
* @param objectValue The object to clone.
|
|
485
|
+
* @returns A deep, writable clone of the input object.
|
|
482
486
|
* @public exported from `@promptbook/utils`
|
|
483
487
|
*/
|
|
484
488
|
function deepClone(objectValue) {
|
|
@@ -540,13 +544,13 @@
|
|
|
540
544
|
*/
|
|
541
545
|
const REPLACING_NONCE = 'ptbkauk42kV2dzao34faw7FudQUHYPtW';
|
|
542
546
|
/**
|
|
543
|
-
*
|
|
547
|
+
* Placeholder value indicating a parameter is missing its value.
|
|
544
548
|
*
|
|
545
549
|
* @private within the repository
|
|
546
550
|
*/
|
|
547
551
|
const RESERVED_PARAMETER_MISSING_VALUE = 'MISSING-' + REPLACING_NONCE;
|
|
548
552
|
/**
|
|
549
|
-
*
|
|
553
|
+
* Placeholder value indicating a parameter is restricted and cannot be used directly.
|
|
550
554
|
*
|
|
551
555
|
* @private within the repository
|
|
552
556
|
*/
|
|
@@ -614,7 +618,7 @@
|
|
|
614
618
|
super(message);
|
|
615
619
|
this.name = 'PipelineExecutionError';
|
|
616
620
|
// TODO: [🐙] DRY - Maybe $randomId
|
|
617
|
-
this.id = `error-${$randomToken(8 /* <- TODO: To global config + Use Base58 to avoid
|
|
621
|
+
this.id = `error-${$randomToken(8 /* <- TODO: To global config + Use Base58 to avoid similar char conflicts */)}`;
|
|
618
622
|
Object.setPrototypeOf(this, PipelineExecutionError.prototype);
|
|
619
623
|
}
|
|
620
624
|
}
|
|
@@ -1248,10 +1252,10 @@
|
|
|
1248
1252
|
*/
|
|
1249
1253
|
|
|
1250
1254
|
/**
|
|
1251
|
-
*
|
|
1255
|
+
* Removes diacritic marks (accents) from characters in a string.
|
|
1252
1256
|
*
|
|
1253
|
-
* @param input
|
|
1254
|
-
* @returns
|
|
1257
|
+
* @param input The string containing diacritics to be normalized.
|
|
1258
|
+
* @returns The string with diacritics removed or normalized.
|
|
1255
1259
|
* @public exported from `@promptbook/utils`
|
|
1256
1260
|
*/
|
|
1257
1261
|
function removeDiacritics(input) {
|
|
@@ -1294,14 +1298,14 @@
|
|
|
1294
1298
|
PAGES: countPages,
|
|
1295
1299
|
};
|
|
1296
1300
|
/**
|
|
1297
|
-
* TODO: [🧠][🤠] This should be
|
|
1301
|
+
* TODO: [🧠][🤠] This should be probably as part of `TextFormatParser`
|
|
1298
1302
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
1299
1303
|
*/
|
|
1300
1304
|
|
|
1301
1305
|
/**
|
|
1302
1306
|
* Function checkExpectations will check if the expectations on given value are met
|
|
1303
1307
|
*
|
|
1304
|
-
* Note: There are two
|
|
1308
|
+
* Note: There are two similar functions:
|
|
1305
1309
|
* - `checkExpectations` which throws an error if the expectations are not met
|
|
1306
1310
|
* - `isPassingExpectations` which returns a boolean
|
|
1307
1311
|
*
|
|
@@ -1323,7 +1327,7 @@
|
|
|
1323
1327
|
/**
|
|
1324
1328
|
* Function checkExpectations will check if the expectations on given value are met
|
|
1325
1329
|
*
|
|
1326
|
-
* Note: There are two
|
|
1330
|
+
* Note: There are two similar functions:
|
|
1327
1331
|
* - `checkExpectations` which throws an error if the expectations are not met
|
|
1328
1332
|
* - `isPassingExpectations` which returns a boolean
|
|
1329
1333
|
*
|
|
@@ -1344,16 +1348,16 @@
|
|
|
1344
1348
|
}
|
|
1345
1349
|
/**
|
|
1346
1350
|
* TODO: [💝] Unite object for expecting amount and format
|
|
1347
|
-
* TODO: [🧠][🤠] This should be part of `
|
|
1351
|
+
* TODO: [🧠][🤠] This should be part of `TextFormatParser`
|
|
1348
1352
|
* Note: [💝] and [🤠] are interconnected together
|
|
1349
1353
|
*/
|
|
1350
1354
|
|
|
1351
1355
|
/**
|
|
1352
|
-
*
|
|
1356
|
+
* Normalizes a given text to camelCase format.
|
|
1353
1357
|
*
|
|
1354
|
-
* @param text
|
|
1355
|
-
* @param _isFirstLetterCapital
|
|
1356
|
-
* @returns
|
|
1358
|
+
* @param text The text to be normalized.
|
|
1359
|
+
* @param _isFirstLetterCapital Whether the first letter should be capitalized.
|
|
1360
|
+
* @returns The camelCase formatted string.
|
|
1357
1361
|
* @example 'helloWorld'
|
|
1358
1362
|
* @example 'iLovePromptbook'
|
|
1359
1363
|
* @public exported from `@promptbook/utils`
|
|
@@ -1417,10 +1421,10 @@
|
|
|
1417
1421
|
}
|
|
1418
1422
|
|
|
1419
1423
|
/**
|
|
1420
|
-
*
|
|
1424
|
+
* Converts a given text to kebab-case format.
|
|
1421
1425
|
*
|
|
1422
|
-
* @param text
|
|
1423
|
-
* @returns
|
|
1426
|
+
* @param text The text to be converted.
|
|
1427
|
+
* @returns The kebab-case formatted string.
|
|
1424
1428
|
* @example 'hello-world'
|
|
1425
1429
|
* @example 'i-love-promptbook'
|
|
1426
1430
|
* @public exported from `@promptbook/utils`
|
|
@@ -1605,10 +1609,10 @@
|
|
|
1605
1609
|
}
|
|
1606
1610
|
|
|
1607
1611
|
/**
|
|
1608
|
-
*
|
|
1612
|
+
* Normalizes a text string to SCREAMING_CASE (all uppercase with underscores).
|
|
1609
1613
|
*
|
|
1610
|
-
* @param text
|
|
1611
|
-
* @returns
|
|
1614
|
+
* @param text The text string to be converted to SCREAMING_CASE format.
|
|
1615
|
+
* @returns The normalized text in SCREAMING_CASE format.
|
|
1612
1616
|
* @example 'HELLO_WORLD'
|
|
1613
1617
|
* @example 'I_LOVE_PROMPTBOOK'
|
|
1614
1618
|
* @public exported from `@promptbook/utils`
|
|
@@ -1675,11 +1679,11 @@
|
|
|
1675
1679
|
}
|
|
1676
1680
|
|
|
1677
1681
|
/**
|
|
1678
|
-
*
|
|
1682
|
+
* Converts a name string into a URI-compatible format.
|
|
1679
1683
|
*
|
|
1680
|
-
* @param name
|
|
1681
|
-
* @returns
|
|
1682
|
-
* @example
|
|
1684
|
+
* @param name The string to be converted to a URI-compatible format.
|
|
1685
|
+
* @returns A URI-compatible string derived from the input name.
|
|
1686
|
+
* @example 'Hello World' -> 'hello-world'
|
|
1683
1687
|
* @public exported from `@promptbook/utils`
|
|
1684
1688
|
*/
|
|
1685
1689
|
function nameToUriPart(name) {
|
|
@@ -1693,11 +1697,11 @@
|
|
|
1693
1697
|
}
|
|
1694
1698
|
|
|
1695
1699
|
/**
|
|
1696
|
-
*
|
|
1700
|
+
* Converts a given name into URI-compatible parts.
|
|
1697
1701
|
*
|
|
1698
|
-
* @param name
|
|
1699
|
-
* @returns
|
|
1700
|
-
* @example
|
|
1702
|
+
* @param name The name to be converted into URI parts.
|
|
1703
|
+
* @returns An array of URI-compatible parts derived from the name.
|
|
1704
|
+
* @example 'Example Name' -> ['example', 'name']
|
|
1701
1705
|
* @public exported from `@promptbook/utils`
|
|
1702
1706
|
*/
|
|
1703
1707
|
function nameToUriParts(name) {
|
|
@@ -1719,10 +1723,10 @@
|
|
|
1719
1723
|
}
|
|
1720
1724
|
|
|
1721
1725
|
/**
|
|
1722
|
-
*
|
|
1726
|
+
* Normalizes a text string to snake_case format.
|
|
1723
1727
|
*
|
|
1724
|
-
* @param text
|
|
1725
|
-
* @returns
|
|
1728
|
+
* @param text The text string to be converted to snake_case format.
|
|
1729
|
+
* @returns The normalized text in snake_case format.
|
|
1726
1730
|
* @example 'hello_world'
|
|
1727
1731
|
* @example 'i_love_promptbook'
|
|
1728
1732
|
* @public exported from `@promptbook/utils`
|
|
@@ -1743,9 +1747,9 @@
|
|
|
1743
1747
|
/**
|
|
1744
1748
|
* Removes quotes from a string
|
|
1745
1749
|
*
|
|
1746
|
-
* Tip: This is very
|
|
1750
|
+
* Tip: This is very useful for post-processing of the result of the LLM model
|
|
1747
1751
|
* Note: This function removes only the same quotes from the beginning and the end of the string
|
|
1748
|
-
* Note: There are two
|
|
1752
|
+
* Note: There are two similar functions:
|
|
1749
1753
|
* - `removeQuotes` which removes only bounding quotes
|
|
1750
1754
|
* - `unwrapResult` which removes whole introduce sentence
|
|
1751
1755
|
*
|
|
@@ -1757,7 +1761,7 @@
|
|
|
1757
1761
|
if (text.startsWith('"') && text.endsWith('"')) {
|
|
1758
1762
|
return text.slice(1, -1);
|
|
1759
1763
|
}
|
|
1760
|
-
if (text.startsWith('
|
|
1764
|
+
if (text.startsWith("'") && text.endsWith("'")) {
|
|
1761
1765
|
return text.slice(1, -1);
|
|
1762
1766
|
}
|
|
1763
1767
|
return text;
|
|
@@ -1766,7 +1770,7 @@
|
|
|
1766
1770
|
/**
|
|
1767
1771
|
* Function trimCodeBlock will trim starting and ending code block from the string if it is present.
|
|
1768
1772
|
*
|
|
1769
|
-
* Note: This is
|
|
1773
|
+
* Note: This is useful for post-processing of the result of the chat LLM model
|
|
1770
1774
|
* when the model wraps the result in the (markdown) code block.
|
|
1771
1775
|
*
|
|
1772
1776
|
* @public exported from `@promptbook/utils`
|
|
@@ -1785,7 +1789,7 @@
|
|
|
1785
1789
|
/**
|
|
1786
1790
|
* Function trimEndOfCodeBlock will remove ending code block from the string if it is present.
|
|
1787
1791
|
*
|
|
1788
|
-
* Note: This is
|
|
1792
|
+
* Note: This is useful for post-processing of the result of the completion LLM model
|
|
1789
1793
|
* if you want to start code block in the prompt but you don't want to end it in the result.
|
|
1790
1794
|
*
|
|
1791
1795
|
* @public exported from `@promptbook/utils`
|
|
@@ -1800,9 +1804,9 @@
|
|
|
1800
1804
|
/**
|
|
1801
1805
|
* Removes quotes and optional introduce text from a string
|
|
1802
1806
|
*
|
|
1803
|
-
* Tip: This is very
|
|
1807
|
+
* Tip: This is very useful for post-processing of the result of the LLM model
|
|
1804
1808
|
* Note: This function trims the text and removes whole introduce sentence if it is present
|
|
1805
|
-
* Note: There are two
|
|
1809
|
+
* Note: There are two similar functions:
|
|
1806
1810
|
* - `removeQuotes` which removes only bounding quotes
|
|
1807
1811
|
* - `unwrapResult` which removes whole introduce sentence
|
|
1808
1812
|
*
|
|
@@ -1871,8 +1875,8 @@
|
|
|
1871
1875
|
/**
|
|
1872
1876
|
* Extracts all code blocks from markdown.
|
|
1873
1877
|
*
|
|
1874
|
-
* Note: There are multiple
|
|
1875
|
-
* - `extractBlock` just extracts the content of the code block which is also used as
|
|
1878
|
+
* Note: There are multiple similar functions:
|
|
1879
|
+
* - `extractBlock` just extracts the content of the code block which is also used as built-in function for postprocessing
|
|
1876
1880
|
* - `extractJsonBlock` extracts exactly one valid JSON code block
|
|
1877
1881
|
* - `extractOneBlockFromMarkdown` extracts exactly one code block with language of the code block
|
|
1878
1882
|
* - `extractAllBlocksFromMarkdown` extracts all code blocks with language of the code block
|
|
@@ -1922,7 +1926,7 @@
|
|
|
1922
1926
|
if (currentCodeBlock.content !== '') {
|
|
1923
1927
|
currentCodeBlock.content += '\n';
|
|
1924
1928
|
}
|
|
1925
|
-
currentCodeBlock.content += line.split('\\`\\`\\`').join('```') /* <- TODO: Maybe make
|
|
1929
|
+
currentCodeBlock.content += line.split('\\`\\`\\`').join('```') /* <- TODO: Maybe make proper unescape */;
|
|
1926
1930
|
}
|
|
1927
1931
|
}
|
|
1928
1932
|
if (currentCodeBlock !== null) {
|
|
@@ -1939,8 +1943,8 @@
|
|
|
1939
1943
|
*
|
|
1940
1944
|
* - When there are multiple or no code blocks the function throws a `ParseError`
|
|
1941
1945
|
*
|
|
1942
|
-
* Note: There are multiple
|
|
1943
|
-
* - `extractBlock` just extracts the content of the code block which is also used as
|
|
1946
|
+
* Note: There are multiple similar functions:
|
|
1947
|
+
* - `extractBlock` just extracts the content of the code block which is also used as built-in function for postprocessing
|
|
1944
1948
|
* - `extractJsonBlock` extracts exactly one valid JSON code block
|
|
1945
1949
|
* - `extractOneBlockFromMarkdown` extracts exactly one code block with language of the code block
|
|
1946
1950
|
* - `extractAllBlocksFromMarkdown` extracts all code blocks with language of the code block
|
|
@@ -1970,7 +1974,7 @@
|
|
|
1970
1974
|
*
|
|
1971
1975
|
* - When there are multiple or no code blocks the function throws a `ParseError`
|
|
1972
1976
|
*
|
|
1973
|
-
* Note: There are multiple
|
|
1977
|
+
* Note: There are multiple similar function:
|
|
1974
1978
|
* - `extractBlock` just extracts the content of the code block which is also used as build-in function for postprocessing
|
|
1975
1979
|
* - `extractJsonBlock` extracts exactly one valid JSON code block
|
|
1976
1980
|
* - `extractOneBlockFromMarkdown` extracts exactly one code block with language of the code block
|
|
@@ -2041,7 +2045,7 @@
|
|
|
2041
2045
|
})();
|
|
2042
2046
|
}
|
|
2043
2047
|
/**
|
|
2044
|
-
* TODO:
|
|
2048
|
+
* TODO: Probably remove in favour of `keepImported`
|
|
2045
2049
|
* TODO: [1] This maybe does memory leak
|
|
2046
2050
|
*/
|
|
2047
2051
|
|
|
@@ -2245,7 +2249,7 @@
|
|
|
2245
2249
|
*/
|
|
2246
2250
|
|
|
2247
2251
|
/**
|
|
2248
|
-
* Placeholder for better implementation of JavascriptExecutionTools - some
|
|
2252
|
+
* Placeholder for better implementation of JavascriptExecutionTools - some proper sandboxing
|
|
2249
2253
|
*
|
|
2250
2254
|
* @alias JavascriptExecutionTools
|
|
2251
2255
|
* @public exported from `@promptbook/javascript`
|