@promptbook/markdown-utils 0.61.0-7
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 +698 -0
- package/esm/index.es.js +479 -0
- package/esm/index.es.js.map +1 -0
- package/esm/typings/promptbook-collection/index.d.ts +82 -0
- package/esm/typings/src/_packages/anthropic-claude.index.d.ts +5 -0
- package/esm/typings/src/_packages/azure-openai.index.d.ts +4 -0
- package/esm/typings/src/_packages/cli.index.d.ts +10 -0
- package/esm/typings/src/_packages/core.index.d.ts +44 -0
- package/esm/typings/src/_packages/execute-javascript.index.d.ts +48 -0
- package/esm/typings/src/_packages/fake-llm.index.d.ts +7 -0
- package/esm/typings/src/_packages/langtail.index.d.ts +4 -0
- package/esm/typings/src/_packages/markdown-utils.index.d.ts +17 -0
- package/esm/typings/src/_packages/node.index.d.ts +4 -0
- package/esm/typings/src/_packages/openai.index.d.ts +5 -0
- package/esm/typings/src/_packages/remote-client.index.d.ts +5 -0
- package/esm/typings/src/_packages/remote-server.index.d.ts +4 -0
- package/esm/typings/src/_packages/types.index.d.ts +38 -0
- package/esm/typings/src/_packages/utils.index.d.ts +74 -0
- package/esm/typings/src/cli/cli-commands/hello.d.ts +7 -0
- package/esm/typings/src/cli/cli-commands/make.d.ts +7 -0
- package/esm/typings/src/cli/cli-commands/prettify.d.ts +7 -0
- package/esm/typings/src/cli/promptbookCli.d.ts +9 -0
- package/esm/typings/src/collection/PipelineCollection.d.ts +25 -0
- package/esm/typings/src/collection/SimplePipelineCollection.d.ts +38 -0
- package/esm/typings/src/collection/collectionToJson.d.ts +11 -0
- package/esm/typings/src/collection/collectionToJson.test.d.ts +7 -0
- package/esm/typings/src/collection/constructors/createCollectionFromDirectory.d.ts +47 -0
- package/esm/typings/src/collection/constructors/createCollectionFromDirectory.test.d.ts +1 -0
- package/esm/typings/src/collection/constructors/createCollectionFromJson.d.ts +12 -0
- package/esm/typings/src/collection/constructors/createCollectionFromJson.test.d.ts +1 -0
- package/esm/typings/src/collection/constructors/createCollectionFromPromise.d.ts +22 -0
- package/esm/typings/src/collection/constructors/createCollectionFromPromise.test.d.ts +1 -0
- package/esm/typings/src/collection/constructors/createCollectionFromUrl.d.ts +29 -0
- package/esm/typings/src/collection/constructors/createSubcollection.d.ts +12 -0
- package/esm/typings/src/collection/constructors/justTestFsImport.d.ts +7 -0
- package/esm/typings/src/commands/BLOCK/BlockCommand.d.ts +11 -0
- package/esm/typings/src/commands/BLOCK/BlockTypes.d.ts +13 -0
- package/esm/typings/src/commands/BLOCK/blockCommand.test.d.ts +1 -0
- package/esm/typings/src/commands/BLOCK/blockCommandParser.d.ts +9 -0
- package/esm/typings/src/commands/EXPECT/ExpectAmountCommand.d.ts +14 -0
- package/esm/typings/src/commands/EXPECT/ExpectCommand.d.ts +9 -0
- package/esm/typings/src/commands/EXPECT/ExpectFormatCommand.d.ts +7 -0
- package/esm/typings/src/commands/EXPECT/expectCommand.test.d.ts +1 -0
- package/esm/typings/src/commands/EXPECT/expectCommandParser.d.ts +9 -0
- package/esm/typings/src/commands/JOKER/JokerCommand.d.ts +11 -0
- package/esm/typings/src/commands/JOKER/jokerCommand.test.d.ts +1 -0
- package/esm/typings/src/commands/JOKER/jokerCommandParser.d.ts +9 -0
- package/esm/typings/src/commands/KNOWLEDGE/KnowledgeCommand.d.ts +12 -0
- package/esm/typings/src/commands/KNOWLEDGE/knowledgeCommand.test.d.ts +1 -0
- package/esm/typings/src/commands/KNOWLEDGE/knowledgeCommandParser.d.ts +9 -0
- package/esm/typings/src/commands/MODEL/ModelCommand.d.ts +13 -0
- package/esm/typings/src/commands/MODEL/modelCommand.test.d.ts +1 -0
- package/esm/typings/src/commands/MODEL/modelCommandParser.d.ts +9 -0
- package/esm/typings/src/commands/PARAMETER/ParameterCommand.d.ts +15 -0
- package/esm/typings/src/commands/PARAMETER/parameterCommand.test.d.ts +1 -0
- package/esm/typings/src/commands/PARAMETER/parameterCommandParser.d.ts +9 -0
- package/esm/typings/src/commands/PERSONA/PersonaCommand.d.ts +11 -0
- package/esm/typings/src/commands/PERSONA/personaCommand.test.d.ts +1 -0
- package/esm/typings/src/commands/PERSONA/personaCommandParser.d.ts +9 -0
- package/esm/typings/src/commands/POSTPROCESS/PostprocessCommand.d.ts +11 -0
- package/esm/typings/src/commands/POSTPROCESS/postprocessCommand.test.d.ts +1 -0
- package/esm/typings/src/commands/POSTPROCESS/postprocessCommandParser.d.ts +9 -0
- package/esm/typings/src/commands/PROMPTBOOK_VERSION/PromptbookVersionCommand.d.ts +11 -0
- package/esm/typings/src/commands/PROMPTBOOK_VERSION/promptbookVersionCommand.test.d.ts +1 -0
- package/esm/typings/src/commands/PROMPTBOOK_VERSION/promptbookVersionCommandParser.d.ts +9 -0
- package/esm/typings/src/commands/URL/UrlCommand.d.ts +10 -0
- package/esm/typings/src/commands/URL/urlCommand.test.d.ts +1 -0
- package/esm/typings/src/commands/URL/urlCommandParser.d.ts +9 -0
- package/esm/typings/src/commands/X_ACTION/ActionCommand.d.ts +9 -0
- package/esm/typings/src/commands/X_ACTION/actionCommand.test.d.ts +1 -0
- package/esm/typings/src/commands/X_ACTION/actionCommandParser.d.ts +9 -0
- package/esm/typings/src/commands/X_INSTRUMENT/InstrumentCommand.d.ts +9 -0
- package/esm/typings/src/commands/X_INSTRUMENT/instrumentCommand.test.d.ts +1 -0
- package/esm/typings/src/commands/X_INSTRUMENT/instrumentCommandParser.d.ts +9 -0
- package/esm/typings/src/commands/_BOILERPLATE/BoilerplateCommand.d.ts +10 -0
- package/esm/typings/src/commands/_BOILERPLATE/boilerplateCommand.test.d.ts +1 -0
- package/esm/typings/src/commands/_BOILERPLATE/boilerplateCommandParser.d.ts +12 -0
- package/esm/typings/src/commands/_common/parseCommand.d.ts +12 -0
- package/esm/typings/src/commands/_common/parseCommand.test.d.ts +1 -0
- package/esm/typings/src/commands/_common/types/Command.d.ts +6 -0
- package/esm/typings/src/commands/_common/types/CommandParser.d.ts +36 -0
- package/esm/typings/src/commands/_common/types/CommandUsagePlaces.d.ts +9 -0
- package/esm/typings/src/commands/index.d.ts +4 -0
- package/esm/typings/src/config.d.ts +16 -0
- package/esm/typings/src/conversion/pipelineJsonToString.d.ts +14 -0
- package/esm/typings/src/conversion/pipelineStringToJson.d.ts +31 -0
- package/esm/typings/src/conversion/pipelineStringToJson.test.d.ts +1 -0
- package/esm/typings/src/conversion/pipelineStringToJsonSync.d.ts +25 -0
- package/esm/typings/src/conversion/pipelineStringToJsonSync.test.d.ts +1 -0
- package/esm/typings/src/conversion/prettify/PrettifyOptions.d.ts +13 -0
- package/esm/typings/src/conversion/prettify/prettifyPipelineString.d.ts +10 -0
- package/esm/typings/src/conversion/prettify/renderPipelineMermaidOptions.d.ts +25 -0
- package/esm/typings/src/conversion/utils/extractParametersFromPromptTemplate.d.ts +13 -0
- package/esm/typings/src/conversion/utils/extractParametersFromPromptTemplate.test.d.ts +1 -0
- package/esm/typings/src/conversion/utils/extractVariables.d.ts +13 -0
- package/esm/typings/src/conversion/utils/extractVariables.test.d.ts +1 -0
- package/esm/typings/src/conversion/utils/renameParameter.d.ts +25 -0
- package/esm/typings/src/conversion/utils/renameParameter.test.d.ts +1 -0
- package/esm/typings/src/conversion/utils/titleToName.d.ts +4 -0
- package/esm/typings/src/conversion/utils/titleToName.test.d.ts +1 -0
- package/esm/typings/src/conversion/validation/_importPipeline.d.ts +13 -0
- package/esm/typings/src/conversion/validation/pipelineStringToJson-syntaxErrors.test.d.ts +1 -0
- package/esm/typings/src/conversion/validation/validatePipeline-logicErrors.test.d.ts +4 -0
- package/esm/typings/src/conversion/validation/validatePipeline.d.ts +27 -0
- package/esm/typings/src/conversion/validation/validatePipeline.test.d.ts +1 -0
- package/esm/typings/src/errors/CollectionError.d.ts +7 -0
- package/esm/typings/src/errors/NotFoundError.d.ts +7 -0
- package/esm/typings/src/errors/NotYetImplementedError.d.ts +7 -0
- package/esm/typings/src/errors/ParsingError.d.ts +7 -0
- package/esm/typings/src/errors/PipelineExecutionError.d.ts +7 -0
- package/esm/typings/src/errors/PipelineLogicError.d.ts +7 -0
- package/esm/typings/src/errors/ReferenceError.d.ts +7 -0
- package/esm/typings/src/errors/UnexpectedError.d.ts +7 -0
- package/esm/typings/src/errors/_ExpectError.d.ts +10 -0
- package/esm/typings/src/execution/CommonExecutionToolsOptions.d.ts +9 -0
- package/esm/typings/src/execution/EmbeddingVector.d.ts +8 -0
- package/esm/typings/src/execution/ExecutionTools.d.ts +33 -0
- package/esm/typings/src/execution/LlmExecutionTools.d.ts +70 -0
- package/esm/typings/src/execution/PipelineExecutor.d.ts +42 -0
- package/esm/typings/src/execution/PromptResult.d.ts +114 -0
- package/esm/typings/src/execution/ScriptExecutionTools.d.ts +38 -0
- package/esm/typings/src/execution/UserInterfaceTools.d.ts +46 -0
- package/esm/typings/src/execution/addPromptResultUsage.test.d.ts +1 -0
- package/esm/typings/src/execution/assertsExecutionSuccessful.d.ts +11 -0
- package/esm/typings/src/execution/createPipelineExecutor.d.ts +42 -0
- package/esm/typings/src/execution/embeddingVectorToString.d.ts +5 -0
- package/esm/typings/src/execution/translation/automatic-translate/automatic-translators/AutomaticTranslator.d.ts +4 -0
- package/esm/typings/src/execution/translation/automatic-translate/automatic-translators/DebugAutomaticTranslator.d.ts +9 -0
- package/esm/typings/src/execution/translation/automatic-translate/automatic-translators/FakeAutomaticTranslator.d.ts +5 -0
- package/esm/typings/src/execution/translation/automatic-translate/automatic-translators/LindatAutomaticTranslator.d.ts +11 -0
- package/esm/typings/src/execution/translation/automatic-translate/automatic-translators/TranslatorOptions.d.ts +4 -0
- package/esm/typings/src/execution/translation/automatic-translate/automatic-translators/utils/extractMultiplicatedOccurrence.d.ts +7 -0
- package/esm/typings/src/execution/translation/automatic-translate/automatic-translators/utils/extractMultiplicatedOccurrence.test.d.ts +1 -0
- package/esm/typings/src/execution/translation/automatic-translate/translateMessages.d.ts +5 -0
- package/esm/typings/src/execution/utils/addUsage.d.ts +7 -0
- package/esm/typings/src/execution/utils/addUsage.test.d.ts +1 -0
- package/esm/typings/src/execution/utils/checkExpectations.d.ts +25 -0
- package/esm/typings/src/execution/utils/checkExpectations.test.d.ts +1 -0
- package/esm/typings/src/execution/utils/computeUsageCounts.d.ts +10 -0
- package/esm/typings/src/execution/utils/forEachAsync.d.ts +18 -0
- package/esm/typings/src/execution/utils/replaceParameters.d.ts +13 -0
- package/esm/typings/src/execution/utils/replaceParameters.test.d.ts +1 -0
- package/esm/typings/src/execution/utils/uncertainNumber.d.ts +9 -0
- package/esm/typings/src/execution/utils/usageToWorktime.d.ts +10 -0
- package/esm/typings/src/execution/utils/usageToWorktime.test.d.ts +1 -0
- package/esm/typings/src/expectations/drafts/isDomainNameFree.d.ts +6 -0
- package/esm/typings/src/expectations/drafts/isGithubNameFree.d.ts +6 -0
- package/esm/typings/src/formats/_common/FormatDefinition.d.ts +69 -0
- package/esm/typings/src/formats/csv/ListFormatDefinition.d.ts +11 -0
- package/esm/typings/src/formats/index.d.ts +4 -0
- package/esm/typings/src/formats/json/JsonFormatDefinition.d.ts +15 -0
- package/esm/typings/src/formats/json/utils/isValidJsonString.d.ts +4 -0
- package/esm/typings/src/formats/json/utils/isValidJsonString.test.d.ts +1 -0
- package/esm/typings/src/formats/list/ListFormatDefinition.d.ts +13 -0
- package/esm/typings/src/formats/xml/XmlFormatDefinition.d.ts +15 -0
- package/esm/typings/src/knowledge/dialogs/callback/CallbackInterfaceTools.d.ts +15 -0
- package/esm/typings/src/knowledge/dialogs/callback/CallbackInterfaceToolsOptions.d.ts +12 -0
- package/esm/typings/src/knowledge/dialogs/simple-prompt/SimplePromptInterfaceTools.d.ts +17 -0
- package/esm/typings/src/knowledge/dialogs/user-interface-execution-tools.test.d.ts +1 -0
- package/esm/typings/src/knowledge/prepare-knowledge/markdown/playground/markdown-knowledge-playground.d.ts +2 -0
- package/esm/typings/src/knowledge/prepare-knowledge/markdown/prepareKnowledgeFromMarkdown.d.ts +26 -0
- package/esm/typings/src/knowledge/prepare-knowledge/markdown/prepareKnowledgeFromMarkdown.test.d.ts +1 -0
- package/esm/typings/src/knowledge/prepare-knowledge/pdf/prepareKnowledgeFromPdf.d.ts +19 -0
- package/esm/typings/src/knowledge/prepare-knowledge/pdf/prepareKnowledgeFromPdf.test.d.ts +1 -0
- package/esm/typings/src/llm-providers/anthropic-claude/AnthropicClaudeExecutionTools.d.ts +48 -0
- package/esm/typings/src/llm-providers/anthropic-claude/AnthropicClaudeExecutionToolsOptions.d.ts +8 -0
- package/esm/typings/src/llm-providers/anthropic-claude/anthropic-claude-models.d.ts +22 -0
- package/esm/typings/src/llm-providers/anthropic-claude/playground/playground.d.ts +2 -0
- package/esm/typings/src/llm-providers/azure-openai/AzureOpenAiExecutionTools.d.ts +47 -0
- package/esm/typings/src/llm-providers/azure-openai/AzureOpenAiExecutionToolsOptions.d.ts +35 -0
- package/esm/typings/src/llm-providers/azure-openai/playground/playground.d.ts +2 -0
- package/esm/typings/src/llm-providers/langtail/LangtailExecutionTools.d.ts +12 -0
- package/esm/typings/src/llm-providers/langtail/LangtailExecutionToolsOptions.d.ts +11 -0
- package/esm/typings/src/llm-providers/langtail/playground/playground.d.ts +2 -0
- package/esm/typings/src/llm-providers/mocked/MockedEchoLlmExecutionTools.d.ts +34 -0
- package/esm/typings/src/llm-providers/mocked/MockedFackedLlmExecutionTools.d.ts +38 -0
- package/esm/typings/src/llm-providers/mocked/fakeTextToExpectations.d.ts +14 -0
- package/esm/typings/src/llm-providers/mocked/test/fakeTextToExpectations.test.d.ts +1 -0
- package/esm/typings/src/llm-providers/mocked/test/faked-completion.test.d.ts +1 -0
- package/esm/typings/src/llm-providers/mocked/test/joker.test.d.ts +4 -0
- package/esm/typings/src/llm-providers/mocked/test/mocked-chat.test.d.ts +5 -0
- package/esm/typings/src/llm-providers/mocked/test/mocked-completion.test.d.ts +4 -0
- package/esm/typings/src/llm-providers/multiple/MultipleLlmExecutionTools.d.ts +50 -0
- package/esm/typings/src/llm-providers/multiple/joinLlmExecutionTools.d.ts +16 -0
- package/esm/typings/src/llm-providers/multiple/playground/playground.d.ts +2 -0
- package/esm/typings/src/llm-providers/openai/OpenAiExecutionTools.d.ts +65 -0
- package/esm/typings/src/llm-providers/openai/OpenAiExecutionToolsOptions.d.ts +18 -0
- package/esm/typings/src/llm-providers/openai/computeOpenaiUsage.d.ts +14 -0
- package/esm/typings/src/llm-providers/openai/computeUsage.d.ts +16 -0
- package/esm/typings/src/llm-providers/openai/computeUsage.test.d.ts +1 -0
- package/esm/typings/src/llm-providers/openai/openai-models.d.ts +27 -0
- package/esm/typings/src/llm-providers/openai/playground/playground.d.ts +2 -0
- package/esm/typings/src/llm-providers/remote/RemoteLlmExecutionTools.d.ts +52 -0
- package/esm/typings/src/llm-providers/remote/RemoteLlmExecutionToolsOptions.d.ts +24 -0
- package/esm/typings/src/llm-providers/remote/interfaces/Promptbook_Server_Error.d.ts +11 -0
- package/esm/typings/src/llm-providers/remote/interfaces/Promptbook_Server_Progress.d.ts +12 -0
- package/esm/typings/src/llm-providers/remote/interfaces/Promptbook_Server_Request.d.ts +17 -0
- package/esm/typings/src/llm-providers/remote/interfaces/Promptbook_Server_Response.d.ts +12 -0
- package/esm/typings/src/llm-providers/remote/interfaces/RemoteServerOptions.d.ts +28 -0
- package/esm/typings/src/llm-providers/remote/startRemoteServer.d.ts +19 -0
- package/esm/typings/src/personas/personaToModelRequirements.d.ts +6 -0
- package/esm/typings/src/scripting/_test/custom-function-async.test.ts.test.d.ts +1 -0
- package/esm/typings/src/scripting/_test/custom-function-missing.test.d.ts +1 -0
- package/esm/typings/src/scripting/_test/custom-function-with-dependencies.test.d.ts +1 -0
- package/esm/typings/src/scripting/_test/custom-function.test.d.ts +1 -0
- package/esm/typings/src/scripting/_test/postprocessing.test.d.ts +1 -0
- package/esm/typings/src/scripting/_test/script-execution-errors.test.d.ts +1 -0
- package/esm/typings/src/scripting/_test/script-execution-tools.test.d.ts +1 -0
- package/esm/typings/src/scripting/javascript/JavascriptEvalExecutionTools.d.ts +20 -0
- package/esm/typings/src/scripting/javascript/JavascriptEvalExecutionTools.test.d.ts +4 -0
- package/esm/typings/src/scripting/javascript/JavascriptExecutionTools.d.ts +7 -0
- package/esm/typings/src/scripting/javascript/JavascriptExecutionToolsOptions.d.ts +26 -0
- package/esm/typings/src/scripting/javascript/utils/preserve.d.ts +12 -0
- package/esm/typings/src/scripting/javascript/utils/unknownToString.d.ts +7 -0
- package/esm/typings/src/scripting/python/PythonExecutionTools.d.ts +16 -0
- package/esm/typings/src/scripting/typescript/TypescriptExecutionTools.d.ts +16 -0
- package/esm/typings/src/types/Arrayable.d.ts +10 -0
- package/esm/typings/src/types/ModelRequirements.d.ts +43 -0
- package/esm/typings/src/types/Parameters.d.ts +14 -0
- package/esm/typings/src/types/PipelineJson/Expectations.d.ts +28 -0
- package/esm/typings/src/types/PipelineJson/KnowledgeJson.d.ts +6 -0
- package/esm/typings/src/types/PipelineJson/LlmTemplateJson.d.ts +16 -0
- package/esm/typings/src/types/PipelineJson/MaterialKnowledgePieceJson.d.ts +28 -0
- package/esm/typings/src/types/PipelineJson/PipelineJson.d.ts +61 -0
- package/esm/typings/src/types/PipelineJson/PromptDialogJson.d.ts +7 -0
- package/esm/typings/src/types/PipelineJson/PromptTemplateJson.d.ts +9 -0
- package/esm/typings/src/types/PipelineJson/PromptTemplateJsonCommon.d.ts +77 -0
- package/esm/typings/src/types/PipelineJson/PromptTemplateParameterJson.d.ts +26 -0
- package/esm/typings/src/types/PipelineJson/ScriptJson.d.ts +14 -0
- package/esm/typings/src/types/PipelineJson/SimpleTemplateJson.d.ts +7 -0
- package/esm/typings/src/types/PipelineString.d.ts +12 -0
- package/esm/typings/src/types/Prompt.d.ts +65 -0
- package/esm/typings/src/types/ScriptLanguage.d.ts +9 -0
- package/esm/typings/src/types/TaskProgress.d.ts +43 -0
- package/esm/typings/src/types/execution-report/ExecutionReportJson.d.ts +58 -0
- package/esm/typings/src/types/execution-report/ExecutionReportString.d.ts +16 -0
- package/esm/typings/src/types/execution-report/ExecutionReportStringOptions.d.ts +21 -0
- package/esm/typings/src/types/execution-report/config.d.ts +8 -0
- package/esm/typings/src/types/execution-report/countWorkingDuration.d.ts +7 -0
- package/esm/typings/src/types/execution-report/countWorkingDuration.test.d.ts +1 -0
- package/esm/typings/src/types/execution-report/executionReportJsonToString.d.ts +11 -0
- package/esm/typings/src/types/typeAliasEmoji.d.ts +9 -0
- package/esm/typings/src/types/typeAliases.d.ts +480 -0
- package/esm/typings/src/utils/FromtoItems.d.ts +19 -0
- package/esm/typings/src/utils/arrayableToArray.d.ts +11 -0
- package/esm/typings/src/utils/arrayableToArray.test.d.ts +1 -0
- package/esm/typings/src/utils/emojis.d.ts +23 -0
- package/esm/typings/src/utils/expectation-counters/countCharacters.d.ts +5 -0
- package/esm/typings/src/utils/expectation-counters/countCharacters.test.d.ts +1 -0
- package/esm/typings/src/utils/expectation-counters/countLines.d.ts +5 -0
- package/esm/typings/src/utils/expectation-counters/countLines.test.d.ts +1 -0
- package/esm/typings/src/utils/expectation-counters/countPages.d.ts +5 -0
- package/esm/typings/src/utils/expectation-counters/countPages.test.d.ts +1 -0
- package/esm/typings/src/utils/expectation-counters/countParagraphs.d.ts +5 -0
- package/esm/typings/src/utils/expectation-counters/countParagraphs.test.d.ts +1 -0
- package/esm/typings/src/utils/expectation-counters/countSentences.d.ts +9 -0
- package/esm/typings/src/utils/expectation-counters/countSentences.test.d.ts +1 -0
- package/esm/typings/src/utils/expectation-counters/countWords.d.ts +5 -0
- package/esm/typings/src/utils/expectation-counters/countWords.test.d.ts +1 -0
- package/esm/typings/src/utils/expectation-counters/index.d.ts +6 -0
- package/esm/typings/src/utils/extractParameters.d.ts +9 -0
- package/esm/typings/src/utils/extractParameters.test.d.ts +1 -0
- package/esm/typings/src/utils/formatNumber.d.ts +6 -0
- package/esm/typings/src/utils/formatNumber.test.d.ts +1 -0
- package/esm/typings/src/utils/getCurrentIsoDate.d.ts +7 -0
- package/esm/typings/src/utils/isRunningInWhatever.d.ts +12 -0
- package/esm/typings/src/utils/just.d.ts +10 -0
- package/esm/typings/src/utils/markdown/addAutoGeneratedSection.d.ts +11 -0
- package/esm/typings/src/utils/markdown/addAutoGeneratedSection.test.d.ts +1 -0
- package/esm/typings/src/utils/markdown/createMarkdownChart.d.ts +41 -0
- package/esm/typings/src/utils/markdown/createMarkdownChart.test.d.ts +1 -0
- package/esm/typings/src/utils/markdown/createMarkdownTable.d.ts +8 -0
- package/esm/typings/src/utils/markdown/createMarkdownTable.test.d.ts +1 -0
- package/esm/typings/src/utils/markdown/escapeMarkdownBlock.d.ts +6 -0
- package/esm/typings/src/utils/markdown/escapeMarkdownBlock.test.d.ts +1 -0
- package/esm/typings/src/utils/markdown/extractAllBlocksFromMarkdown.d.ts +27 -0
- package/esm/typings/src/utils/markdown/extractAllBlocksFromMarkdown.test.d.ts +1 -0
- package/esm/typings/src/utils/markdown/extractAllListItemsFromMarkdown.d.ts +14 -0
- package/esm/typings/src/utils/markdown/extractAllListItemsFromMarkdown.test.d.ts +1 -0
- package/esm/typings/src/utils/markdown/extractOneBlockFromMarkdown.d.ts +19 -0
- package/esm/typings/src/utils/markdown/extractOneBlockFromMarkdown.test.d.ts +1 -0
- package/esm/typings/src/utils/markdown/flattenMarkdown.d.ts +14 -0
- package/esm/typings/src/utils/markdown/flattenMarkdown.test.d.ts +1 -0
- package/esm/typings/src/utils/markdown/parseMarkdownSection.d.ts +30 -0
- package/esm/typings/src/utils/markdown/parseMarkdownSection.test.d.ts +1 -0
- package/esm/typings/src/utils/markdown/prettifyMarkdown.d.ts +9 -0
- package/esm/typings/src/utils/markdown/prettifyMarkdown.test.d.ts +1 -0
- package/esm/typings/src/utils/markdown/removeContentComments.d.ts +9 -0
- package/esm/typings/src/utils/markdown/removeContentComments.test.d.ts +1 -0
- package/esm/typings/src/utils/markdown/removeMarkdownFormatting.d.ts +8 -0
- package/esm/typings/src/utils/markdown/removeMarkdownFormatting.test.d.ts +1 -0
- package/esm/typings/src/utils/markdown/splitMarkdownIntoSections.d.ts +12 -0
- package/esm/typings/src/utils/markdown/splitMarkdownIntoSections.test.d.ts +1 -0
- package/esm/typings/src/utils/normalization/DIACRITIC_VARIANTS_LETTERS.d.ts +10 -0
- package/esm/typings/src/utils/normalization/IKeywords.d.ts +18 -0
- package/esm/typings/src/utils/normalization/capitalize.d.ts +5 -0
- package/esm/typings/src/utils/normalization/capitalize.test.d.ts +1 -0
- package/esm/typings/src/utils/normalization/decapitalize.d.ts +5 -0
- package/esm/typings/src/utils/normalization/decapitalize.test.d.ts +1 -0
- package/esm/typings/src/utils/normalization/isValidKeyword.d.ts +8 -0
- package/esm/typings/src/utils/normalization/isValidKeyword.test.d.ts +1 -0
- package/esm/typings/src/utils/normalization/nameToUriPart.d.ts +1 -0
- package/esm/typings/src/utils/normalization/nameToUriPart.test.d.ts +1 -0
- package/esm/typings/src/utils/normalization/nameToUriParts.d.ts +1 -0
- package/esm/typings/src/utils/normalization/nameToUriParts.test.d.ts +1 -0
- package/esm/typings/src/utils/normalization/normalize-to-kebab-case.d.ts +8 -0
- package/esm/typings/src/utils/normalization/normalize-to-kebab-case.test.d.ts +1 -0
- package/esm/typings/src/utils/normalization/normalizeTo_PascalCase.d.ts +8 -0
- package/esm/typings/src/utils/normalization/normalizeTo_PascalCase.test.d.ts +1 -0
- package/esm/typings/src/utils/normalization/normalizeTo_SCREAMING_CASE.d.ts +16 -0
- package/esm/typings/src/utils/normalization/normalizeTo_SCREAMING_CASE.test.d.ts +1 -0
- package/esm/typings/src/utils/normalization/normalizeTo_camelCase.d.ts +11 -0
- package/esm/typings/src/utils/normalization/normalizeTo_camelCase.test.d.ts +1 -0
- package/esm/typings/src/utils/normalization/normalizeTo_snake_case.d.ts +8 -0
- package/esm/typings/src/utils/normalization/normalizeTo_snake_case.test.d.ts +1 -0
- package/esm/typings/src/utils/normalization/normalizeWhitespaces.d.ts +4 -0
- package/esm/typings/src/utils/normalization/normalizeWhitespaces.test.d.ts +1 -0
- package/esm/typings/src/utils/normalization/parseKeywords.d.ts +14 -0
- package/esm/typings/src/utils/normalization/parseKeywords.test.d.ts +1 -0
- package/esm/typings/src/utils/normalization/parseKeywordsFromString.d.ts +8 -0
- package/esm/typings/src/utils/normalization/parseKeywordsFromString.test.d.ts +1 -0
- package/esm/typings/src/utils/normalization/removeDiacritics.d.ts +4 -0
- package/esm/typings/src/utils/normalization/removeDiacritics.test.d.ts +1 -0
- package/esm/typings/src/utils/normalization/searchKeywords.d.ts +5 -0
- package/esm/typings/src/utils/normalization/searchKeywords.test.d.ts +1 -0
- package/esm/typings/src/utils/parseNumber.d.ts +15 -0
- package/esm/typings/src/utils/parseNumber.test.d.ts +1 -0
- package/esm/typings/src/utils/postprocessing/extractBlock.d.ts +12 -0
- package/esm/typings/src/utils/removeEmojis.d.ts +7 -0
- package/esm/typings/src/utils/removeEmojis.test.d.ts +1 -0
- package/esm/typings/src/utils/removeQuotes.d.ts +13 -0
- package/esm/typings/src/utils/removeQuotes.test.d.ts +1 -0
- package/esm/typings/src/utils/sets/difference.d.ts +6 -0
- package/esm/typings/src/utils/sets/difference.test.d.ts +1 -0
- package/esm/typings/src/utils/sets/intersection.d.ts +6 -0
- package/esm/typings/src/utils/sets/intersection.test.d.ts +1 -0
- package/esm/typings/src/utils/sets/union.d.ts +6 -0
- package/esm/typings/src/utils/sets/union.test.d.ts +1 -0
- package/esm/typings/src/utils/trimCodeBlock.d.ts +8 -0
- package/esm/typings/src/utils/trimCodeBlock.test.d.ts +1 -0
- package/esm/typings/src/utils/trimEndOfCodeBlock.d.ts +7 -0
- package/esm/typings/src/utils/trimEndOfCodeBlock.test.d.ts +1 -0
- package/esm/typings/src/utils/unwrapResult.d.ts +36 -0
- package/esm/typings/src/utils/unwrapResult.test.d.ts +1 -0
- package/esm/typings/src/utils/validators/email/isValidEmail.d.ts +5 -0
- package/esm/typings/src/utils/validators/email/isValidEmail.test.d.ts +1 -0
- package/esm/typings/src/utils/validators/filePath/isValidFilePath.d.ts +7 -0
- package/esm/typings/src/utils/validators/filePath/isValidFilePath.test.d.ts +1 -0
- package/esm/typings/src/utils/validators/javascriptName/isValidJavascriptName.d.ts +2 -0
- package/esm/typings/src/utils/validators/javascriptName/isValidJavascriptName.test.d.ts +1 -0
- package/esm/typings/src/utils/validators/semanticVersion/isValidPromptbookVersion.d.ts +12 -0
- package/esm/typings/src/utils/validators/semanticVersion/isValidPromptbookVersion.test.d.ts +1 -0
- package/esm/typings/src/utils/validators/semanticVersion/isValidSemanticVersion.d.ts +9 -0
- package/esm/typings/src/utils/validators/semanticVersion/isValidSemanticVersion.test.d.ts +1 -0
- package/esm/typings/src/utils/validators/url/isHostnameOnPrivateNetwork.d.ts +9 -0
- package/esm/typings/src/utils/validators/url/isHostnameOnPrivateNetwork.test.d.ts +1 -0
- package/esm/typings/src/utils/validators/url/isUrlOnPrivateNetwork.d.ts +12 -0
- package/esm/typings/src/utils/validators/url/isUrlOnPrivateNetwork.test.d.ts +1 -0
- package/esm/typings/src/utils/validators/url/isValidPipelineUrl.d.ts +12 -0
- package/esm/typings/src/utils/validators/url/isValidPipelineUrl.test.d.ts +1 -0
- package/esm/typings/src/utils/validators/url/isValidUrl.d.ts +10 -0
- package/esm/typings/src/utils/validators/url/isValidUrl.test.d.ts +1 -0
- package/esm/typings/src/utils/validators/uuid/isValidUuid.d.ts +5 -0
- package/esm/typings/src/utils/validators/uuid/isValidUuid.test.d.ts +1 -0
- package/esm/typings/src/version.d.ts +6 -0
- package/package.json +55 -0
- package/umd/index.umd.js +502 -0
- package/umd/index.umd.js.map +1 -0
- package/umd/typings/promptbook-collection/index.d.ts +82 -0
- package/umd/typings/src/_packages/anthropic-claude.index.d.ts +5 -0
- package/umd/typings/src/_packages/azure-openai.index.d.ts +4 -0
- package/umd/typings/src/_packages/cli.index.d.ts +10 -0
- package/umd/typings/src/_packages/core.index.d.ts +44 -0
- package/umd/typings/src/_packages/execute-javascript.index.d.ts +48 -0
- package/umd/typings/src/_packages/fake-llm.index.d.ts +7 -0
- package/umd/typings/src/_packages/langtail.index.d.ts +4 -0
- package/umd/typings/src/_packages/markdown-utils.index.d.ts +17 -0
- package/umd/typings/src/_packages/node.index.d.ts +4 -0
- package/umd/typings/src/_packages/openai.index.d.ts +5 -0
- package/umd/typings/src/_packages/remote-client.index.d.ts +5 -0
- package/umd/typings/src/_packages/remote-server.index.d.ts +4 -0
- package/umd/typings/src/_packages/types.index.d.ts +38 -0
- package/umd/typings/src/_packages/utils.index.d.ts +74 -0
- package/umd/typings/src/cli/cli-commands/hello.d.ts +7 -0
- package/umd/typings/src/cli/cli-commands/make.d.ts +7 -0
- package/umd/typings/src/cli/cli-commands/prettify.d.ts +7 -0
- package/umd/typings/src/cli/promptbookCli.d.ts +9 -0
- package/umd/typings/src/collection/PipelineCollection.d.ts +25 -0
- package/umd/typings/src/collection/SimplePipelineCollection.d.ts +38 -0
- package/umd/typings/src/collection/collectionToJson.d.ts +11 -0
- package/umd/typings/src/collection/collectionToJson.test.d.ts +7 -0
- package/umd/typings/src/collection/constructors/createCollectionFromDirectory.d.ts +47 -0
- package/umd/typings/src/collection/constructors/createCollectionFromDirectory.test.d.ts +1 -0
- package/umd/typings/src/collection/constructors/createCollectionFromJson.d.ts +12 -0
- package/umd/typings/src/collection/constructors/createCollectionFromJson.test.d.ts +1 -0
- package/umd/typings/src/collection/constructors/createCollectionFromPromise.d.ts +22 -0
- package/umd/typings/src/collection/constructors/createCollectionFromPromise.test.d.ts +1 -0
- package/umd/typings/src/collection/constructors/createCollectionFromUrl.d.ts +29 -0
- package/umd/typings/src/collection/constructors/createSubcollection.d.ts +12 -0
- package/umd/typings/src/collection/constructors/justTestFsImport.d.ts +7 -0
- package/umd/typings/src/commands/BLOCK/BlockCommand.d.ts +11 -0
- package/umd/typings/src/commands/BLOCK/BlockTypes.d.ts +13 -0
- package/umd/typings/src/commands/BLOCK/blockCommand.test.d.ts +1 -0
- package/umd/typings/src/commands/BLOCK/blockCommandParser.d.ts +9 -0
- package/umd/typings/src/commands/EXPECT/ExpectAmountCommand.d.ts +14 -0
- package/umd/typings/src/commands/EXPECT/ExpectCommand.d.ts +9 -0
- package/umd/typings/src/commands/EXPECT/ExpectFormatCommand.d.ts +7 -0
- package/umd/typings/src/commands/EXPECT/expectCommand.test.d.ts +1 -0
- package/umd/typings/src/commands/EXPECT/expectCommandParser.d.ts +9 -0
- package/umd/typings/src/commands/JOKER/JokerCommand.d.ts +11 -0
- package/umd/typings/src/commands/JOKER/jokerCommand.test.d.ts +1 -0
- package/umd/typings/src/commands/JOKER/jokerCommandParser.d.ts +9 -0
- package/umd/typings/src/commands/KNOWLEDGE/KnowledgeCommand.d.ts +12 -0
- package/umd/typings/src/commands/KNOWLEDGE/knowledgeCommand.test.d.ts +1 -0
- package/umd/typings/src/commands/KNOWLEDGE/knowledgeCommandParser.d.ts +9 -0
- package/umd/typings/src/commands/MODEL/ModelCommand.d.ts +13 -0
- package/umd/typings/src/commands/MODEL/modelCommand.test.d.ts +1 -0
- package/umd/typings/src/commands/MODEL/modelCommandParser.d.ts +9 -0
- package/umd/typings/src/commands/PARAMETER/ParameterCommand.d.ts +15 -0
- package/umd/typings/src/commands/PARAMETER/parameterCommand.test.d.ts +1 -0
- package/umd/typings/src/commands/PARAMETER/parameterCommandParser.d.ts +9 -0
- package/umd/typings/src/commands/PERSONA/PersonaCommand.d.ts +11 -0
- package/umd/typings/src/commands/PERSONA/personaCommand.test.d.ts +1 -0
- package/umd/typings/src/commands/PERSONA/personaCommandParser.d.ts +9 -0
- package/umd/typings/src/commands/POSTPROCESS/PostprocessCommand.d.ts +11 -0
- package/umd/typings/src/commands/POSTPROCESS/postprocessCommand.test.d.ts +1 -0
- package/umd/typings/src/commands/POSTPROCESS/postprocessCommandParser.d.ts +9 -0
- package/umd/typings/src/commands/PROMPTBOOK_VERSION/PromptbookVersionCommand.d.ts +11 -0
- package/umd/typings/src/commands/PROMPTBOOK_VERSION/promptbookVersionCommand.test.d.ts +1 -0
- package/umd/typings/src/commands/PROMPTBOOK_VERSION/promptbookVersionCommandParser.d.ts +9 -0
- package/umd/typings/src/commands/URL/UrlCommand.d.ts +10 -0
- package/umd/typings/src/commands/URL/urlCommand.test.d.ts +1 -0
- package/umd/typings/src/commands/URL/urlCommandParser.d.ts +9 -0
- package/umd/typings/src/commands/X_ACTION/ActionCommand.d.ts +9 -0
- package/umd/typings/src/commands/X_ACTION/actionCommand.test.d.ts +1 -0
- package/umd/typings/src/commands/X_ACTION/actionCommandParser.d.ts +9 -0
- package/umd/typings/src/commands/X_INSTRUMENT/InstrumentCommand.d.ts +9 -0
- package/umd/typings/src/commands/X_INSTRUMENT/instrumentCommand.test.d.ts +1 -0
- package/umd/typings/src/commands/X_INSTRUMENT/instrumentCommandParser.d.ts +9 -0
- package/umd/typings/src/commands/_BOILERPLATE/BoilerplateCommand.d.ts +10 -0
- package/umd/typings/src/commands/_BOILERPLATE/boilerplateCommand.test.d.ts +1 -0
- package/umd/typings/src/commands/_BOILERPLATE/boilerplateCommandParser.d.ts +12 -0
- package/umd/typings/src/commands/_common/parseCommand.d.ts +12 -0
- package/umd/typings/src/commands/_common/parseCommand.test.d.ts +1 -0
- package/umd/typings/src/commands/_common/types/Command.d.ts +6 -0
- package/umd/typings/src/commands/_common/types/CommandParser.d.ts +36 -0
- package/umd/typings/src/commands/_common/types/CommandUsagePlaces.d.ts +9 -0
- package/umd/typings/src/commands/index.d.ts +4 -0
- package/umd/typings/src/config.d.ts +16 -0
- package/umd/typings/src/conversion/pipelineJsonToString.d.ts +14 -0
- package/umd/typings/src/conversion/pipelineStringToJson.d.ts +31 -0
- package/umd/typings/src/conversion/pipelineStringToJson.test.d.ts +1 -0
- package/umd/typings/src/conversion/pipelineStringToJsonSync.d.ts +25 -0
- package/umd/typings/src/conversion/pipelineStringToJsonSync.test.d.ts +1 -0
- package/umd/typings/src/conversion/prettify/PrettifyOptions.d.ts +13 -0
- package/umd/typings/src/conversion/prettify/prettifyPipelineString.d.ts +10 -0
- package/umd/typings/src/conversion/prettify/renderPipelineMermaidOptions.d.ts +25 -0
- package/umd/typings/src/conversion/utils/extractParametersFromPromptTemplate.d.ts +13 -0
- package/umd/typings/src/conversion/utils/extractParametersFromPromptTemplate.test.d.ts +1 -0
- package/umd/typings/src/conversion/utils/extractVariables.d.ts +13 -0
- package/umd/typings/src/conversion/utils/extractVariables.test.d.ts +1 -0
- package/umd/typings/src/conversion/utils/renameParameter.d.ts +25 -0
- package/umd/typings/src/conversion/utils/renameParameter.test.d.ts +1 -0
- package/umd/typings/src/conversion/utils/titleToName.d.ts +4 -0
- package/umd/typings/src/conversion/utils/titleToName.test.d.ts +1 -0
- package/umd/typings/src/conversion/validation/_importPipeline.d.ts +13 -0
- package/umd/typings/src/conversion/validation/pipelineStringToJson-syntaxErrors.test.d.ts +1 -0
- package/umd/typings/src/conversion/validation/validatePipeline-logicErrors.test.d.ts +4 -0
- package/umd/typings/src/conversion/validation/validatePipeline.d.ts +27 -0
- package/umd/typings/src/conversion/validation/validatePipeline.test.d.ts +1 -0
- package/umd/typings/src/errors/CollectionError.d.ts +7 -0
- package/umd/typings/src/errors/NotFoundError.d.ts +7 -0
- package/umd/typings/src/errors/NotYetImplementedError.d.ts +7 -0
- package/umd/typings/src/errors/ParsingError.d.ts +7 -0
- package/umd/typings/src/errors/PipelineExecutionError.d.ts +7 -0
- package/umd/typings/src/errors/PipelineLogicError.d.ts +7 -0
- package/umd/typings/src/errors/ReferenceError.d.ts +7 -0
- package/umd/typings/src/errors/UnexpectedError.d.ts +7 -0
- package/umd/typings/src/errors/_ExpectError.d.ts +10 -0
- package/umd/typings/src/execution/CommonExecutionToolsOptions.d.ts +9 -0
- package/umd/typings/src/execution/EmbeddingVector.d.ts +8 -0
- package/umd/typings/src/execution/ExecutionTools.d.ts +33 -0
- package/umd/typings/src/execution/LlmExecutionTools.d.ts +70 -0
- package/umd/typings/src/execution/PipelineExecutor.d.ts +42 -0
- package/umd/typings/src/execution/PromptResult.d.ts +114 -0
- package/umd/typings/src/execution/ScriptExecutionTools.d.ts +38 -0
- package/umd/typings/src/execution/UserInterfaceTools.d.ts +46 -0
- package/umd/typings/src/execution/addPromptResultUsage.test.d.ts +1 -0
- package/umd/typings/src/execution/assertsExecutionSuccessful.d.ts +11 -0
- package/umd/typings/src/execution/createPipelineExecutor.d.ts +42 -0
- package/umd/typings/src/execution/embeddingVectorToString.d.ts +5 -0
- package/umd/typings/src/execution/translation/automatic-translate/automatic-translators/AutomaticTranslator.d.ts +4 -0
- package/umd/typings/src/execution/translation/automatic-translate/automatic-translators/DebugAutomaticTranslator.d.ts +9 -0
- package/umd/typings/src/execution/translation/automatic-translate/automatic-translators/FakeAutomaticTranslator.d.ts +5 -0
- package/umd/typings/src/execution/translation/automatic-translate/automatic-translators/LindatAutomaticTranslator.d.ts +11 -0
- package/umd/typings/src/execution/translation/automatic-translate/automatic-translators/TranslatorOptions.d.ts +4 -0
- package/umd/typings/src/execution/translation/automatic-translate/automatic-translators/utils/extractMultiplicatedOccurrence.d.ts +7 -0
- package/umd/typings/src/execution/translation/automatic-translate/automatic-translators/utils/extractMultiplicatedOccurrence.test.d.ts +1 -0
- package/umd/typings/src/execution/translation/automatic-translate/translateMessages.d.ts +5 -0
- package/umd/typings/src/execution/utils/addUsage.d.ts +7 -0
- package/umd/typings/src/execution/utils/addUsage.test.d.ts +1 -0
- package/umd/typings/src/execution/utils/checkExpectations.d.ts +25 -0
- package/umd/typings/src/execution/utils/checkExpectations.test.d.ts +1 -0
- package/umd/typings/src/execution/utils/computeUsageCounts.d.ts +10 -0
- package/umd/typings/src/execution/utils/forEachAsync.d.ts +18 -0
- package/umd/typings/src/execution/utils/replaceParameters.d.ts +13 -0
- package/umd/typings/src/execution/utils/replaceParameters.test.d.ts +1 -0
- package/umd/typings/src/execution/utils/uncertainNumber.d.ts +9 -0
- package/umd/typings/src/execution/utils/usageToWorktime.d.ts +10 -0
- package/umd/typings/src/execution/utils/usageToWorktime.test.d.ts +1 -0
- package/umd/typings/src/expectations/drafts/isDomainNameFree.d.ts +6 -0
- package/umd/typings/src/expectations/drafts/isGithubNameFree.d.ts +6 -0
- package/umd/typings/src/formats/_common/FormatDefinition.d.ts +69 -0
- package/umd/typings/src/formats/csv/ListFormatDefinition.d.ts +11 -0
- package/umd/typings/src/formats/index.d.ts +4 -0
- package/umd/typings/src/formats/json/JsonFormatDefinition.d.ts +15 -0
- package/umd/typings/src/formats/json/utils/isValidJsonString.d.ts +4 -0
- package/umd/typings/src/formats/json/utils/isValidJsonString.test.d.ts +1 -0
- package/umd/typings/src/formats/list/ListFormatDefinition.d.ts +13 -0
- package/umd/typings/src/formats/xml/XmlFormatDefinition.d.ts +15 -0
- package/umd/typings/src/knowledge/dialogs/callback/CallbackInterfaceTools.d.ts +15 -0
- package/umd/typings/src/knowledge/dialogs/callback/CallbackInterfaceToolsOptions.d.ts +12 -0
- package/umd/typings/src/knowledge/dialogs/simple-prompt/SimplePromptInterfaceTools.d.ts +17 -0
- package/umd/typings/src/knowledge/dialogs/user-interface-execution-tools.test.d.ts +1 -0
- package/umd/typings/src/knowledge/prepare-knowledge/markdown/playground/markdown-knowledge-playground.d.ts +2 -0
- package/umd/typings/src/knowledge/prepare-knowledge/markdown/prepareKnowledgeFromMarkdown.d.ts +26 -0
- package/umd/typings/src/knowledge/prepare-knowledge/markdown/prepareKnowledgeFromMarkdown.test.d.ts +1 -0
- package/umd/typings/src/knowledge/prepare-knowledge/pdf/prepareKnowledgeFromPdf.d.ts +19 -0
- package/umd/typings/src/knowledge/prepare-knowledge/pdf/prepareKnowledgeFromPdf.test.d.ts +1 -0
- package/umd/typings/src/llm-providers/anthropic-claude/AnthropicClaudeExecutionTools.d.ts +48 -0
- package/umd/typings/src/llm-providers/anthropic-claude/AnthropicClaudeExecutionToolsOptions.d.ts +8 -0
- package/umd/typings/src/llm-providers/anthropic-claude/anthropic-claude-models.d.ts +22 -0
- package/umd/typings/src/llm-providers/anthropic-claude/playground/playground.d.ts +2 -0
- package/umd/typings/src/llm-providers/azure-openai/AzureOpenAiExecutionTools.d.ts +47 -0
- package/umd/typings/src/llm-providers/azure-openai/AzureOpenAiExecutionToolsOptions.d.ts +35 -0
- package/umd/typings/src/llm-providers/azure-openai/playground/playground.d.ts +2 -0
- package/umd/typings/src/llm-providers/langtail/LangtailExecutionTools.d.ts +12 -0
- package/umd/typings/src/llm-providers/langtail/LangtailExecutionToolsOptions.d.ts +11 -0
- package/umd/typings/src/llm-providers/langtail/playground/playground.d.ts +2 -0
- package/umd/typings/src/llm-providers/mocked/MockedEchoLlmExecutionTools.d.ts +34 -0
- package/umd/typings/src/llm-providers/mocked/MockedFackedLlmExecutionTools.d.ts +38 -0
- package/umd/typings/src/llm-providers/mocked/fakeTextToExpectations.d.ts +14 -0
- package/umd/typings/src/llm-providers/mocked/test/fakeTextToExpectations.test.d.ts +1 -0
- package/umd/typings/src/llm-providers/mocked/test/faked-completion.test.d.ts +1 -0
- package/umd/typings/src/llm-providers/mocked/test/joker.test.d.ts +4 -0
- package/umd/typings/src/llm-providers/mocked/test/mocked-chat.test.d.ts +5 -0
- package/umd/typings/src/llm-providers/mocked/test/mocked-completion.test.d.ts +4 -0
- package/umd/typings/src/llm-providers/multiple/MultipleLlmExecutionTools.d.ts +50 -0
- package/umd/typings/src/llm-providers/multiple/joinLlmExecutionTools.d.ts +16 -0
- package/umd/typings/src/llm-providers/multiple/playground/playground.d.ts +2 -0
- package/umd/typings/src/llm-providers/openai/OpenAiExecutionTools.d.ts +65 -0
- package/umd/typings/src/llm-providers/openai/OpenAiExecutionToolsOptions.d.ts +18 -0
- package/umd/typings/src/llm-providers/openai/computeOpenaiUsage.d.ts +14 -0
- package/umd/typings/src/llm-providers/openai/computeUsage.d.ts +16 -0
- package/umd/typings/src/llm-providers/openai/computeUsage.test.d.ts +1 -0
- package/umd/typings/src/llm-providers/openai/openai-models.d.ts +27 -0
- package/umd/typings/src/llm-providers/openai/playground/playground.d.ts +2 -0
- package/umd/typings/src/llm-providers/remote/RemoteLlmExecutionTools.d.ts +52 -0
- package/umd/typings/src/llm-providers/remote/RemoteLlmExecutionToolsOptions.d.ts +24 -0
- package/umd/typings/src/llm-providers/remote/interfaces/Promptbook_Server_Error.d.ts +11 -0
- package/umd/typings/src/llm-providers/remote/interfaces/Promptbook_Server_Progress.d.ts +12 -0
- package/umd/typings/src/llm-providers/remote/interfaces/Promptbook_Server_Request.d.ts +17 -0
- package/umd/typings/src/llm-providers/remote/interfaces/Promptbook_Server_Response.d.ts +12 -0
- package/umd/typings/src/llm-providers/remote/interfaces/RemoteServerOptions.d.ts +28 -0
- package/umd/typings/src/llm-providers/remote/startRemoteServer.d.ts +19 -0
- package/umd/typings/src/personas/personaToModelRequirements.d.ts +6 -0
- package/umd/typings/src/scripting/_test/custom-function-async.test.ts.test.d.ts +1 -0
- package/umd/typings/src/scripting/_test/custom-function-missing.test.d.ts +1 -0
- package/umd/typings/src/scripting/_test/custom-function-with-dependencies.test.d.ts +1 -0
- package/umd/typings/src/scripting/_test/custom-function.test.d.ts +1 -0
- package/umd/typings/src/scripting/_test/postprocessing.test.d.ts +1 -0
- package/umd/typings/src/scripting/_test/script-execution-errors.test.d.ts +1 -0
- package/umd/typings/src/scripting/_test/script-execution-tools.test.d.ts +1 -0
- package/umd/typings/src/scripting/javascript/JavascriptEvalExecutionTools.d.ts +20 -0
- package/umd/typings/src/scripting/javascript/JavascriptEvalExecutionTools.test.d.ts +4 -0
- package/umd/typings/src/scripting/javascript/JavascriptExecutionTools.d.ts +7 -0
- package/umd/typings/src/scripting/javascript/JavascriptExecutionToolsOptions.d.ts +26 -0
- package/umd/typings/src/scripting/javascript/utils/preserve.d.ts +12 -0
- package/umd/typings/src/scripting/javascript/utils/unknownToString.d.ts +7 -0
- package/umd/typings/src/scripting/python/PythonExecutionTools.d.ts +16 -0
- package/umd/typings/src/scripting/typescript/TypescriptExecutionTools.d.ts +16 -0
- package/umd/typings/src/types/Arrayable.d.ts +10 -0
- package/umd/typings/src/types/ModelRequirements.d.ts +43 -0
- package/umd/typings/src/types/Parameters.d.ts +14 -0
- package/umd/typings/src/types/PipelineJson/Expectations.d.ts +28 -0
- package/umd/typings/src/types/PipelineJson/KnowledgeJson.d.ts +6 -0
- package/umd/typings/src/types/PipelineJson/LlmTemplateJson.d.ts +16 -0
- package/umd/typings/src/types/PipelineJson/MaterialKnowledgePieceJson.d.ts +28 -0
- package/umd/typings/src/types/PipelineJson/PipelineJson.d.ts +61 -0
- package/umd/typings/src/types/PipelineJson/PromptDialogJson.d.ts +7 -0
- package/umd/typings/src/types/PipelineJson/PromptTemplateJson.d.ts +9 -0
- package/umd/typings/src/types/PipelineJson/PromptTemplateJsonCommon.d.ts +77 -0
- package/umd/typings/src/types/PipelineJson/PromptTemplateParameterJson.d.ts +26 -0
- package/umd/typings/src/types/PipelineJson/ScriptJson.d.ts +14 -0
- package/umd/typings/src/types/PipelineJson/SimpleTemplateJson.d.ts +7 -0
- package/umd/typings/src/types/PipelineString.d.ts +12 -0
- package/umd/typings/src/types/Prompt.d.ts +65 -0
- package/umd/typings/src/types/ScriptLanguage.d.ts +9 -0
- package/umd/typings/src/types/TaskProgress.d.ts +43 -0
- package/umd/typings/src/types/execution-report/ExecutionReportJson.d.ts +58 -0
- package/umd/typings/src/types/execution-report/ExecutionReportString.d.ts +16 -0
- package/umd/typings/src/types/execution-report/ExecutionReportStringOptions.d.ts +21 -0
- package/umd/typings/src/types/execution-report/config.d.ts +8 -0
- package/umd/typings/src/types/execution-report/countWorkingDuration.d.ts +7 -0
- package/umd/typings/src/types/execution-report/countWorkingDuration.test.d.ts +1 -0
- package/umd/typings/src/types/execution-report/executionReportJsonToString.d.ts +11 -0
- package/umd/typings/src/types/typeAliasEmoji.d.ts +9 -0
- package/umd/typings/src/types/typeAliases.d.ts +480 -0
- package/umd/typings/src/utils/FromtoItems.d.ts +19 -0
- package/umd/typings/src/utils/arrayableToArray.d.ts +11 -0
- package/umd/typings/src/utils/arrayableToArray.test.d.ts +1 -0
- package/umd/typings/src/utils/emojis.d.ts +23 -0
- package/umd/typings/src/utils/expectation-counters/countCharacters.d.ts +5 -0
- package/umd/typings/src/utils/expectation-counters/countCharacters.test.d.ts +1 -0
- package/umd/typings/src/utils/expectation-counters/countLines.d.ts +5 -0
- package/umd/typings/src/utils/expectation-counters/countLines.test.d.ts +1 -0
- package/umd/typings/src/utils/expectation-counters/countPages.d.ts +5 -0
- package/umd/typings/src/utils/expectation-counters/countPages.test.d.ts +1 -0
- package/umd/typings/src/utils/expectation-counters/countParagraphs.d.ts +5 -0
- package/umd/typings/src/utils/expectation-counters/countParagraphs.test.d.ts +1 -0
- package/umd/typings/src/utils/expectation-counters/countSentences.d.ts +9 -0
- package/umd/typings/src/utils/expectation-counters/countSentences.test.d.ts +1 -0
- package/umd/typings/src/utils/expectation-counters/countWords.d.ts +5 -0
- package/umd/typings/src/utils/expectation-counters/countWords.test.d.ts +1 -0
- package/umd/typings/src/utils/expectation-counters/index.d.ts +6 -0
- package/umd/typings/src/utils/extractParameters.d.ts +9 -0
- package/umd/typings/src/utils/extractParameters.test.d.ts +1 -0
- package/umd/typings/src/utils/formatNumber.d.ts +6 -0
- package/umd/typings/src/utils/formatNumber.test.d.ts +1 -0
- package/umd/typings/src/utils/getCurrentIsoDate.d.ts +7 -0
- package/umd/typings/src/utils/isRunningInWhatever.d.ts +12 -0
- package/umd/typings/src/utils/just.d.ts +10 -0
- package/umd/typings/src/utils/markdown/addAutoGeneratedSection.d.ts +11 -0
- package/umd/typings/src/utils/markdown/addAutoGeneratedSection.test.d.ts +1 -0
- package/umd/typings/src/utils/markdown/createMarkdownChart.d.ts +41 -0
- package/umd/typings/src/utils/markdown/createMarkdownChart.test.d.ts +1 -0
- package/umd/typings/src/utils/markdown/createMarkdownTable.d.ts +8 -0
- package/umd/typings/src/utils/markdown/createMarkdownTable.test.d.ts +1 -0
- package/umd/typings/src/utils/markdown/escapeMarkdownBlock.d.ts +6 -0
- package/umd/typings/src/utils/markdown/escapeMarkdownBlock.test.d.ts +1 -0
- package/umd/typings/src/utils/markdown/extractAllBlocksFromMarkdown.d.ts +27 -0
- package/umd/typings/src/utils/markdown/extractAllBlocksFromMarkdown.test.d.ts +1 -0
- package/umd/typings/src/utils/markdown/extractAllListItemsFromMarkdown.d.ts +14 -0
- package/umd/typings/src/utils/markdown/extractAllListItemsFromMarkdown.test.d.ts +1 -0
- package/umd/typings/src/utils/markdown/extractOneBlockFromMarkdown.d.ts +19 -0
- package/umd/typings/src/utils/markdown/extractOneBlockFromMarkdown.test.d.ts +1 -0
- package/umd/typings/src/utils/markdown/flattenMarkdown.d.ts +14 -0
- package/umd/typings/src/utils/markdown/flattenMarkdown.test.d.ts +1 -0
- package/umd/typings/src/utils/markdown/parseMarkdownSection.d.ts +30 -0
- package/umd/typings/src/utils/markdown/parseMarkdownSection.test.d.ts +1 -0
- package/umd/typings/src/utils/markdown/prettifyMarkdown.d.ts +9 -0
- package/umd/typings/src/utils/markdown/prettifyMarkdown.test.d.ts +1 -0
- package/umd/typings/src/utils/markdown/removeContentComments.d.ts +9 -0
- package/umd/typings/src/utils/markdown/removeContentComments.test.d.ts +1 -0
- package/umd/typings/src/utils/markdown/removeMarkdownFormatting.d.ts +8 -0
- package/umd/typings/src/utils/markdown/removeMarkdownFormatting.test.d.ts +1 -0
- package/umd/typings/src/utils/markdown/splitMarkdownIntoSections.d.ts +12 -0
- package/umd/typings/src/utils/markdown/splitMarkdownIntoSections.test.d.ts +1 -0
- package/umd/typings/src/utils/normalization/DIACRITIC_VARIANTS_LETTERS.d.ts +10 -0
- package/umd/typings/src/utils/normalization/IKeywords.d.ts +18 -0
- package/umd/typings/src/utils/normalization/capitalize.d.ts +5 -0
- package/umd/typings/src/utils/normalization/capitalize.test.d.ts +1 -0
- package/umd/typings/src/utils/normalization/decapitalize.d.ts +5 -0
- package/umd/typings/src/utils/normalization/decapitalize.test.d.ts +1 -0
- package/umd/typings/src/utils/normalization/isValidKeyword.d.ts +8 -0
- package/umd/typings/src/utils/normalization/isValidKeyword.test.d.ts +1 -0
- package/umd/typings/src/utils/normalization/nameToUriPart.d.ts +1 -0
- package/umd/typings/src/utils/normalization/nameToUriPart.test.d.ts +1 -0
- package/umd/typings/src/utils/normalization/nameToUriParts.d.ts +1 -0
- package/umd/typings/src/utils/normalization/nameToUriParts.test.d.ts +1 -0
- package/umd/typings/src/utils/normalization/normalize-to-kebab-case.d.ts +8 -0
- package/umd/typings/src/utils/normalization/normalize-to-kebab-case.test.d.ts +1 -0
- package/umd/typings/src/utils/normalization/normalizeTo_PascalCase.d.ts +8 -0
- package/umd/typings/src/utils/normalization/normalizeTo_PascalCase.test.d.ts +1 -0
- package/umd/typings/src/utils/normalization/normalizeTo_SCREAMING_CASE.d.ts +16 -0
- package/umd/typings/src/utils/normalization/normalizeTo_SCREAMING_CASE.test.d.ts +1 -0
- package/umd/typings/src/utils/normalization/normalizeTo_camelCase.d.ts +11 -0
- package/umd/typings/src/utils/normalization/normalizeTo_camelCase.test.d.ts +1 -0
- package/umd/typings/src/utils/normalization/normalizeTo_snake_case.d.ts +8 -0
- package/umd/typings/src/utils/normalization/normalizeTo_snake_case.test.d.ts +1 -0
- package/umd/typings/src/utils/normalization/normalizeWhitespaces.d.ts +4 -0
- package/umd/typings/src/utils/normalization/normalizeWhitespaces.test.d.ts +1 -0
- package/umd/typings/src/utils/normalization/parseKeywords.d.ts +14 -0
- package/umd/typings/src/utils/normalization/parseKeywords.test.d.ts +1 -0
- package/umd/typings/src/utils/normalization/parseKeywordsFromString.d.ts +8 -0
- package/umd/typings/src/utils/normalization/parseKeywordsFromString.test.d.ts +1 -0
- package/umd/typings/src/utils/normalization/removeDiacritics.d.ts +4 -0
- package/umd/typings/src/utils/normalization/removeDiacritics.test.d.ts +1 -0
- package/umd/typings/src/utils/normalization/searchKeywords.d.ts +5 -0
- package/umd/typings/src/utils/normalization/searchKeywords.test.d.ts +1 -0
- package/umd/typings/src/utils/parseNumber.d.ts +15 -0
- package/umd/typings/src/utils/parseNumber.test.d.ts +1 -0
- package/umd/typings/src/utils/postprocessing/extractBlock.d.ts +12 -0
- package/umd/typings/src/utils/removeEmojis.d.ts +7 -0
- package/umd/typings/src/utils/removeEmojis.test.d.ts +1 -0
- package/umd/typings/src/utils/removeQuotes.d.ts +13 -0
- package/umd/typings/src/utils/removeQuotes.test.d.ts +1 -0
- package/umd/typings/src/utils/sets/difference.d.ts +6 -0
- package/umd/typings/src/utils/sets/difference.test.d.ts +1 -0
- package/umd/typings/src/utils/sets/intersection.d.ts +6 -0
- package/umd/typings/src/utils/sets/intersection.test.d.ts +1 -0
- package/umd/typings/src/utils/sets/union.d.ts +6 -0
- package/umd/typings/src/utils/sets/union.test.d.ts +1 -0
- package/umd/typings/src/utils/trimCodeBlock.d.ts +8 -0
- package/umd/typings/src/utils/trimCodeBlock.test.d.ts +1 -0
- package/umd/typings/src/utils/trimEndOfCodeBlock.d.ts +7 -0
- package/umd/typings/src/utils/trimEndOfCodeBlock.test.d.ts +1 -0
- package/umd/typings/src/utils/unwrapResult.d.ts +36 -0
- package/umd/typings/src/utils/unwrapResult.test.d.ts +1 -0
- package/umd/typings/src/utils/validators/email/isValidEmail.d.ts +5 -0
- package/umd/typings/src/utils/validators/email/isValidEmail.test.d.ts +1 -0
- package/umd/typings/src/utils/validators/filePath/isValidFilePath.d.ts +7 -0
- package/umd/typings/src/utils/validators/filePath/isValidFilePath.test.d.ts +1 -0
- package/umd/typings/src/utils/validators/javascriptName/isValidJavascriptName.d.ts +2 -0
- package/umd/typings/src/utils/validators/javascriptName/isValidJavascriptName.test.d.ts +1 -0
- package/umd/typings/src/utils/validators/semanticVersion/isValidPromptbookVersion.d.ts +12 -0
- package/umd/typings/src/utils/validators/semanticVersion/isValidPromptbookVersion.test.d.ts +1 -0
- package/umd/typings/src/utils/validators/semanticVersion/isValidSemanticVersion.d.ts +9 -0
- package/umd/typings/src/utils/validators/semanticVersion/isValidSemanticVersion.test.d.ts +1 -0
- package/umd/typings/src/utils/validators/url/isHostnameOnPrivateNetwork.d.ts +9 -0
- package/umd/typings/src/utils/validators/url/isHostnameOnPrivateNetwork.test.d.ts +1 -0
- package/umd/typings/src/utils/validators/url/isUrlOnPrivateNetwork.d.ts +12 -0
- package/umd/typings/src/utils/validators/url/isUrlOnPrivateNetwork.test.d.ts +1 -0
- package/umd/typings/src/utils/validators/url/isValidPipelineUrl.d.ts +12 -0
- package/umd/typings/src/utils/validators/url/isValidPipelineUrl.test.d.ts +1 -0
- package/umd/typings/src/utils/validators/url/isValidUrl.d.ts +10 -0
- package/umd/typings/src/utils/validators/url/isValidUrl.test.d.ts +1 -0
- package/umd/typings/src/utils/validators/uuid/isValidUuid.d.ts +5 -0
- package/umd/typings/src/utils/validators/uuid/isValidUuid.test.d.ts +1 -0
- package/umd/typings/src/version.d.ts +6 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { Expectations } from '../../types/PipelineJson/Expectations';
|
|
2
|
+
/**
|
|
3
|
+
* Function checkExpectations will check if the expectations on given value are met
|
|
4
|
+
*
|
|
5
|
+
* Note: There are two simmilar functions:
|
|
6
|
+
* - `checkExpectations` which throws an error if the expectations are not met
|
|
7
|
+
* - `isPassingExpectations` which returns a boolean
|
|
8
|
+
*
|
|
9
|
+
* @throws {ExpectError} if the expectations are not met
|
|
10
|
+
* @returns {void} Nothing
|
|
11
|
+
*/
|
|
12
|
+
export declare function checkExpectations(expectations: Expectations, value: string): void;
|
|
13
|
+
/**
|
|
14
|
+
* Function checkExpectations will check if the expectations on given value are met
|
|
15
|
+
*
|
|
16
|
+
* Note: There are two simmilar functions:
|
|
17
|
+
* - `checkExpectations` which throws an error if the expectations are not met
|
|
18
|
+
* - `isPassingExpectations` which returns a boolean
|
|
19
|
+
*
|
|
20
|
+
* @returns {boolean} True if the expectations are met
|
|
21
|
+
*/
|
|
22
|
+
export declare function isPassingExpectations(expectations: Expectations, value: string): boolean;
|
|
23
|
+
/**
|
|
24
|
+
* TODO: [💝] Unite object for expecting amount and format
|
|
25
|
+
*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { PromptResultUsageCounts } from '../PromptResult';
|
|
2
|
+
/**
|
|
3
|
+
* Helper of usage compute
|
|
4
|
+
*
|
|
5
|
+
* @param content the content of prompt or response
|
|
6
|
+
* @returns part of PromptResultUsageCounts
|
|
7
|
+
*
|
|
8
|
+
* @private internal util of LlmExecutionTools
|
|
9
|
+
*/
|
|
10
|
+
export declare function computeUsageCounts(content: string): Omit<PromptResultUsageCounts, 'tokensCount'>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { Promisable } from 'type-fest';
|
|
2
|
+
type ForEachAsyncOptions = {
|
|
3
|
+
/**
|
|
4
|
+
* Maximum number of tasks running in parallel
|
|
5
|
+
*
|
|
6
|
+
* @default Infinity
|
|
7
|
+
*/
|
|
8
|
+
inParallelCount?: number;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Async version of Array.forEach
|
|
12
|
+
*
|
|
13
|
+
* @param array - Array to iterate over
|
|
14
|
+
* @param options - Options for the function
|
|
15
|
+
* @param callbackfunction - Function to call for each item
|
|
16
|
+
*/
|
|
17
|
+
export declare function forEachAsync<TItem>(array: Array<TItem>, options: ForEachAsyncOptions, callbackfunction: (value: TItem, index: number, array: Array<TItem>) => Promisable<void>): Promise<void>;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Parameters } from '../../types/Parameters';
|
|
2
|
+
import type { string_template } from '../../types/typeAliases';
|
|
3
|
+
/**
|
|
4
|
+
* Replaces parameters in template with values from parameters object
|
|
5
|
+
*
|
|
6
|
+
* @param template the template with parameters in {curly} braces
|
|
7
|
+
* @param parameters the object with parameters
|
|
8
|
+
* @returns the template with replaced parameters
|
|
9
|
+
* @throws {PipelineExecutionError} if parameter is not defined, not closed, or not opened
|
|
10
|
+
*
|
|
11
|
+
* @private within the createPipelineExecutor
|
|
12
|
+
*/
|
|
13
|
+
export declare function replaceParameters(template: string_template, parameters: Parameters): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { UncertainNumber } from '../PromptResult';
|
|
2
|
+
/**
|
|
3
|
+
* Make UncertainNumber
|
|
4
|
+
*
|
|
5
|
+
* @param value
|
|
6
|
+
*
|
|
7
|
+
* @private utility for initializating UncertainNumber
|
|
8
|
+
*/
|
|
9
|
+
export declare function uncertainNumber(value?: number | typeof NaN | undefined | null): UncertainNumber;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { PromptResultUsage } from '../PromptResult';
|
|
2
|
+
import type { UncertainNumber } from '../PromptResult';
|
|
3
|
+
/**
|
|
4
|
+
* Function usageToWorktime will take usage and estimate saved worktime in hours of reading / writing
|
|
5
|
+
*
|
|
6
|
+
* Note: This is an estimate based of theese sources:
|
|
7
|
+
* - https://jecas.cz/doba-cteni
|
|
8
|
+
* - https://www.originalnitonery.cz/blog/psani-vsemi-deseti-se-muzete-naucit-i-sami-doma
|
|
9
|
+
*/
|
|
10
|
+
export declare function usageToWorktime(usage: PromptResultUsage): UncertainNumber;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import type { string_mime_type } from '../../types/typeAliases';
|
|
2
|
+
import type { string_name } from '../../types/typeAliases';
|
|
3
|
+
/**
|
|
4
|
+
* A format definition is a set of functions that define how to validate, heal and convert response from LLM
|
|
5
|
+
*
|
|
6
|
+
* @see https://github.com/webgptorg/promptbook/discussions/36
|
|
7
|
+
*/
|
|
8
|
+
export type FormatDefinition<TValue extends TPartialValue, TPartialValue extends string, TSchema extends object> = {
|
|
9
|
+
/**
|
|
10
|
+
* The name of the format used in .ptbk.md files
|
|
11
|
+
*
|
|
12
|
+
* @sample "JSON"
|
|
13
|
+
*/
|
|
14
|
+
readonly name: string_name;
|
|
15
|
+
/**
|
|
16
|
+
* Aliases for the name
|
|
17
|
+
*/
|
|
18
|
+
readonly aliases?: Array<string_name>;
|
|
19
|
+
/**
|
|
20
|
+
* The mime type of the format (if any)
|
|
21
|
+
*
|
|
22
|
+
* @sample "application/json"
|
|
23
|
+
*/
|
|
24
|
+
readonly mimeType?: string_mime_type;
|
|
25
|
+
/**
|
|
26
|
+
* Check if a value is fully valid
|
|
27
|
+
*
|
|
28
|
+
* @param value The value to check, for example "{\"foo\": true}"
|
|
29
|
+
* @param schema Optional schema to do extra validation
|
|
30
|
+
*/
|
|
31
|
+
isValid(value: string, schema?: TSchema): value is TValue;
|
|
32
|
+
/**
|
|
33
|
+
* Check if a first part of a value is valid
|
|
34
|
+
*
|
|
35
|
+
* @see https://github.com/webgptorg/promptbook/discussions/37
|
|
36
|
+
*
|
|
37
|
+
* @param partialValue Partial value to check, for example "{\"foo\": t"
|
|
38
|
+
* @param schema Optional schema to do extra validation
|
|
39
|
+
*/
|
|
40
|
+
canBeValid(partialValue: string, schema?: TSchema): partialValue is TPartialValue;
|
|
41
|
+
/**
|
|
42
|
+
* Heal a value to make it valid if possible
|
|
43
|
+
*
|
|
44
|
+
* Note: This make sense in context of LLMs that often returns slightly invalid values
|
|
45
|
+
* @see https://github.com/webgptorg/promptbook/discussions/31
|
|
46
|
+
*
|
|
47
|
+
* @param value The value to heal, for example "{foo: true}"
|
|
48
|
+
* @param scheme
|
|
49
|
+
* @throws {Error} If the value cannot be healed
|
|
50
|
+
*/
|
|
51
|
+
heal(value: string, scheme?: TSchema): TValue;
|
|
52
|
+
/**
|
|
53
|
+
* Parses just the values and removes structural information
|
|
54
|
+
*
|
|
55
|
+
* Note: This is useful when you want to combine format expectations with counting words, characters,...
|
|
56
|
+
*
|
|
57
|
+
* @param value The value to check, for example "{\"name\": "John Smith"}"
|
|
58
|
+
* @param schema Optional schema
|
|
59
|
+
* @example "{\"name\": "John Smith"}" -> ["John Smith"]
|
|
60
|
+
*/
|
|
61
|
+
extractValues(value: string, schema?: TSchema): Array<string>;
|
|
62
|
+
};
|
|
63
|
+
/**
|
|
64
|
+
* TODO: [🍓]`name` and `aliases` should be UPPERCASE only and interpreted as case-insensitive (via normalization)
|
|
65
|
+
* TODO: [🍓][👨⚖️] Compute TPartialValue dynamically - PartialString<TValue>
|
|
66
|
+
* TODO: [🍓][🧠] Should execution tools be aviable to heal, canBeValid and isValid?
|
|
67
|
+
* TODO: [🍓][🧠] llm Provider Bindings
|
|
68
|
+
* TODO: [🍓]Export via some package
|
|
69
|
+
*/
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { FormatDefinition } from '../_common/FormatDefinition';
|
|
2
|
+
/**
|
|
3
|
+
* Definition for CSV spreadsheet
|
|
4
|
+
*/
|
|
5
|
+
export declare const CsvFormatDefinition: FormatDefinition<string, string, object>;
|
|
6
|
+
/**
|
|
7
|
+
* TODO: [🍓] In `CsvFormatDefinition` implement simple `isValid`
|
|
8
|
+
* TODO: [🍓] In `CsvFormatDefinition` implement partial `canBeValid`
|
|
9
|
+
* TODO: [🍓] In `CsvFormatDefinition` implement `heal
|
|
10
|
+
* TODO: [🍓] In `CsvFormatDefinition` implement `extractValues`
|
|
11
|
+
*/
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { FormatDefinition } from '../_common/FormatDefinition';
|
|
2
|
+
/**
|
|
3
|
+
* Definition for JSON format
|
|
4
|
+
*/
|
|
5
|
+
export declare const JsonFormatDefinition: FormatDefinition<string, string, object>;
|
|
6
|
+
/**
|
|
7
|
+
* TODO: [🧠] Maybe propper instance of object
|
|
8
|
+
* TODO: [0] Make string_serialized_json
|
|
9
|
+
* TODO: [1] Make type for JSON Schema
|
|
10
|
+
* TODO: [🧠] What to use for validating JSONs - JSON Schema, ZoD, typescript types/interfaces,...?
|
|
11
|
+
* TODO: [🍓] In `JsonFormatDefinition` implement simple `isValid`
|
|
12
|
+
* TODO: [🍓] In `JsonFormatDefinition` implement partial `canBeValid`
|
|
13
|
+
* TODO: [🍓] In `JsonFormatDefinition` implement `heal
|
|
14
|
+
* TODO: [🍓] In `JsonFormatDefinition` implement `extractValues`
|
|
15
|
+
*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { FormatDefinition } from '../_common/FormatDefinition';
|
|
2
|
+
/**
|
|
3
|
+
* Definition for list of multiple items
|
|
4
|
+
*
|
|
5
|
+
* Note: list is just a string with multiple lines or multiple items separated by comma
|
|
6
|
+
*/
|
|
7
|
+
export declare const ListFormatDefinition: FormatDefinition<string, string, object>;
|
|
8
|
+
/**
|
|
9
|
+
* TODO: [🍓] In `ListFormatDefinition` implement simple `isValid`
|
|
10
|
+
* TODO: [🍓] In `ListFormatDefinition` implement partial `canBeValid`
|
|
11
|
+
* TODO: [🍓] In `ListFormatDefinition` implement `heal
|
|
12
|
+
* TODO: [🍓] In `ListFormatDefinition` implement `extractValues`
|
|
13
|
+
*/
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { FormatDefinition } from '../_common/FormatDefinition';
|
|
2
|
+
/**
|
|
3
|
+
* Definition for XML format
|
|
4
|
+
*/
|
|
5
|
+
export declare const XmlFormatDefinition: FormatDefinition<string, string, object>;
|
|
6
|
+
/**
|
|
7
|
+
* TODO: [🧠] Maybe propper instance of object
|
|
8
|
+
* TODO: [0] Make string_serialized_xml
|
|
9
|
+
* TODO: [1] Make type for XML Schema
|
|
10
|
+
* TODO: [🧠] What to use for validating XMLs - XSD,...
|
|
11
|
+
* TODO: [🍓] In `XmlFormatDefinition` implement simple `isValid`
|
|
12
|
+
* TODO: [🍓] In `XmlFormatDefinition` implement partial `canBeValid`
|
|
13
|
+
* TODO: [🍓] In `XmlFormatDefinition` implement `heal
|
|
14
|
+
* TODO: [🍓] In `XmlFormatDefinition` implement `extractValues`
|
|
15
|
+
*/
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { UserInterfaceTools } from '../../../execution/UserInterfaceTools';
|
|
2
|
+
import type { UserInterfaceToolsPromptDialogOptions } from '../../../execution/UserInterfaceTools';
|
|
3
|
+
import type { CallbackInterfaceToolsOptions } from './CallbackInterfaceToolsOptions';
|
|
4
|
+
/**
|
|
5
|
+
* Delagates the user interaction to a async callback function
|
|
6
|
+
* You need to provide your own implementation of this callback function and its bind to UI.
|
|
7
|
+
*/
|
|
8
|
+
export declare class CallbackInterfaceTools implements UserInterfaceTools {
|
|
9
|
+
private readonly options;
|
|
10
|
+
constructor(options: CallbackInterfaceToolsOptions);
|
|
11
|
+
/**
|
|
12
|
+
* Trigger the custom callback function
|
|
13
|
+
*/
|
|
14
|
+
promptDialog(options: UserInterfaceToolsPromptDialogOptions): Promise<string>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Promisable } from 'type-fest';
|
|
2
|
+
import type { CommonExecutionToolsOptions } from '../../../execution/CommonExecutionToolsOptions';
|
|
3
|
+
import type { UserInterfaceToolsPromptDialogOptions } from '../../../execution/UserInterfaceTools';
|
|
4
|
+
/**
|
|
5
|
+
* Options for CallbackInterfaceTools
|
|
6
|
+
*/
|
|
7
|
+
export type CallbackInterfaceToolsOptions = CommonExecutionToolsOptions & {
|
|
8
|
+
/**
|
|
9
|
+
* The callback function to be called when promptDialog is called
|
|
10
|
+
*/
|
|
11
|
+
callback(prompt: UserInterfaceToolsPromptDialogOptions): Promisable<string>;
|
|
12
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { CommonExecutionToolsOptions } from '../../../execution/CommonExecutionToolsOptions';
|
|
2
|
+
import type { UserInterfaceTools } from '../../../execution/UserInterfaceTools';
|
|
3
|
+
import type { UserInterfaceToolsPromptDialogOptions } from '../../../execution/UserInterfaceTools';
|
|
4
|
+
/**
|
|
5
|
+
* Wrapper around `window.prompt` synchronous function that interacts with the user via browser prompt
|
|
6
|
+
*
|
|
7
|
+
* Warning: It is used for testing and mocking
|
|
8
|
+
* **NOT intended to use in the production** due to its synchronous nature.
|
|
9
|
+
*/
|
|
10
|
+
export declare class SimplePromptInterfaceTools implements UserInterfaceTools {
|
|
11
|
+
private readonly options;
|
|
12
|
+
constructor(options?: CommonExecutionToolsOptions);
|
|
13
|
+
/**
|
|
14
|
+
* Trigger window.PROMPT DIALOG
|
|
15
|
+
*/
|
|
16
|
+
promptDialog(options: UserInterfaceToolsPromptDialogOptions): Promise<string>;
|
|
17
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/esm/typings/src/knowledge/prepare-knowledge/markdown/prepareKnowledgeFromMarkdown.d.ts
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { LlmExecutionTools } from '../../../execution/LlmExecutionTools';
|
|
2
|
+
import type { KnowledgeJson } from '../../../types/PipelineJson/KnowledgeJson';
|
|
3
|
+
import type { string_markdown } from '../../../types/typeAliases';
|
|
4
|
+
type PrepareKnowledgeFromMarkdownOptions = {
|
|
5
|
+
/**
|
|
6
|
+
* The source of the knowledge in markdown format
|
|
7
|
+
*/
|
|
8
|
+
content: string_markdown;
|
|
9
|
+
/**
|
|
10
|
+
* The LLM tools to use for the conversion and extraction of knowledge
|
|
11
|
+
*
|
|
12
|
+
* Note: If you want to use multiple LLMs, you can use `joinLlmExecutionTools` to join them first
|
|
13
|
+
*/
|
|
14
|
+
llmTools: LlmExecutionTools;
|
|
15
|
+
/**
|
|
16
|
+
* If true, the preaparation of knowledge logs additional information
|
|
17
|
+
*
|
|
18
|
+
* @default false
|
|
19
|
+
*/
|
|
20
|
+
isVerbose?: boolean;
|
|
21
|
+
};
|
|
22
|
+
export declare function prepareKnowledgeFromMarkdown(options: PrepareKnowledgeFromMarkdownOptions): Promise<KnowledgeJson>;
|
|
23
|
+
export {};
|
|
24
|
+
/**
|
|
25
|
+
* 11:11
|
|
26
|
+
*/
|
package/esm/typings/src/knowledge/prepare-knowledge/markdown/prepareKnowledgeFromMarkdown.test.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { LlmExecutionTools } from '../../../execution/LlmExecutionTools';
|
|
2
|
+
import type { KnowledgeJson } from '../../../types/PipelineJson/KnowledgeJson';
|
|
3
|
+
import type { string_base64 } from '../../../types/typeAliases';
|
|
4
|
+
type PrepareKnowledgeFromPdfOptions = {
|
|
5
|
+
/**
|
|
6
|
+
* The source of the knowledge in PDF format
|
|
7
|
+
*/
|
|
8
|
+
content: string_base64;
|
|
9
|
+
/**
|
|
10
|
+
* The LLM tools to use for the conversion and extraction of knowledge
|
|
11
|
+
*/
|
|
12
|
+
llmTools: LlmExecutionTools;
|
|
13
|
+
};
|
|
14
|
+
export declare function prepareKnowledgeFromPdf(options: PrepareKnowledgeFromPdfOptions): Promise<KnowledgeJson>;
|
|
15
|
+
export {};
|
|
16
|
+
/**
|
|
17
|
+
* TODO: [🧺] In future, content can be alse File or Blob BUT for now for wider compatibility its only base64
|
|
18
|
+
* @see https://stackoverflow.com/questions/14653349/node-js-cant-create-blobs
|
|
19
|
+
*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { AvailableModel } from '../../execution/LlmExecutionTools';
|
|
2
|
+
import type { LlmExecutionTools } from '../../execution/LlmExecutionTools';
|
|
3
|
+
import type { PromptChatResult } from '../../execution/PromptResult';
|
|
4
|
+
import type { Prompt } from '../../types/Prompt';
|
|
5
|
+
import type { string_markdown } from '../../types/typeAliases';
|
|
6
|
+
import type { string_markdown_text } from '../../types/typeAliases';
|
|
7
|
+
import type { string_title } from '../../types/typeAliases';
|
|
8
|
+
import type { AnthropicClaudeExecutionToolsOptions } from './AnthropicClaudeExecutionToolsOptions';
|
|
9
|
+
/**
|
|
10
|
+
* Execution Tools for calling Anthropic Claude API.
|
|
11
|
+
*/
|
|
12
|
+
export declare class AnthropicClaudeExecutionTools implements LlmExecutionTools {
|
|
13
|
+
private readonly options;
|
|
14
|
+
/**
|
|
15
|
+
* Anthropic Claude API client.
|
|
16
|
+
*/
|
|
17
|
+
private readonly client;
|
|
18
|
+
/**
|
|
19
|
+
* Creates Anthropic Claude Execution Tools.
|
|
20
|
+
*
|
|
21
|
+
* @param options which are relevant are directly passed to the Anthropic Claude client
|
|
22
|
+
*/
|
|
23
|
+
constructor(options?: AnthropicClaudeExecutionToolsOptions);
|
|
24
|
+
get title(): string_title & string_markdown_text;
|
|
25
|
+
get description(): string_markdown;
|
|
26
|
+
/**
|
|
27
|
+
* Calls Anthropic Claude API to use a chat model.
|
|
28
|
+
*/
|
|
29
|
+
callChatModel(prompt: Pick<Prompt, 'content' | 'modelRequirements'>): Promise<PromptChatResult>;
|
|
30
|
+
/**
|
|
31
|
+
* Get the model that should be used as default
|
|
32
|
+
*/
|
|
33
|
+
private getDefaultModel;
|
|
34
|
+
/**
|
|
35
|
+
* Default model for chat variant.
|
|
36
|
+
*/
|
|
37
|
+
private getDefaultChatModel;
|
|
38
|
+
/**
|
|
39
|
+
* List all available Anthropic Claude models that can be used
|
|
40
|
+
*/
|
|
41
|
+
listModels(): Array<AvailableModel>;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* TODO: !!!! [🍆] JSON mode
|
|
45
|
+
* TODO: [🧠] Maybe handle errors via transformAnthropicError (like transformAzureError)
|
|
46
|
+
* TODO: Maybe Create some common util for callChatModel and callCompletionModel
|
|
47
|
+
* TODO: Maybe make custom OpenaiError
|
|
48
|
+
*/
|
package/esm/typings/src/llm-providers/anthropic-claude/AnthropicClaudeExecutionToolsOptions.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ClientOptions } from '@anthropic-ai/sdk';
|
|
2
|
+
import type { CommonExecutionToolsOptions } from '../../execution/CommonExecutionToolsOptions';
|
|
3
|
+
/**
|
|
4
|
+
* Options for AnthropicClaudeExecutionTools
|
|
5
|
+
*
|
|
6
|
+
* This extends Anthropic's `ClientOptions` with are directly passed to the Anthropic client.
|
|
7
|
+
*/
|
|
8
|
+
export type AnthropicClaudeExecutionToolsOptions = CommonExecutionToolsOptions & ClientOptions;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { AvailableModel } from '../../execution/LlmExecutionTools';
|
|
2
|
+
import type { number_usd } from '../../types/typeAliases';
|
|
3
|
+
/**
|
|
4
|
+
* List of available Anthropic Claude models with pricing
|
|
5
|
+
*
|
|
6
|
+
* Note: Done at 2024-05-25
|
|
7
|
+
*
|
|
8
|
+
* @see https://docs.anthropic.com/en/docs/models-overview
|
|
9
|
+
*/
|
|
10
|
+
export declare const ANTHROPIC_CLAUDE_MODELS: Array<AvailableModel & {
|
|
11
|
+
pricing?: {
|
|
12
|
+
prompt: number_usd;
|
|
13
|
+
output: number_usd;
|
|
14
|
+
};
|
|
15
|
+
}>;
|
|
16
|
+
/**
|
|
17
|
+
* Note: [🤖] Add models of new variant
|
|
18
|
+
* TODO: !!!! Add embedding models OR Anthropic has only chat+completion models?
|
|
19
|
+
* TODO: [🧠] Some mechanism to propagate unsureness
|
|
20
|
+
* TODO: [🧠][👮♀️] Put here more info like description, isVision, trainingDateCutoff, languages, strengths ( Top-level performance, intelligence, fluency, and understanding), contextWindow,...
|
|
21
|
+
* TODO: [🕚] Make this list dynamic - dynamically can be listed modelNames but not modelVariant, legacy status, context length and pricing
|
|
22
|
+
*/
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { AvailableModel } from '../../execution/LlmExecutionTools';
|
|
2
|
+
import type { LlmExecutionTools } from '../../execution/LlmExecutionTools';
|
|
3
|
+
import type { PromptChatResult } from '../../execution/PromptResult';
|
|
4
|
+
import type { PromptCompletionResult } from '../../execution/PromptResult';
|
|
5
|
+
import type { Prompt } from '../../types/Prompt';
|
|
6
|
+
import type { string_markdown } from '../../types/typeAliases';
|
|
7
|
+
import type { string_markdown_text } from '../../types/typeAliases';
|
|
8
|
+
import type { string_title } from '../../types/typeAliases';
|
|
9
|
+
import type { AzureOpenAiExecutionToolsOptions } from './AzureOpenAiExecutionToolsOptions';
|
|
10
|
+
/**
|
|
11
|
+
* Execution Tools for calling Azure OpenAI API.
|
|
12
|
+
*/
|
|
13
|
+
export declare class AzureOpenAiExecutionTools implements LlmExecutionTools {
|
|
14
|
+
private readonly options;
|
|
15
|
+
/**
|
|
16
|
+
* OpenAI Azure API client.
|
|
17
|
+
*/
|
|
18
|
+
private readonly client;
|
|
19
|
+
/**
|
|
20
|
+
* Creates OpenAI Execution Tools.
|
|
21
|
+
*
|
|
22
|
+
* @param options which are relevant are directly passed to the OpenAI client
|
|
23
|
+
*/
|
|
24
|
+
constructor(options: AzureOpenAiExecutionToolsOptions);
|
|
25
|
+
get title(): string_title & string_markdown_text;
|
|
26
|
+
get description(): string_markdown;
|
|
27
|
+
/**
|
|
28
|
+
* Calls OpenAI API to use a chat model.
|
|
29
|
+
*/
|
|
30
|
+
callChatModel(prompt: Pick<Prompt, 'content' | 'modelRequirements'>): Promise<PromptChatResult>;
|
|
31
|
+
/**
|
|
32
|
+
* Calls Azure OpenAI API to use a complete model.
|
|
33
|
+
*/
|
|
34
|
+
callCompletionModel(prompt: Pick<Prompt, 'content' | 'modelRequirements'>): Promise<PromptCompletionResult>;
|
|
35
|
+
/**
|
|
36
|
+
* Changes Azure error (which is not propper Error but object) to propper Error
|
|
37
|
+
*/
|
|
38
|
+
private transformAzureError;
|
|
39
|
+
/**
|
|
40
|
+
* List all available Azure OpenAI models that can be used
|
|
41
|
+
*/
|
|
42
|
+
listModels(): Promise<Array<AvailableModel>>;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* TODO: Maybe Create some common util for callChatModel and callCompletionModel
|
|
46
|
+
* TODO: Maybe make custom AzureOpenaiError
|
|
47
|
+
*/
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { CommonExecutionToolsOptions } from '../../execution/CommonExecutionToolsOptions';
|
|
2
|
+
import type { string_name } from '../../types/typeAliases';
|
|
3
|
+
import type { string_token } from '../../types/typeAliases';
|
|
4
|
+
/**
|
|
5
|
+
* Options for AzureOpenAiExecutionTools
|
|
6
|
+
*
|
|
7
|
+
* @see https://oai.azure.com/portal/
|
|
8
|
+
*/
|
|
9
|
+
export type AzureOpenAiExecutionToolsOptions = CommonExecutionToolsOptions & {
|
|
10
|
+
/**
|
|
11
|
+
* The resource name of the Azure OpenAI resource
|
|
12
|
+
*
|
|
13
|
+
* Note: Typically you have one resource and multiple deployments.
|
|
14
|
+
*/
|
|
15
|
+
resourceName: string_name;
|
|
16
|
+
/**
|
|
17
|
+
* The deployment name
|
|
18
|
+
*
|
|
19
|
+
* Note: If you specify modelName in prompt, it will be used instead of deploymentName
|
|
20
|
+
* Note: This is kind of a modelName in OpenAI terms
|
|
21
|
+
* Note: Typically you have one resource and multiple deployments.
|
|
22
|
+
*/
|
|
23
|
+
deploymentName: string_name;
|
|
24
|
+
/**
|
|
25
|
+
* The API key of the Azure OpenAI resource
|
|
26
|
+
*/
|
|
27
|
+
apiKey: string_token;
|
|
28
|
+
/**
|
|
29
|
+
* A unique identifier representing your end-user, which can help Azure OpenAI to monitor
|
|
30
|
+
* and detect abuse.
|
|
31
|
+
*
|
|
32
|
+
* @see https://platform.openai.com/docs/guides/safety-best-practices/end-user-ids (document from OpenAI not Azure, but same concept)
|
|
33
|
+
*/
|
|
34
|
+
user?: string_token;
|
|
35
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { LlmExecutionTools } from '../../execution/LlmExecutionTools';
|
|
2
|
+
import type { string_markdown } from '../../types/typeAliases';
|
|
3
|
+
import type { string_markdown_text } from '../../types/typeAliases';
|
|
4
|
+
import type { string_title } from '../../types/typeAliases';
|
|
5
|
+
import { OpenAiExecutionTools } from '../openai/OpenAiExecutionTools';
|
|
6
|
+
/**
|
|
7
|
+
* Execution Tools for calling OpenAI API.
|
|
8
|
+
*/
|
|
9
|
+
export declare class LangtailExecutionTools extends OpenAiExecutionTools implements LlmExecutionTools {
|
|
10
|
+
get title(): string_title & string_markdown_text;
|
|
11
|
+
get description(): string_markdown;
|
|
12
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { OpenAiExecutionToolsOptions } from '../openai/OpenAiExecutionToolsOptions';
|
|
2
|
+
/**
|
|
3
|
+
* Options for LangtailExecutionTools
|
|
4
|
+
*
|
|
5
|
+
* This extends OpenAI's `ClientOptions` with are directly passed to the OpenAI client.
|
|
6
|
+
* Rest is used by the `OpenAiExecutionTools`.
|
|
7
|
+
*/
|
|
8
|
+
export type LangtailExecutionToolsOptions = OpenAiExecutionToolsOptions;
|
|
9
|
+
/**
|
|
10
|
+
* TODO: !!! Use or remove
|
|
11
|
+
*/
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { CommonExecutionToolsOptions } from '../../execution/CommonExecutionToolsOptions';
|
|
2
|
+
import type { AvailableModel } from '../../execution/LlmExecutionTools';
|
|
3
|
+
import type { LlmExecutionTools } from '../../execution/LlmExecutionTools';
|
|
4
|
+
import type { PromptChatResult } from '../../execution/PromptResult';
|
|
5
|
+
import type { PromptCompletionResult } from '../../execution/PromptResult';
|
|
6
|
+
import type { Prompt } from '../../types/Prompt';
|
|
7
|
+
import type { string_markdown } from '../../types/typeAliases';
|
|
8
|
+
import type { string_markdown_text } from '../../types/typeAliases';
|
|
9
|
+
import type { string_title } from '../../types/typeAliases';
|
|
10
|
+
/**
|
|
11
|
+
* Mocked execution Tools for just echoing the requests for testing purposes.
|
|
12
|
+
*/
|
|
13
|
+
export declare class MockedEchoLlmExecutionTools implements LlmExecutionTools {
|
|
14
|
+
private readonly options;
|
|
15
|
+
constructor(options?: CommonExecutionToolsOptions);
|
|
16
|
+
get title(): string_title & string_markdown_text;
|
|
17
|
+
get description(): string_markdown;
|
|
18
|
+
/**
|
|
19
|
+
* Mocks chat model
|
|
20
|
+
*/
|
|
21
|
+
callChatModel(prompt: Pick<Prompt, 'content' | 'modelRequirements'>): Promise<PromptChatResult>;
|
|
22
|
+
/**
|
|
23
|
+
* Mocks completion model
|
|
24
|
+
*/
|
|
25
|
+
callCompletionModel(prompt: Pick<Prompt, 'content' | 'modelRequirements'>): Promise<PromptCompletionResult>;
|
|
26
|
+
/**
|
|
27
|
+
* List all available mocked-models that can be used
|
|
28
|
+
*/
|
|
29
|
+
listModels(): Array<AvailableModel>;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* TODO: [🕵️♀️] Maybe just remove
|
|
33
|
+
* TODO: Allow in spaceTrim: nesting with > ${block(prompt.request)}, same as replace params
|
|
34
|
+
*/
|