@promptbook/node 0.63.0-2 → 0.63.0-3
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 +2 -2
- package/esm/index.es.js +101 -94
- package/esm/index.es.js.map +1 -1
- package/esm/typings/src/_packages/anthropic-claude.index.d.ts +2 -0
- package/esm/typings/src/_packages/browser.index.d.ts +2 -0
- package/esm/typings/src/_packages/core.index.d.ts +0 -4
- package/esm/typings/src/_packages/types.index.d.ts +0 -48
- package/esm/typings/src/_packages/utils.index.d.ts +6 -2
- package/esm/typings/src/cli/cli-commands/hello.d.ts +2 -2
- package/esm/typings/src/cli/cli-commands/make.d.ts +1 -1
- package/esm/typings/src/cli/cli-commands/prettify.d.ts +1 -1
- package/esm/typings/src/cli/promptbookCli.d.ts +3 -1
- package/esm/typings/src/collection/SimplePipelineCollection.d.ts +1 -2
- package/esm/typings/src/collection/constructors/createCollectionFromDirectory.d.ts +1 -1
- package/esm/typings/src/commands/_BOILERPLATE/boilerplateCommandParser.d.ts +0 -1
- package/esm/typings/src/commands/_common/types/CommandUsagePlaces.d.ts +2 -0
- package/esm/typings/src/commands/index.d.ts +2 -0
- package/esm/typings/src/config.d.ts +13 -5
- package/esm/typings/src/conversion/validation/_importPipeline.d.ts +5 -1
- package/esm/typings/src/errors/_ExpectError.d.ts +2 -1
- package/esm/typings/src/execution/translation/automatic-translate/automatic-translators/AutomaticTranslator.d.ts +3 -0
- package/esm/typings/src/execution/translation/automatic-translate/automatic-translators/DebugAutomaticTranslator.d.ts +2 -0
- package/esm/typings/src/execution/translation/automatic-translate/automatic-translators/FakeAutomaticTranslator.d.ts +3 -0
- package/esm/typings/src/execution/translation/automatic-translate/automatic-translators/LindatAutomaticTranslator.d.ts +3 -0
- package/esm/typings/src/execution/translation/automatic-translate/automatic-translators/TranslatorOptions.d.ts +3 -0
- package/esm/typings/src/execution/translation/automatic-translate/automatic-translators/utils/extractMultiplicatedOccurrence.d.ts +1 -0
- package/esm/typings/src/execution/translation/automatic-translate/translateMessages.d.ts +3 -0
- package/esm/typings/src/execution/utils/checkExpectations.d.ts +1 -1
- package/esm/typings/src/execution/utils/computeUsageCounts.d.ts +1 -1
- package/esm/typings/src/expectations/drafts/isDomainNameFree.d.ts +3 -0
- package/esm/typings/src/expectations/drafts/isGithubNameFree.d.ts +3 -0
- package/esm/typings/src/formats/_common/FormatDefinition.d.ts +1 -1
- package/esm/typings/src/formats/csv/ListFormatDefinition.d.ts +2 -0
- package/esm/typings/src/formats/index.d.ts +2 -0
- package/esm/typings/src/formats/json/JsonFormatDefinition.d.ts +2 -0
- package/esm/typings/src/formats/list/ListFormatDefinition.d.ts +2 -0
- package/esm/typings/src/formats/xml/XmlFormatDefinition.d.ts +2 -0
- package/esm/typings/src/knowledge/dialogs/simple-prompt/SimplePromptInterfaceTools.d.ts +1 -1
- package/esm/typings/src/knowledge/prepare-knowledge/pdf/prepareKnowledgeFromPdf.d.ts +2 -0
- package/esm/typings/src/llm-providers/_common/createLlmToolsFromEnv.d.ts +4 -2
- package/esm/typings/src/llm-providers/anthropic-claude/anthropic-claude-models.d.ts +1 -0
- package/esm/typings/src/llm-providers/mocked/fakeTextToExpectations.d.ts +1 -1
- package/esm/typings/src/llm-providers/multiple/MultipleLlmExecutionTools.d.ts +1 -1
- package/esm/typings/src/llm-providers/openai/computeOpenaiUsage.d.ts +1 -1
- package/esm/typings/src/scripting/javascript/utils/preserve.d.ts +1 -0
- package/esm/typings/src/scripting/javascript/utils/unknownToString.d.ts +1 -1
- package/esm/typings/src/scripting/python/PythonExecutionTools.d.ts +2 -0
- package/esm/typings/src/scripting/typescript/TypescriptExecutionTools.d.ts +2 -0
- package/esm/typings/src/storage/files-storage/FilesStorage.d.ts +1 -1
- package/esm/typings/src/types/Arrayable.d.ts +1 -1
- package/esm/typings/src/types/ModelVariant.d.ts +8 -7
- package/esm/typings/src/types/PipelineJson/Expectations.d.ts +10 -4
- package/esm/typings/src/types/ScriptLanguage.d.ts +6 -4
- package/esm/typings/src/types/typeAliases.d.ts +2 -1
- package/esm/typings/src/utils/arrayableToArray.d.ts +1 -1
- package/esm/typings/src/utils/deepFreeze.d.ts +6 -5
- package/esm/typings/src/utils/files/listAllFiles.d.ts +14 -0
- package/esm/typings/src/utils/getCurrentIsoDate.d.ts +1 -1
- package/esm/typings/src/utils/markdown/extractOneBlockFromMarkdown.d.ts +1 -1
- package/esm/typings/src/utils/normalization/normalizeWhitespaces.d.ts +3 -1
- package/esm/typings/src/utils/validators/email/isValidEmail.d.ts +2 -0
- package/package.json +2 -2
- package/umd/index.umd.js +100 -94
- package/umd/index.umd.js.map +1 -1
- package/esm/typings/src/types/execution-report/config.d.ts +0 -8
- package/umd/typings/promptbook-collection/index.d.ts +0 -252
- package/umd/typings/src/_packages/anthropic-claude.index.d.ts +0 -6
- package/umd/typings/src/_packages/azure-openai.index.d.ts +0 -6
- package/umd/typings/src/_packages/browser.index.d.ts +0 -6
- package/umd/typings/src/_packages/cli.index.d.ts +0 -4
- package/umd/typings/src/_packages/core.index.d.ts +0 -124
- package/umd/typings/src/_packages/execute-javascript.index.d.ts +0 -8
- package/umd/typings/src/_packages/fake-llm.index.d.ts +0 -6
- package/umd/typings/src/_packages/langtail.index.d.ts +0 -6
- package/umd/typings/src/_packages/markdown-utils.index.d.ts +0 -36
- package/umd/typings/src/_packages/node.index.d.ts +0 -8
- package/umd/typings/src/_packages/openai.index.d.ts +0 -8
- package/umd/typings/src/_packages/remote-client.index.d.ts +0 -8
- package/umd/typings/src/_packages/remote-server.index.d.ts +0 -6
- package/umd/typings/src/_packages/types.index.d.ts +0 -462
- package/umd/typings/src/_packages/utils.index.d.ts +0 -130
- package/umd/typings/src/cli/cli-commands/hello.d.ts +0 -10
- package/umd/typings/src/cli/cli-commands/make.d.ts +0 -10
- package/umd/typings/src/cli/cli-commands/prettify.d.ts +0 -10
- package/umd/typings/src/cli/main.d.ts +0 -12
- package/umd/typings/src/cli/promptbookCli.d.ts +0 -10
- package/umd/typings/src/collection/PipelineCollection.d.ts +0 -25
- package/umd/typings/src/collection/SimplePipelineCollection.d.ts +0 -38
- package/umd/typings/src/collection/collectionToJson.d.ts +0 -13
- package/umd/typings/src/collection/collectionToJson.test.d.ts +0 -7
- package/umd/typings/src/collection/constructors/createCollectionFromDirectory.d.ts +0 -48
- package/umd/typings/src/collection/constructors/createCollectionFromDirectory.test.d.ts +0 -1
- package/umd/typings/src/collection/constructors/createCollectionFromJson.d.ts +0 -13
- package/umd/typings/src/collection/constructors/createCollectionFromJson.test.d.ts +0 -1
- package/umd/typings/src/collection/constructors/createCollectionFromPromise.d.ts +0 -23
- package/umd/typings/src/collection/constructors/createCollectionFromPromise.test.d.ts +0 -1
- package/umd/typings/src/collection/constructors/createCollectionFromUrl.d.ts +0 -29
- package/umd/typings/src/collection/constructors/createSubcollection.d.ts +0 -13
- package/umd/typings/src/commands/BLOCK/BlockCommand.d.ts +0 -11
- package/umd/typings/src/commands/BLOCK/BlockTypes.d.ts +0 -15
- package/umd/typings/src/commands/BLOCK/blockCommand.test.d.ts +0 -1
- package/umd/typings/src/commands/BLOCK/blockCommandParser.d.ts +0 -9
- package/umd/typings/src/commands/EXPECT/ExpectAmountCommand.d.ts +0 -14
- package/umd/typings/src/commands/EXPECT/ExpectCommand.d.ts +0 -9
- package/umd/typings/src/commands/EXPECT/ExpectFormatCommand.d.ts +0 -7
- package/umd/typings/src/commands/EXPECT/expectCommand.test.d.ts +0 -1
- package/umd/typings/src/commands/EXPECT/expectCommandParser.d.ts +0 -9
- package/umd/typings/src/commands/JOKER/JokerCommand.d.ts +0 -11
- package/umd/typings/src/commands/JOKER/jokerCommand.test.d.ts +0 -1
- package/umd/typings/src/commands/JOKER/jokerCommandParser.d.ts +0 -9
- package/umd/typings/src/commands/KNOWLEDGE/KnowledgeCommand.d.ts +0 -11
- package/umd/typings/src/commands/KNOWLEDGE/knowledgeCommand.test.d.ts +0 -1
- package/umd/typings/src/commands/KNOWLEDGE/knowledgeCommandParser.d.ts +0 -9
- package/umd/typings/src/commands/MODEL/ModelCommand.d.ts +0 -13
- package/umd/typings/src/commands/MODEL/modelCommand.test.d.ts +0 -1
- package/umd/typings/src/commands/MODEL/modelCommandParser.d.ts +0 -9
- package/umd/typings/src/commands/PARAMETER/ParameterCommand.d.ts +0 -15
- package/umd/typings/src/commands/PARAMETER/parameterCommand.test.d.ts +0 -1
- package/umd/typings/src/commands/PARAMETER/parameterCommandParser.d.ts +0 -9
- package/umd/typings/src/commands/PERSONA/PersonaCommand.d.ts +0 -13
- package/umd/typings/src/commands/PERSONA/personaCommand.test.d.ts +0 -1
- package/umd/typings/src/commands/PERSONA/personaCommandParser.d.ts +0 -9
- package/umd/typings/src/commands/POSTPROCESS/PostprocessCommand.d.ts +0 -11
- package/umd/typings/src/commands/POSTPROCESS/postprocessCommand.test.d.ts +0 -1
- package/umd/typings/src/commands/POSTPROCESS/postprocessCommandParser.d.ts +0 -9
- package/umd/typings/src/commands/PROMPTBOOK_VERSION/PromptbookVersionCommand.d.ts +0 -11
- package/umd/typings/src/commands/PROMPTBOOK_VERSION/promptbookVersionCommand.test.d.ts +0 -1
- package/umd/typings/src/commands/PROMPTBOOK_VERSION/promptbookVersionCommandParser.d.ts +0 -9
- package/umd/typings/src/commands/URL/UrlCommand.d.ts +0 -10
- package/umd/typings/src/commands/URL/urlCommand.test.d.ts +0 -1
- package/umd/typings/src/commands/URL/urlCommandParser.d.ts +0 -9
- package/umd/typings/src/commands/X_ACTION/ActionCommand.d.ts +0 -9
- package/umd/typings/src/commands/X_ACTION/actionCommand.test.d.ts +0 -1
- package/umd/typings/src/commands/X_ACTION/actionCommandParser.d.ts +0 -9
- package/umd/typings/src/commands/X_INSTRUMENT/InstrumentCommand.d.ts +0 -9
- package/umd/typings/src/commands/X_INSTRUMENT/instrumentCommand.test.d.ts +0 -1
- package/umd/typings/src/commands/X_INSTRUMENT/instrumentCommandParser.d.ts +0 -9
- package/umd/typings/src/commands/_BOILERPLATE/BoilerplateCommand.d.ts +0 -10
- package/umd/typings/src/commands/_BOILERPLATE/boilerplateCommand.test.d.ts +0 -1
- package/umd/typings/src/commands/_BOILERPLATE/boilerplateCommandParser.d.ts +0 -13
- package/umd/typings/src/commands/_common/parseCommand.d.ts +0 -12
- package/umd/typings/src/commands/_common/parseCommand.test.d.ts +0 -1
- package/umd/typings/src/commands/_common/types/Command.d.ts +0 -6
- package/umd/typings/src/commands/_common/types/CommandParser.d.ts +0 -64
- package/umd/typings/src/commands/_common/types/CommandUsagePlaces.d.ts +0 -9
- package/umd/typings/src/commands/index.d.ts +0 -4
- package/umd/typings/src/config.d.ts +0 -87
- package/umd/typings/src/config.test.d.ts +0 -4
- package/umd/typings/src/conversion/pipelineJsonToString.d.ts +0 -16
- package/umd/typings/src/conversion/pipelineStringToJson.d.ts +0 -38
- package/umd/typings/src/conversion/pipelineStringToJson.test.d.ts +0 -1
- package/umd/typings/src/conversion/pipelineStringToJsonSync.d.ts +0 -29
- package/umd/typings/src/conversion/pipelineStringToJsonSync.test.d.ts +0 -1
- package/umd/typings/src/conversion/prettify/PrettifyOptions.d.ts +0 -13
- package/umd/typings/src/conversion/prettify/prettifyPipelineString.d.ts +0 -12
- package/umd/typings/src/conversion/prettify/renderPipelineMermaidOptions.d.ts +0 -27
- package/umd/typings/src/conversion/utils/extractParameterNamesFromPromptTemplate.d.ts +0 -14
- package/umd/typings/src/conversion/utils/extractParameterNamesFromPromptTemplate.test.d.ts +0 -1
- package/umd/typings/src/conversion/utils/extractVariables.d.ts +0 -14
- package/umd/typings/src/conversion/utils/extractVariables.test.d.ts +0 -1
- package/umd/typings/src/conversion/utils/renameParameter.d.ts +0 -26
- package/umd/typings/src/conversion/utils/renameParameter.test.d.ts +0 -1
- package/umd/typings/src/conversion/utils/stringifyPipelineJson.d.ts +0 -16
- package/umd/typings/src/conversion/utils/stringifyPipelineJson.test.d.ts +0 -1
- package/umd/typings/src/conversion/utils/titleToName.d.ts +0 -9
- package/umd/typings/src/conversion/utils/titleToName.test.d.ts +0 -1
- package/umd/typings/src/conversion/validation/_importPipeline.d.ts +0 -22
- package/umd/typings/src/conversion/validation/pipelineStringToJson-syntaxErrors.test.d.ts +0 -1
- package/umd/typings/src/conversion/validation/validatePipeline-logicErrors.test.d.ts +0 -4
- package/umd/typings/src/conversion/validation/validatePipeline.d.ts +0 -37
- package/umd/typings/src/conversion/validation/validatePipeline.test.d.ts +0 -1
- package/umd/typings/src/errors/CollectionError.d.ts +0 -9
- package/umd/typings/src/errors/EnvironmentMismatchError.d.ts +0 -9
- package/umd/typings/src/errors/LimitReachedError.d.ts +0 -9
- package/umd/typings/src/errors/NotFoundError.d.ts +0 -9
- package/umd/typings/src/errors/NotYetImplementedError.d.ts +0 -9
- package/umd/typings/src/errors/ParsingError.d.ts +0 -9
- package/umd/typings/src/errors/PipelineExecutionError.d.ts +0 -9
- package/umd/typings/src/errors/PipelineLogicError.d.ts +0 -9
- package/umd/typings/src/errors/ReferenceError.d.ts +0 -9
- package/umd/typings/src/errors/UnexpectedError.d.ts +0 -9
- package/umd/typings/src/errors/VersionMismatchError.d.ts +0 -10
- package/umd/typings/src/errors/_ExpectError.d.ts +0 -10
- package/umd/typings/src/execution/CommonExecutionToolsOptions.d.ts +0 -10
- package/umd/typings/src/execution/EmbeddingVector.d.ts +0 -8
- package/umd/typings/src/execution/ExecutionTools.d.ts +0 -33
- package/umd/typings/src/execution/LlmExecutionTools.d.ts +0 -72
- package/umd/typings/src/execution/PipelineExecutor.d.ts +0 -64
- package/umd/typings/src/execution/PromptResult.d.ts +0 -99
- package/umd/typings/src/execution/PromptResultUsage.d.ts +0 -29
- package/umd/typings/src/execution/ScriptExecutionTools.d.ts +0 -39
- package/umd/typings/src/execution/UncertainNumber.d.ts +0 -18
- package/umd/typings/src/execution/UserInterfaceTools.d.ts +0 -46
- package/umd/typings/src/execution/assertsExecutionSuccessful.d.ts +0 -12
- package/umd/typings/src/execution/createPipelineExecutor.d.ts +0 -71
- package/umd/typings/src/execution/embeddingVectorToString.d.ts +0 -7
- package/umd/typings/src/execution/translation/automatic-translate/automatic-translators/AutomaticTranslator.d.ts +0 -4
- package/umd/typings/src/execution/translation/automatic-translate/automatic-translators/DebugAutomaticTranslator.d.ts +0 -9
- package/umd/typings/src/execution/translation/automatic-translate/automatic-translators/FakeAutomaticTranslator.d.ts +0 -5
- package/umd/typings/src/execution/translation/automatic-translate/automatic-translators/LindatAutomaticTranslator.d.ts +0 -11
- package/umd/typings/src/execution/translation/automatic-translate/automatic-translators/TranslatorOptions.d.ts +0 -4
- package/umd/typings/src/execution/translation/automatic-translate/automatic-translators/utils/extractMultiplicatedOccurrence.d.ts +0 -7
- package/umd/typings/src/execution/translation/automatic-translate/automatic-translators/utils/extractMultiplicatedOccurrence.test.d.ts +0 -1
- package/umd/typings/src/execution/translation/automatic-translate/translateMessages.d.ts +0 -5
- package/umd/typings/src/execution/utils/addUsage.d.ts +0 -65
- package/umd/typings/src/execution/utils/addUsage.test.d.ts +0 -1
- package/umd/typings/src/execution/utils/checkExpectations.d.ts +0 -27
- package/umd/typings/src/execution/utils/checkExpectations.test.d.ts +0 -1
- package/umd/typings/src/execution/utils/computeUsageCounts.d.ts +0 -10
- package/umd/typings/src/execution/utils/forEachAsync.d.ts +0 -19
- package/umd/typings/src/execution/utils/uncertainNumber.d.ts +0 -9
- package/umd/typings/src/execution/utils/usageToHuman.d.ts +0 -17
- package/umd/typings/src/execution/utils/usageToHuman.test.d.ts +0 -1
- package/umd/typings/src/execution/utils/usageToWorktime.d.ts +0 -12
- package/umd/typings/src/execution/utils/usageToWorktime.test.d.ts +0 -1
- package/umd/typings/src/expectations/drafts/isDomainNameFree.d.ts +0 -6
- package/umd/typings/src/expectations/drafts/isGithubNameFree.d.ts +0 -6
- package/umd/typings/src/formats/_common/FormatDefinition.d.ts +0 -70
- package/umd/typings/src/formats/csv/ListFormatDefinition.d.ts +0 -12
- package/umd/typings/src/formats/index.d.ts +0 -4
- package/umd/typings/src/formats/json/JsonFormatDefinition.d.ts +0 -16
- package/umd/typings/src/formats/json/utils/isValidJsonString.d.ts +0 -6
- package/umd/typings/src/formats/json/utils/isValidJsonString.test.d.ts +0 -1
- package/umd/typings/src/formats/list/ListFormatDefinition.d.ts +0 -14
- package/umd/typings/src/formats/xml/XmlFormatDefinition.d.ts +0 -16
- package/umd/typings/src/knowledge/dialogs/callback/CallbackInterfaceTools.d.ts +0 -17
- package/umd/typings/src/knowledge/dialogs/callback/CallbackInterfaceToolsOptions.d.ts +0 -14
- package/umd/typings/src/knowledge/dialogs/simple-prompt/SimplePromptInterfaceTools.d.ts +0 -22
- package/umd/typings/src/knowledge/dialogs/user-interface-execution-tools.test.d.ts +0 -1
- package/umd/typings/src/knowledge/prepare-knowledge/_common/Scraper.d.ts +0 -37
- package/umd/typings/src/knowledge/prepare-knowledge/_common/prepareKnowledgePieces.d.ts +0 -18
- package/umd/typings/src/knowledge/prepare-knowledge/_common/prepareKnowledgePieces.test.d.ts +0 -1
- package/umd/typings/src/knowledge/prepare-knowledge/markdown/playground/markdown-knowledge-playground.d.ts +0 -2
- package/umd/typings/src/knowledge/prepare-knowledge/markdown/prepareKnowledgeFromMarkdown.d.ts +0 -14
- package/umd/typings/src/knowledge/prepare-knowledge/markdown/prepareKnowledgeFromMarkdown.test.d.ts +0 -4
- package/umd/typings/src/knowledge/prepare-knowledge/pdf/prepareKnowledgeFromPdf.d.ts +0 -13
- package/umd/typings/src/knowledge/prepare-knowledge/pdf/prepareKnowledgeFromPdf.test.d.ts +0 -1
- package/umd/typings/src/llm-providers/_common/createLlmToolsFromEnv.d.ts +0 -37
- package/umd/typings/src/llm-providers/_common/getLlmToolsForCli.d.ts +0 -20
- package/umd/typings/src/llm-providers/_common/getLlmToolsForTestingAndScriptsAndPlayground.d.ts +0 -21
- package/umd/typings/src/llm-providers/_common/utils/cache/CacheItem.d.ts +0 -29
- package/umd/typings/src/llm-providers/_common/utils/cache/CacheLlmToolsOptions.d.ts +0 -16
- package/umd/typings/src/llm-providers/_common/utils/cache/cacheLlmTools.d.ts +0 -19
- package/umd/typings/src/llm-providers/_common/utils/count-total-usage/LlmExecutionToolsWithTotalUsage.d.ts +0 -15
- package/umd/typings/src/llm-providers/_common/utils/count-total-usage/countTotalUsage.d.ts +0 -17
- package/umd/typings/src/llm-providers/_common/utils/count-total-usage/limitTotalUsage.d.ts +0 -36
- package/umd/typings/src/llm-providers/anthropic-claude/AnthropicClaudeExecutionTools.d.ts +0 -52
- package/umd/typings/src/llm-providers/anthropic-claude/AnthropicClaudeExecutionToolsOptions.d.ts +0 -12
- package/umd/typings/src/llm-providers/anthropic-claude/anthropic-claude-models.d.ts +0 -22
- package/umd/typings/src/llm-providers/anthropic-claude/playground/playground.d.ts +0 -6
- package/umd/typings/src/llm-providers/azure-openai/AzureOpenAiExecutionTools.d.ts +0 -50
- package/umd/typings/src/llm-providers/azure-openai/AzureOpenAiExecutionToolsOptions.d.ts +0 -36
- package/umd/typings/src/llm-providers/azure-openai/playground/playground.d.ts +0 -5
- package/umd/typings/src/llm-providers/langtail/LangtailExecutionTools.d.ts +0 -17
- package/umd/typings/src/llm-providers/langtail/LangtailExecutionToolsOptions.d.ts +0 -13
- package/umd/typings/src/llm-providers/langtail/playground/playground.d.ts +0 -2
- package/umd/typings/src/llm-providers/mocked/MockedEchoLlmExecutionTools.d.ts +0 -36
- package/umd/typings/src/llm-providers/mocked/MockedFackedLlmExecutionTools.d.ts +0 -40
- package/umd/typings/src/llm-providers/mocked/fakeTextToExpectations.d.ts +0 -14
- package/umd/typings/src/llm-providers/mocked/test/fakeTextToExpectations.test.d.ts +0 -1
- package/umd/typings/src/llm-providers/mocked/test/faked-completion.test.d.ts +0 -1
- package/umd/typings/src/llm-providers/mocked/test/joker.test.d.ts +0 -4
- package/umd/typings/src/llm-providers/mocked/test/mocked-chat.test.d.ts +0 -5
- package/umd/typings/src/llm-providers/mocked/test/mocked-completion.test.d.ts +0 -4
- package/umd/typings/src/llm-providers/multiple/MultipleLlmExecutionTools.d.ts +0 -54
- package/umd/typings/src/llm-providers/multiple/joinLlmExecutionTools.d.ts +0 -21
- package/umd/typings/src/llm-providers/multiple/playground/playground.d.ts +0 -2
- package/umd/typings/src/llm-providers/openai/OpenAiExecutionTools.d.ts +0 -68
- package/umd/typings/src/llm-providers/openai/OpenAiExecutionToolsOptions.d.ts +0 -20
- package/umd/typings/src/llm-providers/openai/computeOpenaiUsage.d.ts +0 -14
- package/umd/typings/src/llm-providers/openai/computeOpenaiUsage.test.d.ts +0 -1
- package/umd/typings/src/llm-providers/openai/computeUsage.d.ts +0 -16
- package/umd/typings/src/llm-providers/openai/computeUsage.test.d.ts +0 -1
- package/umd/typings/src/llm-providers/openai/openai-models.d.ts +0 -29
- package/umd/typings/src/llm-providers/openai/playground/playground.d.ts +0 -5
- package/umd/typings/src/llm-providers/remote/RemoteLlmExecutionTools.d.ts +0 -56
- package/umd/typings/src/llm-providers/remote/RemoteLlmExecutionToolsOptions.d.ts +0 -26
- package/umd/typings/src/llm-providers/remote/interfaces/Promptbook_Server_Error.d.ts +0 -11
- package/umd/typings/src/llm-providers/remote/interfaces/Promptbook_Server_Progress.d.ts +0 -12
- package/umd/typings/src/llm-providers/remote/interfaces/Promptbook_Server_Request.d.ts +0 -17
- package/umd/typings/src/llm-providers/remote/interfaces/Promptbook_Server_Response.d.ts +0 -12
- package/umd/typings/src/llm-providers/remote/interfaces/RemoteServerOptions.d.ts +0 -37
- package/umd/typings/src/llm-providers/remote/startRemoteServer.d.ts +0 -21
- package/umd/typings/src/personas/preparePersona.d.ts +0 -15
- package/umd/typings/src/personas/preparePersona.test.d.ts +0 -1
- package/umd/typings/src/postprocessing/utils/extractBlock.d.ts +0 -17
- package/umd/typings/src/prepare/PrepareOptions.d.ts +0 -22
- package/umd/typings/src/prepare/isPipelinePrepared.d.ts +0 -15
- package/umd/typings/src/prepare/isPipelinePrepared.test.d.ts +0 -1
- package/umd/typings/src/prepare/preparePipeline.d.ts +0 -16
- package/umd/typings/src/prepare/prepareTemplates.d.ts +0 -32
- package/umd/typings/src/prepare/unpreparePipeline.d.ts +0 -12
- package/umd/typings/src/scripting/_test/custom-function-async.test.ts.test.d.ts +0 -1
- package/umd/typings/src/scripting/_test/custom-function-missing.test.d.ts +0 -1
- package/umd/typings/src/scripting/_test/custom-function-with-dependencies.test.d.ts +0 -1
- package/umd/typings/src/scripting/_test/custom-function.test.d.ts +0 -1
- package/umd/typings/src/scripting/_test/postprocessing.test.d.ts +0 -1
- package/umd/typings/src/scripting/_test/script-execution-errors.test.d.ts +0 -1
- package/umd/typings/src/scripting/_test/script-execution-tools.test.d.ts +0 -1
- package/umd/typings/src/scripting/javascript/JavascriptEvalExecutionTools.d.ts +0 -22
- package/umd/typings/src/scripting/javascript/JavascriptEvalExecutionTools.test.d.ts +0 -4
- package/umd/typings/src/scripting/javascript/JavascriptExecutionTools.d.ts +0 -8
- package/umd/typings/src/scripting/javascript/JavascriptExecutionToolsOptions.d.ts +0 -26
- package/umd/typings/src/scripting/javascript/postprocessing-functions.d.ts +0 -51
- package/umd/typings/src/scripting/javascript/utils/preserve.d.ts +0 -12
- package/umd/typings/src/scripting/javascript/utils/unknownToString.d.ts +0 -8
- package/umd/typings/src/scripting/python/PythonExecutionTools.d.ts +0 -16
- package/umd/typings/src/scripting/typescript/TypescriptExecutionTools.d.ts +0 -16
- package/umd/typings/src/storage/_common/PromptbookStorage.d.ts +0 -24
- package/umd/typings/src/storage/_common/PromptbookStorage.test-type.d.ts +0 -5
- package/umd/typings/src/storage/files-storage/FilesStorage.d.ts +0 -31
- package/umd/typings/src/storage/files-storage/FilesStorageOptions.d.ts +0 -10
- package/umd/typings/src/storage/files-storage/utils/nameToSubfolderPath.d.ts +0 -7
- package/umd/typings/src/storage/files-storage/utils/nameToSubfolderPath.test.d.ts +0 -1
- package/umd/typings/src/storage/local-storage/getLocalStorage.d.ts +0 -10
- package/umd/typings/src/storage/local-storage/getSessionStorage.d.ts +0 -10
- package/umd/typings/src/storage/memory/MemoryStorage.d.ts +0 -33
- package/umd/typings/src/storage/utils/PrefixStorage.d.ts +0 -25
- package/umd/typings/src/storage/utils/makePromptbookStorageFromWebStorage.d.ts +0 -11
- package/umd/typings/src/types/Arrayable.d.ts +0 -10
- package/umd/typings/src/types/ModelRequirements.d.ts +0 -102
- package/umd/typings/src/types/ModelVariant.d.ts +0 -14
- package/umd/typings/src/types/PipelineJson/Expectations.d.ts +0 -32
- package/umd/typings/src/types/PipelineJson/KnowledgePieceJson.d.ts +0 -70
- package/umd/typings/src/types/PipelineJson/KnowledgeSourceJson.d.ts +0 -27
- package/umd/typings/src/types/PipelineJson/LlmTemplateJson.d.ts +0 -25
- package/umd/typings/src/types/PipelineJson/PersonaJson.d.ts +0 -41
- package/umd/typings/src/types/PipelineJson/PipelineJson.d.ts +0 -87
- package/umd/typings/src/types/PipelineJson/PreparationJson.d.ts +0 -22
- package/umd/typings/src/types/PipelineJson/PromptDialogJson.d.ts +0 -13
- package/umd/typings/src/types/PipelineJson/PromptTemplateJson.d.ts +0 -13
- package/umd/typings/src/types/PipelineJson/PromptTemplateJsonCommon.d.ts +0 -96
- package/umd/typings/src/types/PipelineJson/PromptTemplateParameterJson.d.ts +0 -36
- package/umd/typings/src/types/PipelineJson/ScriptJson.d.ts +0 -19
- package/umd/typings/src/types/PipelineJson/SimpleTemplateJson.d.ts +0 -12
- package/umd/typings/src/types/PipelineString.d.ts +0 -12
- package/umd/typings/src/types/Prompt.d.ts +0 -108
- package/umd/typings/src/types/ScriptLanguage.d.ts +0 -9
- package/umd/typings/src/types/TaskProgress.d.ts +0 -43
- package/umd/typings/src/types/execution-report/ExecutionReportJson.d.ts +0 -58
- package/umd/typings/src/types/execution-report/ExecutionReportString.d.ts +0 -16
- package/umd/typings/src/types/execution-report/ExecutionReportStringOptions.d.ts +0 -25
- package/umd/typings/src/types/execution-report/config.d.ts +0 -8
- package/umd/typings/src/types/execution-report/countWorkingDuration.d.ts +0 -7
- package/umd/typings/src/types/execution-report/countWorkingDuration.test.d.ts +0 -1
- package/umd/typings/src/types/execution-report/executionReportJsonToString.d.ts +0 -13
- package/umd/typings/src/types/typeAliasEmoji.d.ts +0 -9
- package/umd/typings/src/types/typeAliases.d.ts +0 -586
- package/umd/typings/src/utils/FromtoItems.d.ts +0 -19
- package/umd/typings/src/utils/arrayableToArray.d.ts +0 -11
- package/umd/typings/src/utils/arrayableToArray.test.d.ts +0 -1
- package/umd/typings/src/utils/currentDate.d.ts +0 -8
- package/umd/typings/src/utils/deepClone.d.ts +0 -10
- package/umd/typings/src/utils/deepFreeze.d.ts +0 -22
- package/umd/typings/src/utils/emojis.d.ts +0 -23
- package/umd/typings/src/utils/expectation-counters/countCharacters.d.ts +0 -7
- package/umd/typings/src/utils/expectation-counters/countCharacters.test.d.ts +0 -1
- package/umd/typings/src/utils/expectation-counters/countLines.d.ts +0 -7
- package/umd/typings/src/utils/expectation-counters/countLines.test.d.ts +0 -1
- package/umd/typings/src/utils/expectation-counters/countPages.d.ts +0 -7
- package/umd/typings/src/utils/expectation-counters/countPages.test.d.ts +0 -1
- package/umd/typings/src/utils/expectation-counters/countParagraphs.d.ts +0 -7
- package/umd/typings/src/utils/expectation-counters/countParagraphs.test.d.ts +0 -1
- package/umd/typings/src/utils/expectation-counters/countSentences.d.ts +0 -13
- package/umd/typings/src/utils/expectation-counters/countSentences.test.d.ts +0 -1
- package/umd/typings/src/utils/expectation-counters/countWords.d.ts +0 -7
- package/umd/typings/src/utils/expectation-counters/countWords.test.d.ts +0 -1
- package/umd/typings/src/utils/expectation-counters/index.d.ts +0 -8
- package/umd/typings/src/utils/extractParameterNames.d.ts +0 -10
- package/umd/typings/src/utils/extractParameterNames.test.d.ts +0 -1
- package/umd/typings/src/utils/formatNumber.d.ts +0 -6
- package/umd/typings/src/utils/formatNumber.test.d.ts +0 -1
- package/umd/typings/src/utils/getCurrentIsoDate.d.ts +0 -7
- package/umd/typings/src/utils/isRunningInWhatever.d.ts +0 -18
- package/umd/typings/src/utils/markdown/addAutoGeneratedSection.d.ts +0 -14
- package/umd/typings/src/utils/markdown/addAutoGeneratedSection.test.d.ts +0 -1
- package/umd/typings/src/utils/markdown/createMarkdownChart.d.ts +0 -38
- package/umd/typings/src/utils/markdown/createMarkdownChart.test.d.ts +0 -1
- package/umd/typings/src/utils/markdown/createMarkdownTable.d.ts +0 -11
- package/umd/typings/src/utils/markdown/createMarkdownTable.test.d.ts +0 -1
- package/umd/typings/src/utils/markdown/escapeMarkdownBlock.d.ts +0 -11
- package/umd/typings/src/utils/markdown/escapeMarkdownBlock.test.d.ts +0 -1
- package/umd/typings/src/utils/markdown/extractAllBlocksFromMarkdown-real.test.d.ts +0 -1
- package/umd/typings/src/utils/markdown/extractAllBlocksFromMarkdown.d.ts +0 -34
- package/umd/typings/src/utils/markdown/extractAllBlocksFromMarkdown.test.d.ts +0 -1
- package/umd/typings/src/utils/markdown/extractAllListItemsFromMarkdown.d.ts +0 -15
- package/umd/typings/src/utils/markdown/extractAllListItemsFromMarkdown.test.d.ts +0 -1
- package/umd/typings/src/utils/markdown/extractOneBlockFromMarkdown.d.ts +0 -20
- package/umd/typings/src/utils/markdown/extractOneBlockFromMarkdown.test.d.ts +0 -1
- package/umd/typings/src/utils/markdown/flattenMarkdown.d.ts +0 -17
- package/umd/typings/src/utils/markdown/flattenMarkdown.test.d.ts +0 -1
- package/umd/typings/src/utils/markdown/parseMarkdownSection.d.ts +0 -34
- package/umd/typings/src/utils/markdown/parseMarkdownSection.test.d.ts +0 -1
- package/umd/typings/src/utils/markdown/prettifyMarkdown.d.ts +0 -9
- package/umd/typings/src/utils/markdown/prettifyMarkdown.test.d.ts +0 -1
- package/umd/typings/src/utils/markdown/removeContentComments.d.ts +0 -10
- package/umd/typings/src/utils/markdown/removeContentComments.test.d.ts +0 -1
- package/umd/typings/src/utils/markdown/removeMarkdownFormatting.d.ts +0 -9
- package/umd/typings/src/utils/markdown/removeMarkdownFormatting.test.d.ts +0 -1
- package/umd/typings/src/utils/markdown/splitMarkdownIntoSections.d.ts +0 -15
- package/umd/typings/src/utils/markdown/splitMarkdownIntoSections.test.d.ts +0 -1
- package/umd/typings/src/utils/normalization/DIACRITIC_VARIANTS_LETTERS.d.ts +0 -12
- package/umd/typings/src/utils/normalization/IKeywords.d.ts +0 -21
- package/umd/typings/src/utils/normalization/capitalize.d.ts +0 -6
- package/umd/typings/src/utils/normalization/capitalize.test.d.ts +0 -1
- package/umd/typings/src/utils/normalization/decapitalize.d.ts +0 -6
- package/umd/typings/src/utils/normalization/decapitalize.test.d.ts +0 -1
- package/umd/typings/src/utils/normalization/isValidKeyword.d.ts +0 -10
- package/umd/typings/src/utils/normalization/isValidKeyword.test.d.ts +0 -1
- package/umd/typings/src/utils/normalization/nameToUriPart.d.ts +0 -9
- package/umd/typings/src/utils/normalization/nameToUriPart.test.d.ts +0 -1
- package/umd/typings/src/utils/normalization/nameToUriParts.d.ts +0 -9
- package/umd/typings/src/utils/normalization/nameToUriParts.test.d.ts +0 -1
- package/umd/typings/src/utils/normalization/normalize-to-kebab-case.d.ts +0 -18
- package/umd/typings/src/utils/normalization/normalize-to-kebab-case.test.d.ts +0 -1
- package/umd/typings/src/utils/normalization/normalizeTo_PascalCase.d.ts +0 -17
- package/umd/typings/src/utils/normalization/normalizeTo_PascalCase.test.d.ts +0 -1
- package/umd/typings/src/utils/normalization/normalizeTo_SCREAMING_CASE.d.ts +0 -26
- package/umd/typings/src/utils/normalization/normalizeTo_SCREAMING_CASE.test.d.ts +0 -1
- package/umd/typings/src/utils/normalization/normalizeTo_camelCase.d.ts +0 -22
- package/umd/typings/src/utils/normalization/normalizeTo_camelCase.test.d.ts +0 -1
- package/umd/typings/src/utils/normalization/normalizeTo_snake_case.d.ts +0 -17
- package/umd/typings/src/utils/normalization/normalizeTo_snake_case.test.d.ts +0 -1
- package/umd/typings/src/utils/normalization/normalizeWhitespaces.d.ts +0 -4
- package/umd/typings/src/utils/normalization/normalizeWhitespaces.test.d.ts +0 -1
- package/umd/typings/src/utils/normalization/parseKeywords.d.ts +0 -16
- package/umd/typings/src/utils/normalization/parseKeywords.test.d.ts +0 -1
- package/umd/typings/src/utils/normalization/parseKeywordsFromString.d.ts +0 -9
- package/umd/typings/src/utils/normalization/parseKeywordsFromString.test.d.ts +0 -1
- package/umd/typings/src/utils/normalization/removeDiacritics.d.ts +0 -11
- package/umd/typings/src/utils/normalization/removeDiacritics.test.d.ts +0 -1
- package/umd/typings/src/utils/normalization/searchKeywords.d.ts +0 -10
- package/umd/typings/src/utils/normalization/searchKeywords.test.d.ts +0 -1
- package/umd/typings/src/utils/organization/TODO_USE.d.ts +0 -12
- package/umd/typings/src/utils/organization/TODO_any.d.ts +0 -6
- package/umd/typings/src/utils/organization/TODO_object.d.ts +0 -6
- package/umd/typings/src/utils/organization/TODO_unknown.d.ts +0 -6
- package/umd/typings/src/utils/organization/___.d.ts +0 -6
- package/umd/typings/src/utils/organization/just.d.ts +0 -14
- package/umd/typings/src/utils/organization/keepUnused.d.ts +0 -16
- package/umd/typings/src/utils/organization/really_any.d.ts +0 -6
- package/umd/typings/src/utils/organization/really_unknown.d.ts +0 -6
- package/umd/typings/src/utils/parseNumber.d.ts +0 -16
- package/umd/typings/src/utils/parseNumber.test.d.ts +0 -1
- package/umd/typings/src/utils/random/randomSeed.d.ts +0 -8
- package/umd/typings/src/utils/removeEmojis.d.ts +0 -8
- package/umd/typings/src/utils/removeEmojis.test.d.ts +0 -1
- package/umd/typings/src/utils/removeQuotes.d.ts +0 -14
- package/umd/typings/src/utils/removeQuotes.test.d.ts +0 -1
- package/umd/typings/src/utils/replaceParameters.d.ts +0 -12
- package/umd/typings/src/utils/replaceParameters.test.d.ts +0 -1
- package/umd/typings/src/utils/sets/difference.d.ts +0 -10
- package/umd/typings/src/utils/sets/difference.test.d.ts +0 -1
- package/umd/typings/src/utils/sets/intersection.d.ts +0 -7
- package/umd/typings/src/utils/sets/intersection.test.d.ts +0 -1
- package/umd/typings/src/utils/sets/union.d.ts +0 -7
- package/umd/typings/src/utils/sets/union.test.d.ts +0 -1
- package/umd/typings/src/utils/trimCodeBlock.d.ts +0 -9
- package/umd/typings/src/utils/trimCodeBlock.test.d.ts +0 -1
- package/umd/typings/src/utils/trimEndOfCodeBlock.d.ts +0 -9
- package/umd/typings/src/utils/trimEndOfCodeBlock.test.d.ts +0 -1
- package/umd/typings/src/utils/unwrapResult.d.ts +0 -37
- package/umd/typings/src/utils/unwrapResult.test.d.ts +0 -1
- package/umd/typings/src/utils/validators/email/isValidEmail.d.ts +0 -6
- package/umd/typings/src/utils/validators/email/isValidEmail.test.d.ts +0 -1
- package/umd/typings/src/utils/validators/filePath/isValidFilePath.d.ts +0 -9
- package/umd/typings/src/utils/validators/filePath/isValidFilePath.test.d.ts +0 -1
- package/umd/typings/src/utils/validators/javascriptName/isValidJavascriptName.d.ts +0 -10
- package/umd/typings/src/utils/validators/javascriptName/isValidJavascriptName.test.d.ts +0 -1
- package/umd/typings/src/utils/validators/semanticVersion/isValidPromptbookVersion.d.ts +0 -15
- package/umd/typings/src/utils/validators/semanticVersion/isValidPromptbookVersion.test.d.ts +0 -1
- package/umd/typings/src/utils/validators/semanticVersion/isValidSemanticVersion.d.ts +0 -12
- package/umd/typings/src/utils/validators/semanticVersion/isValidSemanticVersion.test.d.ts +0 -1
- package/umd/typings/src/utils/validators/url/isHostnameOnPrivateNetwork.d.ts +0 -11
- package/umd/typings/src/utils/validators/url/isHostnameOnPrivateNetwork.test.d.ts +0 -1
- package/umd/typings/src/utils/validators/url/isUrlOnPrivateNetwork.d.ts +0 -13
- package/umd/typings/src/utils/validators/url/isUrlOnPrivateNetwork.test.d.ts +0 -1
- package/umd/typings/src/utils/validators/url/isValidPipelineUrl.d.ts +0 -15
- package/umd/typings/src/utils/validators/url/isValidPipelineUrl.test.d.ts +0 -1
- package/umd/typings/src/utils/validators/url/isValidUrl.d.ts +0 -13
- package/umd/typings/src/utils/validators/url/isValidUrl.test.d.ts +0 -1
- package/umd/typings/src/utils/validators/uuid/isValidUuid.d.ts +0 -8
- package/umd/typings/src/utils/validators/uuid/isValidUuid.test.d.ts +0 -1
- package/umd/typings/src/version.d.ts +0 -6
package/umd/index.umd.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('colors'), require('fs/promises'), require('path'), require('spacetrim'), require('prettier'), require('prettier/parser-html'), require('dotenv'), require('@anthropic-ai/sdk'), require('openai'), require('crypto-js/enc-hex'), require('crypto-js/sha256')) :
|
|
3
|
-
typeof define === 'function' && define.amd ? define(['exports', 'colors', 'fs/promises', 'path', 'spacetrim', 'prettier', 'prettier/parser-html', 'dotenv', '@anthropic-ai/sdk', 'openai', 'crypto-js/enc-hex', 'crypto-js/sha256'], factory) :
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["promptbook-node"] = {}, global.colors, global.promises, global.path, global.spaceTrim, global.prettier, global.parserHtml, global.dotenv, global.Anthropic, global.OpenAI, global.hexEncoder, global.sha256));
|
|
5
|
-
})(this, (function (exports, colors, promises, path, spaceTrim, prettier, parserHtml, dotenv, Anthropic, OpenAI, hexEncoder, sha256) { 'use strict';
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('colors'), require('fs/promises'), require('path'), require('spacetrim'), require('prettier'), require('prettier/parser-html'), require('path/posix'), require('dotenv'), require('@anthropic-ai/sdk'), require('openai'), require('crypto-js/enc-hex'), require('crypto-js/sha256')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define(['exports', 'colors', 'fs/promises', 'path', 'spacetrim', 'prettier', 'prettier/parser-html', 'path/posix', 'dotenv', '@anthropic-ai/sdk', 'openai', 'crypto-js/enc-hex', 'crypto-js/sha256'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["promptbook-node"] = {}, global.colors, global.promises, global.path, global.spaceTrim, global.prettier, global.parserHtml, global.posix, global.dotenv, global.Anthropic, global.OpenAI, global.hexEncoder, global.sha256));
|
|
5
|
+
})(this, (function (exports, colors, promises, path, spaceTrim, prettier, parserHtml, posix, dotenv, Anthropic, OpenAI, hexEncoder, sha256) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
8
|
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
/**
|
|
37
37
|
* The version of the Promptbook library
|
|
38
38
|
*/
|
|
39
|
-
var PROMPTBOOK_VERSION = '0.63.0-
|
|
39
|
+
var PROMPTBOOK_VERSION = '0.63.0-2';
|
|
40
40
|
// TODO: !!!! List here all the versions and annotate + put into script
|
|
41
41
|
|
|
42
42
|
/*! *****************************************************************************
|
|
@@ -161,9 +161,10 @@
|
|
|
161
161
|
/**
|
|
162
162
|
* @@@
|
|
163
163
|
*
|
|
164
|
-
* @returns The same object as the input, but deeply frozen
|
|
165
|
-
*
|
|
166
164
|
* Note: This function mutates the object and returns the original (but mutated-deep-freezed) object
|
|
165
|
+
*
|
|
166
|
+
* @returns The same object as the input, but deeply frozen
|
|
167
|
+
* @public exported from `@promptbook/utils`
|
|
167
168
|
*/
|
|
168
169
|
function deepFreeze(objectValue) {
|
|
169
170
|
var e_1, _a;
|
|
@@ -190,10 +191,10 @@
|
|
|
190
191
|
* @@@
|
|
191
192
|
* @@@
|
|
192
193
|
*
|
|
193
|
-
* @returns The same object as the input, but deeply frozen
|
|
194
|
-
* @public exported from `@promptbook/utils`
|
|
195
|
-
*
|
|
196
194
|
* Note: This function mutates the object and returns the original (but mutated-deep-freezed) object
|
|
195
|
+
*
|
|
196
|
+
* @returns The same object as the input, but deeply frozen
|
|
197
|
+
* @private this is in comparison to `deepFreeze` a more specific utility and maybe not very good practice to use without specific reason and considerations
|
|
197
198
|
*/
|
|
198
199
|
function deepFreezeWithSameType(objectValue) {
|
|
199
200
|
return deepFreeze(objectValue);
|
|
@@ -205,7 +206,7 @@
|
|
|
205
206
|
/**
|
|
206
207
|
* The maximum number of iterations for a loops
|
|
207
208
|
*
|
|
208
|
-
* @private within the repository - too low-level in comparison
|
|
209
|
+
* @private within the repository - too low-level in comparison with other `MAX_...`
|
|
209
210
|
*/
|
|
210
211
|
var LOOP_LIMIT = 1000;
|
|
211
212
|
/**
|
|
@@ -234,6 +235,8 @@
|
|
|
234
235
|
var PIPELINE_COLLECTION_BASE_FILENAME = "index";
|
|
235
236
|
/**
|
|
236
237
|
* Nonce which is used for replacing things in strings
|
|
238
|
+
*
|
|
239
|
+
* @private within the repository
|
|
237
240
|
*/
|
|
238
241
|
var REPLACING_NONCE = 'u$k42k%!V2zo34w7Fu#@QUHYPW';
|
|
239
242
|
/**
|
|
@@ -263,13 +266,6 @@
|
|
|
263
266
|
* @private within the repository
|
|
264
267
|
*/
|
|
265
268
|
var RESERVED_PARAMETER_RESTRICTED = 'RESTRICTED-' + REPLACING_NONCE;
|
|
266
|
-
/*
|
|
267
|
-
TODO: !!! Just testing false-negative detection of [🟡][🟢][🔵][⚪] leak
|
|
268
|
-
*/
|
|
269
|
-
// [🟡][🟢][🔵][⚪]
|
|
270
|
-
/**
|
|
271
|
-
* TODO: !!!!!! Check that all @private contains some normalized explanation
|
|
272
|
-
*/
|
|
273
269
|
|
|
274
270
|
/**
|
|
275
271
|
* Prettify the html code
|
|
@@ -500,7 +496,7 @@
|
|
|
500
496
|
return pipelineString;
|
|
501
497
|
}
|
|
502
498
|
/**
|
|
503
|
-
* @private internal
|
|
499
|
+
* @private internal utility of `pipelineJsonToString`
|
|
504
500
|
*/
|
|
505
501
|
function promptTemplateParameterJsonToString(promptTemplateParameterJson) {
|
|
506
502
|
var name = promptTemplateParameterJson.name, description = promptTemplateParameterJson.description;
|
|
@@ -713,7 +709,7 @@
|
|
|
713
709
|
});
|
|
714
710
|
}
|
|
715
711
|
|
|
716
|
-
var PipelineCollection = [{title:"Prepare Knowledge from Markdown",pipelineUrl:"https://promptbook.studio/promptbook/prepare-knowledge-from-markdown.ptbk.md",promptbookVersion:"0.63.0-
|
|
712
|
+
var PipelineCollection = [{title:"Prepare Knowledge from Markdown",pipelineUrl:"https://promptbook.studio/promptbook/prepare-knowledge-from-markdown.ptbk.md",promptbookVersion:"0.63.0-2",parameters:[{name:"knowledgeContent",description:"Markdown document content",isInput:true,isOutput:false},{name:"knowledgePieces",description:"The knowledge JSON object",isInput:false,isOutput:true}],promptTemplates:[{blockType:"PROMPT_TEMPLATE",name:"knowledge",title:"Knowledge",modelRequirements:{modelVariant:"CHAT",modelName:"claude-3-opus-20240229"},content:"You are experienced data researcher, extract the important knowledge from the document.\n\n# Rules\n\n- Make pieces of information concise, clear, and easy to understand\n- One piece of information should be approximately 1 paragraph\n- Divide the paragraphs by markdown horizontal lines ---\n- Omit irrelevant information\n- Group redundant information\n- Write just extracted information, nothing else\n\n# The document\n\nTake information from this document:\n\n> {knowledgeContent}",dependentParameterNames:["knowledgeContent"],resultingParameterName:"knowledgePieces"}],knowledgeSources:[],knowledgePieces:[],personas:[],preparations:[{id:1,promptbookVersion:"0.63.0-2",usage:{price:{value:0},input:{tokensCount:{value:0},charactersCount:{value:0},wordsCount:{value:0},sentencesCount:{value:0},linesCount:{value:0},paragraphsCount:{value:0},pagesCount:{value:0}},output:{tokensCount:{value:0},charactersCount:{value:0},wordsCount:{value:0},sentencesCount:{value:0},linesCount:{value:0},paragraphsCount:{value:0},pagesCount:{value:0}}}}],sourceFile:"./promptbook-collection/prepare-knowledge-from-markdown.ptbk.md"},{title:"Prepare Keywords",pipelineUrl:"https://promptbook.studio/promptbook/prepare-knowledge-keywords.ptbk.md",promptbookVersion:"0.63.0-2",parameters:[{name:"knowledgePieceContent",description:"The content",isInput:true,isOutput:false},{name:"keywords",description:"Keywords separated by comma",isInput:false,isOutput:true}],promptTemplates:[{blockType:"PROMPT_TEMPLATE",name:"knowledge",title:"Knowledge",modelRequirements:{modelVariant:"CHAT",modelName:"claude-3-opus-20240229"},content:"You are experienced data researcher, detect the important keywords in the document.\n\n# Rules\n\n- Write just keywords separated by comma\n\n# The document\n\nTake information from this document:\n\n> {knowledgePieceContent}",dependentParameterNames:["knowledgePieceContent"],resultingParameterName:"keywords"}],knowledgeSources:[],knowledgePieces:[],personas:[],preparations:[{id:1,promptbookVersion:"0.63.0-2",usage:{price:{value:0},input:{tokensCount:{value:0},charactersCount:{value:0},wordsCount:{value:0},sentencesCount:{value:0},linesCount:{value:0},paragraphsCount:{value:0},pagesCount:{value:0}},output:{tokensCount:{value:0},charactersCount:{value:0},wordsCount:{value:0},sentencesCount:{value:0},linesCount:{value:0},paragraphsCount:{value:0},pagesCount:{value:0}}}}],sourceFile:"./promptbook-collection/prepare-knowledge-keywords.ptbk.md"},{title:"Prepare Title",pipelineUrl:"https://promptbook.studio/promptbook/prepare-knowledge-title.ptbk.md",promptbookVersion:"0.63.0-2",parameters:[{name:"knowledgePieceContent",description:"The content",isInput:true,isOutput:false},{name:"title",description:"The title of the document",isInput:false,isOutput:true}],promptTemplates:[{blockType:"PROMPT_TEMPLATE",name:"knowledge",title:"Knowledge",modelRequirements:{modelVariant:"CHAT",modelName:"claude-3-opus-20240229"},content:"You are experienced content creator, write best title for the document.\n\n# Rules\n\n- Write just title, nothing else\n- Title should be concise and clear\n- Write maximum 5 words for the title\n\n# The document\n\n> {knowledgePieceContent}",expectations:{words:{min:1,max:8}},dependentParameterNames:["knowledgePieceContent"],resultingParameterName:"title"}],knowledgeSources:[],knowledgePieces:[],personas:[],preparations:[{id:1,promptbookVersion:"0.63.0-2",usage:{price:{value:0},input:{tokensCount:{value:0},charactersCount:{value:0},wordsCount:{value:0},sentencesCount:{value:0},linesCount:{value:0},paragraphsCount:{value:0},pagesCount:{value:0}},output:{tokensCount:{value:0},charactersCount:{value:0},wordsCount:{value:0},sentencesCount:{value:0},linesCount:{value:0},paragraphsCount:{value:0},pagesCount:{value:0}}}}],sourceFile:"./promptbook-collection/prepare-knowledge-title.ptbk.md"},{title:"Prepare Keywords",pipelineUrl:"https://promptbook.studio/promptbook/prepare-persona.ptbk.md",promptbookVersion:"0.63.0-2",parameters:[{name:"availableModelNames",description:"List of available model names separated by comma (,)",isInput:true,isOutput:false},{name:"personaDescription",description:"Description of the persona",isInput:true,isOutput:false},{name:"modelRequirements",description:"Specific requirements for the model",isInput:false,isOutput:true}],promptTemplates:[{blockType:"PROMPT_TEMPLATE",name:"make-model-requirements",title:"Make modelRequirements",modelRequirements:{modelVariant:"CHAT",modelName:"gpt-4-turbo"},content:"You are experienced AI engineer, you need to create virtual assistant.\nWrite\n\n## Sample\n\n```json\n{\n\"modelName\": \"gpt-4o\",\n\"systemMessage\": \"You are experienced AI engineer and helpfull assistant.\",\n\"temperature\": 0.7\n}\n```\n\n## Instructions\n\n### Option `modelName`\n\nPick from the following models:\n\n- {availableModelNames}\n\n### Option `systemMessage`\n\nThe system message is used to communicate instructions or provide context to the model at the beginning of a conversation. It is displayed in a different format compared to user messages, helping the model understand its role in the conversation. The system message typically guides the model's behavior, sets the tone, or specifies desired output from the model. By utilizing the system message effectively, users can steer the model towards generating more accurate and relevant responses.\n\nFor example:\n\n> You are an experienced AI engineer and helpful assistant.\n\n> You are a friendly and knowledgeable chatbot.\n\n### Option `temperature`\n\nThe sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. If set to 0, the model will use log probability to automatically increase the temperature until certain thresholds are hit.\n\nYou can pick a value between 0 and 2. For example:\n\n- `0.1`: Low temperature, extremely conservative and deterministic\n- `0.5`: Medium temperature, balanced between conservative and creative\n- `1.0`: High temperature, creative and bit random\n- `1.5`: Very high temperature, extremely creative and often chaotic and unpredictable\n- `2.0`: Maximum temperature, completely random and unpredictable, for some extreme creative use cases\n\n# The assistant\n\nTake this description of the persona:\n\n> {personaDescription}",expectFormat:"JSON",dependentParameterNames:["availableModelNames","personaDescription"],resultingParameterName:"modelRequirements"}],knowledgeSources:[],knowledgePieces:[],personas:[],preparations:[{id:1,promptbookVersion:"0.63.0-2",usage:{price:{value:0},input:{tokensCount:{value:0},charactersCount:{value:0},wordsCount:{value:0},sentencesCount:{value:0},linesCount:{value:0},paragraphsCount:{value:0},pagesCount:{value:0}},output:{tokensCount:{value:0},charactersCount:{value:0},wordsCount:{value:0},sentencesCount:{value:0},linesCount:{value:0},paragraphsCount:{value:0},pagesCount:{value:0}}}}],sourceFile:"./promptbook-collection/prepare-persona.ptbk.md"}];
|
|
717
713
|
|
|
718
714
|
/**
|
|
719
715
|
* This error indicates that the promptbook in a markdown format cannot be parsed into a valid promptbook object
|
|
@@ -1247,7 +1243,7 @@
|
|
|
1247
1243
|
* Library of pipelines that groups together pipelines for an application.
|
|
1248
1244
|
* This implementation is a very thin wrapper around the Array / Map of pipelines.
|
|
1249
1245
|
*
|
|
1250
|
-
* @private use `createCollectionFromJson` instead
|
|
1246
|
+
* @private internal function of `createCollectionFromJson`, use `createCollectionFromJson` instead
|
|
1251
1247
|
* @see https://github.com/webgptorg/pipeline#pipeline-collection
|
|
1252
1248
|
*/
|
|
1253
1249
|
var SimplePipelineCollection = /** @class */ (function () {
|
|
@@ -1256,7 +1252,6 @@
|
|
|
1256
1252
|
*
|
|
1257
1253
|
* @param pipelines @@@
|
|
1258
1254
|
*
|
|
1259
|
-
* @private Use instead `createCollectionFromJson`
|
|
1260
1255
|
* Note: During the construction logic of all pipelines are validated
|
|
1261
1256
|
* Note: It is not recommended to use this constructor directly, use `createCollectionFromJson` *(or other variant)* instead
|
|
1262
1257
|
*/
|
|
@@ -1871,7 +1866,8 @@
|
|
|
1871
1866
|
/**
|
|
1872
1867
|
* This error occurs when some expectation is not met in the execution of the pipeline
|
|
1873
1868
|
*
|
|
1874
|
-
* @private
|
|
1869
|
+
* @private error of `checkExpectations` and `createPipelineExecutor`
|
|
1870
|
+
* Note: Always thrown in `checkExpectations` and catched in `createPipelineExecutor` and rethrown as `PipelineExecutionError`
|
|
1875
1871
|
* Note: This is a kindof subtype of PipelineExecutionError
|
|
1876
1872
|
*/
|
|
1877
1873
|
var ExpectError = /** @class */ (function (_super) {
|
|
@@ -1909,7 +1905,7 @@
|
|
|
1909
1905
|
/**
|
|
1910
1906
|
* Multiple LLM Execution Tools is a proxy server that uses multiple execution tools internally and exposes the executor interface externally.
|
|
1911
1907
|
*
|
|
1912
|
-
* @private
|
|
1908
|
+
* @private internal utility of `joinLlmExecutionTools`
|
|
1913
1909
|
*/
|
|
1914
1910
|
var MultipleLlmExecutionTools = /** @class */ (function () {
|
|
1915
1911
|
/**
|
|
@@ -2192,7 +2188,7 @@
|
|
|
2192
2188
|
* 2) Undefined returns empty array
|
|
2193
2189
|
* 3) Array returns itself
|
|
2194
2190
|
*
|
|
2195
|
-
* @private
|
|
2191
|
+
* @private internal utility
|
|
2196
2192
|
*/
|
|
2197
2193
|
function arrayableToArray(input) {
|
|
2198
2194
|
if (input === undefined) {
|
|
@@ -2490,7 +2486,7 @@
|
|
|
2490
2486
|
*
|
|
2491
2487
|
* @throws {ExpectError} if the expectations are not met
|
|
2492
2488
|
* @returns {void} Nothing
|
|
2493
|
-
* @
|
|
2489
|
+
* @private internal function of `createPipelineExecutor`
|
|
2494
2490
|
*/
|
|
2495
2491
|
function checkExpectations(expectations, value) {
|
|
2496
2492
|
var e_1, _a;
|
|
@@ -4171,7 +4167,9 @@
|
|
|
4171
4167
|
|
|
4172
4168
|
/**
|
|
4173
4169
|
* Units of text measurement
|
|
4170
|
+
*
|
|
4174
4171
|
* @see https://github.com/webgptorg/promptbook/discussions/30
|
|
4172
|
+
* @private internal base for `ExpectationUnit`
|
|
4175
4173
|
*/
|
|
4176
4174
|
var EXPECTATION_UNITS = ['CHARACTERS', 'WORDS', 'SENTENCES', 'LINES', 'PARAGRAPHS', 'PAGES'];
|
|
4177
4175
|
/**
|
|
@@ -4411,7 +4409,7 @@
|
|
|
4411
4409
|
/**
|
|
4412
4410
|
* @@@
|
|
4413
4411
|
*
|
|
4414
|
-
* @private for `ModelVariant` and `modelCommandParser`
|
|
4412
|
+
* @private internal base for `ModelVariant` and `modelCommandParser`
|
|
4415
4413
|
*/
|
|
4416
4414
|
var MODEL_VARIANTS = ['COMPLETION', 'CHAT', 'EMBEDDING' /* <- TODO [🏳] */ /* <- [🤖] */];
|
|
4417
4415
|
|
|
@@ -4876,11 +4874,12 @@
|
|
|
4876
4874
|
};
|
|
4877
4875
|
/**
|
|
4878
4876
|
* TODO: [💐] Implement BOILERPLATE command into `pipelineStringToJsonSync` function
|
|
4879
|
-
* Note: [⚪] This should never be in any released package
|
|
4880
4877
|
*/
|
|
4881
4878
|
|
|
4882
4879
|
/**
|
|
4883
4880
|
* All available command parsers
|
|
4881
|
+
*
|
|
4882
|
+
* @private internal index of `parseCommand`
|
|
4884
4883
|
*/
|
|
4885
4884
|
var COMMANDS = [
|
|
4886
4885
|
blockCommandParser,
|
|
@@ -5050,6 +5049,8 @@
|
|
|
5050
5049
|
|
|
5051
5050
|
/**
|
|
5052
5051
|
* Supported script languages
|
|
5052
|
+
*
|
|
5053
|
+
* @private internal base for `ScriptLanguage`
|
|
5053
5054
|
*/
|
|
5054
5055
|
var SUPPORTED_SCRIPT_LANGUAGES = ['javascript', 'typescript', 'python'];
|
|
5055
5056
|
|
|
@@ -5190,7 +5191,7 @@
|
|
|
5190
5191
|
return codeBlocks[0];
|
|
5191
5192
|
}
|
|
5192
5193
|
/***
|
|
5193
|
-
* TODO: [🍓][🌻] Decide of this is internal
|
|
5194
|
+
* TODO: [🍓][🌻] Decide of this is internal utility, external util OR validator/postprocessor
|
|
5194
5195
|
*/
|
|
5195
5196
|
|
|
5196
5197
|
/**
|
|
@@ -5807,6 +5808,69 @@
|
|
|
5807
5808
|
return CollectionError;
|
|
5808
5809
|
}(Error));
|
|
5809
5810
|
|
|
5811
|
+
/**
|
|
5812
|
+
* Reads all files in the directory
|
|
5813
|
+
*
|
|
5814
|
+
* @param path
|
|
5815
|
+
* @param isRecursive
|
|
5816
|
+
* @returns List of all files in the directory
|
|
5817
|
+
* @private internal function of `createCollectionFromDirectory`
|
|
5818
|
+
*/
|
|
5819
|
+
function listAllFiles(path, isRecursive) {
|
|
5820
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
5821
|
+
var dirents, fileNames, _a, _b, dirent, subPath, _c, _d, _e, _f, e_1_1;
|
|
5822
|
+
var e_1, _g;
|
|
5823
|
+
return __generator(this, function (_h) {
|
|
5824
|
+
switch (_h.label) {
|
|
5825
|
+
case 0: return [4 /*yield*/, promises.readdir(path, {
|
|
5826
|
+
withFileTypes: true /* Note: This is not working: recursive: isRecursive */,
|
|
5827
|
+
})];
|
|
5828
|
+
case 1:
|
|
5829
|
+
dirents = _h.sent();
|
|
5830
|
+
fileNames = dirents.filter(function (dirent) { return dirent.isFile(); }).map(function (_a) {
|
|
5831
|
+
var name = _a.name;
|
|
5832
|
+
return posix.join(path, name);
|
|
5833
|
+
});
|
|
5834
|
+
if (!isRecursive) return [3 /*break*/, 9];
|
|
5835
|
+
_h.label = 2;
|
|
5836
|
+
case 2:
|
|
5837
|
+
_h.trys.push([2, 7, 8, 9]);
|
|
5838
|
+
_a = __values(dirents.filter(function (dirent) { return dirent.isDirectory(); })), _b = _a.next();
|
|
5839
|
+
_h.label = 3;
|
|
5840
|
+
case 3:
|
|
5841
|
+
if (!!_b.done) return [3 /*break*/, 6];
|
|
5842
|
+
dirent = _b.value;
|
|
5843
|
+
subPath = posix.join(path, dirent.name);
|
|
5844
|
+
_d = (_c = fileNames.push).apply;
|
|
5845
|
+
_e = [fileNames];
|
|
5846
|
+
_f = [[]];
|
|
5847
|
+
return [4 /*yield*/, listAllFiles(subPath, isRecursive)];
|
|
5848
|
+
case 4:
|
|
5849
|
+
_d.apply(_c, _e.concat([__spreadArray.apply(void 0, _f.concat([__read.apply(void 0, [(_h.sent())]), false]))]));
|
|
5850
|
+
_h.label = 5;
|
|
5851
|
+
case 5:
|
|
5852
|
+
_b = _a.next();
|
|
5853
|
+
return [3 /*break*/, 3];
|
|
5854
|
+
case 6: return [3 /*break*/, 9];
|
|
5855
|
+
case 7:
|
|
5856
|
+
e_1_1 = _h.sent();
|
|
5857
|
+
e_1 = { error: e_1_1 };
|
|
5858
|
+
return [3 /*break*/, 9];
|
|
5859
|
+
case 8:
|
|
5860
|
+
try {
|
|
5861
|
+
if (_b && !_b.done && (_g = _a.return)) _g.call(_a);
|
|
5862
|
+
}
|
|
5863
|
+
finally { if (e_1) throw e_1.error; }
|
|
5864
|
+
return [7 /*endfinally*/];
|
|
5865
|
+
case 9: return [2 /*return*/, fileNames];
|
|
5866
|
+
}
|
|
5867
|
+
});
|
|
5868
|
+
});
|
|
5869
|
+
}
|
|
5870
|
+
/**
|
|
5871
|
+
* Note: [🟢] This code should never be published outside of `@promptbook/node` and `@promptbook/cli` and `@promptbook/cli`
|
|
5872
|
+
*/
|
|
5873
|
+
|
|
5810
5874
|
/**
|
|
5811
5875
|
* Detects if the code is running in a browser environment in main thread (Not in a web worker)
|
|
5812
5876
|
*
|
|
@@ -6102,66 +6166,7 @@
|
|
|
6102
6166
|
});
|
|
6103
6167
|
}
|
|
6104
6168
|
/**
|
|
6105
|
-
*
|
|
6106
|
-
*
|
|
6107
|
-
* @param path
|
|
6108
|
-
* @param isRecursive
|
|
6109
|
-
* @returns List of all files in the directory
|
|
6110
|
-
* @private internal function for `createCollectionFromDirectory`
|
|
6111
|
-
*/
|
|
6112
|
-
function listAllFiles(path$1, isRecursive) {
|
|
6113
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
6114
|
-
var dirents, fileNames, _a, _b, dirent, subPath, _c, _d, _e, _f, e_2_1;
|
|
6115
|
-
var e_2, _g;
|
|
6116
|
-
return __generator(this, function (_h) {
|
|
6117
|
-
switch (_h.label) {
|
|
6118
|
-
case 0: return [4 /*yield*/, promises.readdir(path$1, {
|
|
6119
|
-
withFileTypes: true /* Note: This is not working: recursive: isRecursive */,
|
|
6120
|
-
})];
|
|
6121
|
-
case 1:
|
|
6122
|
-
dirents = _h.sent();
|
|
6123
|
-
fileNames = dirents.filter(function (dirent) { return dirent.isFile(); }).map(function (_a) {
|
|
6124
|
-
var name = _a.name;
|
|
6125
|
-
return path.join(path$1, name);
|
|
6126
|
-
});
|
|
6127
|
-
if (!isRecursive) return [3 /*break*/, 9];
|
|
6128
|
-
_h.label = 2;
|
|
6129
|
-
case 2:
|
|
6130
|
-
_h.trys.push([2, 7, 8, 9]);
|
|
6131
|
-
_a = __values(dirents.filter(function (dirent) { return dirent.isDirectory(); })), _b = _a.next();
|
|
6132
|
-
_h.label = 3;
|
|
6133
|
-
case 3:
|
|
6134
|
-
if (!!_b.done) return [3 /*break*/, 6];
|
|
6135
|
-
dirent = _b.value;
|
|
6136
|
-
subPath = path.join(path$1, dirent.name);
|
|
6137
|
-
_d = (_c = fileNames.push).apply;
|
|
6138
|
-
_e = [fileNames];
|
|
6139
|
-
_f = [[]];
|
|
6140
|
-
return [4 /*yield*/, listAllFiles(subPath, isRecursive)];
|
|
6141
|
-
case 4:
|
|
6142
|
-
_d.apply(_c, _e.concat([__spreadArray.apply(void 0, _f.concat([__read.apply(void 0, [(_h.sent())]), false]))]));
|
|
6143
|
-
_h.label = 5;
|
|
6144
|
-
case 5:
|
|
6145
|
-
_b = _a.next();
|
|
6146
|
-
return [3 /*break*/, 3];
|
|
6147
|
-
case 6: return [3 /*break*/, 9];
|
|
6148
|
-
case 7:
|
|
6149
|
-
e_2_1 = _h.sent();
|
|
6150
|
-
e_2 = { error: e_2_1 };
|
|
6151
|
-
return [3 /*break*/, 9];
|
|
6152
|
-
case 8:
|
|
6153
|
-
try {
|
|
6154
|
-
if (_b && !_b.done && (_g = _a.return)) _g.call(_a);
|
|
6155
|
-
}
|
|
6156
|
-
finally { if (e_2) throw e_2.error; }
|
|
6157
|
-
return [7 /*endfinally*/];
|
|
6158
|
-
case 9: return [2 /*return*/, fileNames];
|
|
6159
|
-
}
|
|
6160
|
-
});
|
|
6161
|
-
});
|
|
6162
|
-
}
|
|
6163
|
-
/**
|
|
6164
|
-
* Note: [🟢] This code should never be published outside of `@pipeline/node`
|
|
6169
|
+
* Note: [🟢] This code should never be published outside of `@promptbook/node` and `@promptbook/cli` and `@promptbook/cli`
|
|
6165
6170
|
*/
|
|
6166
6171
|
|
|
6167
6172
|
/**
|
|
@@ -6186,7 +6191,7 @@
|
|
|
6186
6191
|
* @param content the content of prompt or response
|
|
6187
6192
|
* @returns part of PromptResultUsageCounts
|
|
6188
6193
|
*
|
|
6189
|
-
* @private internal
|
|
6194
|
+
* @private internal utility of LlmExecutionTools
|
|
6190
6195
|
*/
|
|
6191
6196
|
function computeUsageCounts(content) {
|
|
6192
6197
|
return {
|
|
@@ -6216,7 +6221,7 @@
|
|
|
6216
6221
|
/**
|
|
6217
6222
|
* Get current date in ISO 8601 format
|
|
6218
6223
|
*
|
|
6219
|
-
* @private
|
|
6224
|
+
* @private internal utility
|
|
6220
6225
|
*/
|
|
6221
6226
|
function getCurrentIsoDate() {
|
|
6222
6227
|
return new Date().toISOString();
|
|
@@ -6238,6 +6243,7 @@
|
|
|
6238
6243
|
* Note: Done at 2024-05-25
|
|
6239
6244
|
*
|
|
6240
6245
|
* @see https://docs.anthropic.com/en/docs/models-overview
|
|
6246
|
+
* @public exported from `@promptbook/anthropic-claude`
|
|
6241
6247
|
*/
|
|
6242
6248
|
var ANTHROPIC_CLAUDE_MODELS = [
|
|
6243
6249
|
{
|
|
@@ -6884,7 +6890,7 @@
|
|
|
6884
6890
|
* @param resultContent The content of the result (for embedding prompts or failed prompts pass empty string)
|
|
6885
6891
|
* @param rawResponse The raw response from OpenAI API
|
|
6886
6892
|
* @throws {PipelineExecutionError} If the usage is not defined in the response from OpenAI
|
|
6887
|
-
* @private internal
|
|
6893
|
+
* @private internal utility of `OpenAiExecutionTools`
|
|
6888
6894
|
*/
|
|
6889
6895
|
function computeOpenaiUsage(promptContent, // <- Note: Intentionally using [] to access type properties to bring jsdoc from Prompt/PromptResult to consumer
|
|
6890
6896
|
resultContent, rawResponse) {
|
|
@@ -7266,7 +7272,7 @@
|
|
|
7266
7272
|
* TODO: [🧠] Which name is better `createLlmToolsFromEnv` or `createLlmToolsFromEnvironment`?
|
|
7267
7273
|
* TODO: [🧠] Is there some meaningfull way how to test this util
|
|
7268
7274
|
* TODO: [🧠] Maybe pass env as argument
|
|
7269
|
-
* Note: [🟢] This code should never be published outside of `@promptbook/node`
|
|
7275
|
+
* Note: [🟢] This code should never be published outside of `@promptbook/node` and `@promptbook/cli` and `@promptbook/cli`
|
|
7270
7276
|
* TODO: [👷♂️] @@@ Manual about construction of llmTools
|
|
7271
7277
|
*/
|
|
7272
7278
|
|
|
@@ -7397,7 +7403,7 @@
|
|
|
7397
7403
|
}());
|
|
7398
7404
|
/**
|
|
7399
7405
|
* TODO: [🌗] Maybe some checkers, not all valid JSONs are desired and valid values
|
|
7400
|
-
* Note: [🟢] This code should never be published outside of `@promptbook/node`
|
|
7406
|
+
* Note: [🟢] This code should never be published outside of `@promptbook/node` and `@promptbook/cli` and `@promptbook/cli`
|
|
7401
7407
|
*/
|
|
7402
7408
|
|
|
7403
7409
|
exports.FilesStorage = FilesStorage;
|