@promptbook/node 0.57.2 → 0.59.0-0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/index.es.js +311 -271
- package/esm/index.es.js.map +1 -1
- package/esm/typings/_packages/anthropic-claude.index.d.ts +2 -2
- package/esm/typings/_packages/azure-openai.index.d.ts +3 -4
- package/esm/typings/_packages/core.index.d.ts +11 -10
- package/esm/typings/_packages/execute-javascript.index.d.ts +2 -2
- package/esm/typings/_packages/fake-llm.index.d.ts +2 -2
- package/esm/typings/_packages/langtail.index.d.ts +3 -4
- package/esm/typings/_packages/node.index.d.ts +1 -1
- package/esm/typings/_packages/openai.index.d.ts +4 -5
- package/esm/typings/_packages/remote-client.index.d.ts +4 -5
- package/esm/typings/_packages/remote-server.index.d.ts +3 -4
- package/esm/typings/_packages/types.index.d.ts +4 -2
- package/esm/typings/_packages/utils.index.d.ts +6 -4
- package/esm/typings/conversion/prettify/prettifyPromptbookString.d.ts +1 -1
- package/esm/typings/conversion/promptbookStringToJson.d.ts +7 -2
- package/esm/typings/execution/ScriptExecutionTools.d.ts +1 -1
- package/esm/typings/execution/translation/automatic-translate/automatic-translators/LindatAutomaticTranslator.d.ts +1 -1
- package/esm/typings/execution/translation/automatic-translate/automatic-translators/TranslatorOptions.d.ts +1 -1
- package/esm/typings/expectations/drafts/isDomainNameFree.d.ts +6 -0
- package/esm/typings/expectations/drafts/isGithubNameFree.d.ts +6 -0
- package/esm/typings/formats/_common/FormatDefinition.d.ts +69 -0
- package/esm/typings/formats/csv/ListFormatDefinition.d.ts +11 -0
- package/esm/typings/formats/index.d.ts +4 -0
- package/esm/typings/formats/json/JsonFormatDefinition.d.ts +15 -0
- package/esm/typings/formats/list/ListFormatDefinition.d.ts +13 -0
- package/esm/typings/formats/xml/XmlFormatDefinition.d.ts +15 -0
- package/{umd/typings/execution/plugins/user-interface-execution-tools → esm/typings/knowledge/dialogs}/callback/CallbackInterfaceTools.d.ts +2 -2
- package/esm/typings/{execution/plugins/user-interface-execution-tools → knowledge/dialogs}/callback/CallbackInterfaceToolsOptions.d.ts +2 -2
- package/{umd/typings/execution/plugins/user-interface-execution-tools → esm/typings/knowledge/dialogs}/simple-prompt/SimplePromptInterfaceTools.d.ts +4 -4
- package/esm/typings/knowledge/prepare-knowledge/_common/IndexPreparer.d.ts +4 -0
- package/esm/typings/knowledge/prepare-knowledge/markdown/prepareKnowledgeFromMarkdown.d.ts +7 -0
- package/esm/typings/{execution/plugins/llm-execution-tools → llm-providers}/anthropic-claude/AnthropicClaudeExecutionTools.d.ts +6 -6
- package/{umd/typings/execution/plugins/llm-execution-tools → esm/typings/llm-providers}/anthropic-claude/AnthropicClaudeExecutionToolsOptions.d.ts +1 -1
- package/{umd/typings/execution/plugins/llm-execution-tools → esm/typings/llm-providers}/anthropic-claude/anthropic-claude-models.d.ts +2 -2
- package/{umd/typings/execution/plugins/llm-execution-tools → esm/typings/llm-providers}/azure-openai/AzureOpenAiExecutionTools.d.ts +5 -5
- package/{umd/typings/execution/plugins/llm-execution-tools → esm/typings/llm-providers}/azure-openai/AzureOpenAiExecutionToolsOptions.d.ts +3 -3
- package/esm/typings/{execution/plugins/llm-execution-tools → llm-providers}/langtail/LangtailExecutionTools.d.ts +1 -1
- package/{umd/typings/execution/plugins/llm-execution-tools → esm/typings/llm-providers}/mocked/MockedEchoLlmExecutionTools.d.ts +7 -7
- package/{umd/typings/execution/plugins/llm-execution-tools → esm/typings/llm-providers}/mocked/MockedFackedLlmExecutionTools.d.ts +7 -7
- package/esm/typings/{execution/plugins/llm-execution-tools → llm-providers}/mocked/fakeTextToExpectations.d.ts +2 -2
- package/{umd/typings/execution/plugins/llm-execution-tools → esm/typings/llm-providers}/multiple/MultipleLlmExecutionTools.d.ts +5 -5
- package/{umd/typings/execution/plugins/llm-execution-tools → esm/typings/llm-providers}/multiple/MultipleLlmExecutionToolsOptions.d.ts +3 -3
- package/{umd/typings/execution/plugins/llm-execution-tools → esm/typings/llm-providers}/openai/OpenAiExecutionTools.d.ts +6 -6
- package/{umd/typings/execution/plugins/llm-execution-tools → esm/typings/llm-providers}/openai/OpenAiExecutionToolsOptions.d.ts +2 -2
- package/esm/typings/{execution/plugins/llm-execution-tools → llm-providers}/openai/computeOpenaiUsage.d.ts +3 -3
- package/{umd/typings/execution/plugins/llm-execution-tools → esm/typings/llm-providers}/openai/openai-models.d.ts +2 -2
- package/esm/typings/{execution/plugins/llm-execution-tools → llm-providers}/remote/RemoteLlmExecutionTools.d.ts +5 -5
- package/{umd/typings/execution/plugins/llm-execution-tools → esm/typings/llm-providers}/remote/RemoteLlmExecutionToolsOptions.d.ts +3 -3
- package/esm/typings/{execution/plugins/llm-execution-tools → llm-providers}/remote/interfaces/Promptbook_Server_Progress.d.ts +1 -1
- package/{umd/typings/execution/plugins/llm-execution-tools → esm/typings/llm-providers}/remote/interfaces/Promptbook_Server_Request.d.ts +2 -2
- package/esm/typings/{execution/plugins/llm-execution-tools → llm-providers}/remote/interfaces/Promptbook_Server_Response.d.ts +1 -1
- package/{umd/typings/execution/plugins/llm-execution-tools → esm/typings/llm-providers}/remote/interfaces/RemoteServerOptions.d.ts +5 -5
- package/esm/typings/{library → promptbook-library}/constructors/createPromptbookLibraryFromDirectory.d.ts +3 -0
- package/esm/typings/{library → promptbook-library}/constructors/createPromptbookLibraryFromPromise.d.ts +3 -0
- package/esm/typings/{library → promptbook-library}/constructors/createPromptbookLibraryFromSources.d.ts +4 -1
- package/esm/typings/{library → promptbook-library}/constructors/createPromptbookLibraryFromUrl.d.ts +3 -0
- package/esm/typings/{execution/plugins/script-execution-tools → scripting}/javascript/JavascriptEvalExecutionTools.d.ts +2 -2
- package/esm/typings/{execution/plugins/script-execution-tools → scripting}/javascript/JavascriptExecutionToolsOptions.d.ts +2 -2
- package/esm/typings/scripting/python/PythonExecutionTools.d.ts +16 -0
- package/esm/typings/scripting/typescript/TypescriptExecutionTools.d.ts +16 -0
- package/esm/typings/types/Prompt.d.ts +1 -1
- package/esm/typings/types/PromptbookJson/KnowledgeJson.d.ts +6 -0
- package/esm/typings/types/PromptbookJson/MaterialKnowledgePieceJson.d.ts +27 -0
- package/esm/typings/types/PromptbookJson/PromptbookJson.d.ts +8 -6
- package/package.json +3 -3
- package/umd/index.umd.js +311 -271
- package/umd/index.umd.js.map +1 -1
- package/umd/typings/_packages/anthropic-claude.index.d.ts +2 -2
- package/umd/typings/_packages/azure-openai.index.d.ts +3 -4
- package/umd/typings/_packages/core.index.d.ts +11 -10
- package/umd/typings/_packages/execute-javascript.index.d.ts +2 -2
- package/umd/typings/_packages/fake-llm.index.d.ts +2 -2
- package/umd/typings/_packages/langtail.index.d.ts +3 -4
- package/umd/typings/_packages/node.index.d.ts +1 -1
- package/umd/typings/_packages/openai.index.d.ts +4 -5
- package/umd/typings/_packages/remote-client.index.d.ts +4 -5
- package/umd/typings/_packages/remote-server.index.d.ts +3 -4
- package/umd/typings/_packages/types.index.d.ts +4 -2
- package/umd/typings/_packages/utils.index.d.ts +6 -4
- package/umd/typings/conversion/prettify/prettifyPromptbookString.d.ts +1 -1
- package/umd/typings/conversion/promptbookStringToJson.d.ts +7 -2
- package/umd/typings/execution/ScriptExecutionTools.d.ts +1 -1
- package/umd/typings/execution/translation/automatic-translate/automatic-translators/LindatAutomaticTranslator.d.ts +1 -1
- package/umd/typings/execution/translation/automatic-translate/automatic-translators/TranslatorOptions.d.ts +1 -1
- package/umd/typings/expectations/drafts/isDomainNameFree.d.ts +6 -0
- package/umd/typings/expectations/drafts/isGithubNameFree.d.ts +6 -0
- package/umd/typings/formats/_common/FormatDefinition.d.ts +69 -0
- package/umd/typings/formats/csv/ListFormatDefinition.d.ts +11 -0
- package/umd/typings/formats/index.d.ts +4 -0
- package/umd/typings/formats/json/JsonFormatDefinition.d.ts +15 -0
- package/umd/typings/formats/list/ListFormatDefinition.d.ts +13 -0
- package/umd/typings/formats/xml/XmlFormatDefinition.d.ts +15 -0
- package/{esm/typings/execution/plugins/user-interface-execution-tools → umd/typings/knowledge/dialogs}/callback/CallbackInterfaceTools.d.ts +2 -2
- package/umd/typings/{execution/plugins/user-interface-execution-tools → knowledge/dialogs}/callback/CallbackInterfaceToolsOptions.d.ts +2 -2
- package/{esm/typings/execution/plugins/user-interface-execution-tools → umd/typings/knowledge/dialogs}/simple-prompt/SimplePromptInterfaceTools.d.ts +4 -4
- package/umd/typings/knowledge/prepare-knowledge/_common/IndexPreparer.d.ts +4 -0
- package/umd/typings/knowledge/prepare-knowledge/markdown/prepareKnowledgeFromMarkdown.d.ts +7 -0
- package/umd/typings/{execution/plugins/llm-execution-tools → llm-providers}/anthropic-claude/AnthropicClaudeExecutionTools.d.ts +6 -6
- package/{esm/typings/execution/plugins/llm-execution-tools → umd/typings/llm-providers}/anthropic-claude/AnthropicClaudeExecutionToolsOptions.d.ts +1 -1
- package/{esm/typings/execution/plugins/llm-execution-tools → umd/typings/llm-providers}/anthropic-claude/anthropic-claude-models.d.ts +2 -2
- package/{esm/typings/execution/plugins/llm-execution-tools → umd/typings/llm-providers}/azure-openai/AzureOpenAiExecutionTools.d.ts +5 -5
- package/{esm/typings/execution/plugins/llm-execution-tools → umd/typings/llm-providers}/azure-openai/AzureOpenAiExecutionToolsOptions.d.ts +3 -3
- package/umd/typings/{execution/plugins/llm-execution-tools → llm-providers}/langtail/LangtailExecutionTools.d.ts +1 -1
- package/{esm/typings/execution/plugins/llm-execution-tools → umd/typings/llm-providers}/mocked/MockedEchoLlmExecutionTools.d.ts +7 -7
- package/{esm/typings/execution/plugins/llm-execution-tools → umd/typings/llm-providers}/mocked/MockedFackedLlmExecutionTools.d.ts +7 -7
- package/umd/typings/{execution/plugins/llm-execution-tools → llm-providers}/mocked/fakeTextToExpectations.d.ts +2 -2
- package/{esm/typings/execution/plugins/llm-execution-tools → umd/typings/llm-providers}/multiple/MultipleLlmExecutionTools.d.ts +5 -5
- package/{esm/typings/execution/plugins/llm-execution-tools → umd/typings/llm-providers}/multiple/MultipleLlmExecutionToolsOptions.d.ts +3 -3
- package/{esm/typings/execution/plugins/llm-execution-tools → umd/typings/llm-providers}/openai/OpenAiExecutionTools.d.ts +6 -6
- package/{esm/typings/execution/plugins/llm-execution-tools → umd/typings/llm-providers}/openai/OpenAiExecutionToolsOptions.d.ts +2 -2
- package/umd/typings/{execution/plugins/llm-execution-tools → llm-providers}/openai/computeOpenaiUsage.d.ts +3 -3
- package/{esm/typings/execution/plugins/llm-execution-tools → umd/typings/llm-providers}/openai/openai-models.d.ts +2 -2
- package/umd/typings/{execution/plugins/llm-execution-tools → llm-providers}/remote/RemoteLlmExecutionTools.d.ts +5 -5
- package/{esm/typings/execution/plugins/llm-execution-tools → umd/typings/llm-providers}/remote/RemoteLlmExecutionToolsOptions.d.ts +3 -3
- package/umd/typings/{execution/plugins/llm-execution-tools → llm-providers}/remote/interfaces/Promptbook_Server_Progress.d.ts +1 -1
- package/{esm/typings/execution/plugins/llm-execution-tools → umd/typings/llm-providers}/remote/interfaces/Promptbook_Server_Request.d.ts +2 -2
- package/umd/typings/{execution/plugins/llm-execution-tools → llm-providers}/remote/interfaces/Promptbook_Server_Response.d.ts +1 -1
- package/{esm/typings/execution/plugins/llm-execution-tools → umd/typings/llm-providers}/remote/interfaces/RemoteServerOptions.d.ts +5 -5
- package/umd/typings/{library → promptbook-library}/constructors/createPromptbookLibraryFromDirectory.d.ts +3 -0
- package/umd/typings/{library → promptbook-library}/constructors/createPromptbookLibraryFromPromise.d.ts +3 -0
- package/umd/typings/{library → promptbook-library}/constructors/createPromptbookLibraryFromSources.d.ts +4 -1
- package/umd/typings/{library → promptbook-library}/constructors/createPromptbookLibraryFromUrl.d.ts +3 -0
- package/umd/typings/scripting/_test/script-execution-errors.test.d.ts +1 -0
- package/umd/typings/scripting/_test/script-execution-tools.test.d.ts +1 -0
- package/umd/typings/{execution/plugins/script-execution-tools → scripting}/javascript/JavascriptEvalExecutionTools.d.ts +2 -2
- package/umd/typings/{execution/plugins/script-execution-tools → scripting}/javascript/JavascriptExecutionToolsOptions.d.ts +2 -2
- package/umd/typings/scripting/python/PythonExecutionTools.d.ts +16 -0
- package/umd/typings/scripting/typescript/TypescriptExecutionTools.d.ts +16 -0
- package/umd/typings/types/Prompt.d.ts +1 -1
- package/umd/typings/types/PromptbookJson/KnowledgeJson.d.ts +6 -0
- package/umd/typings/types/PromptbookJson/MaterialKnowledgePieceJson.d.ts +27 -0
- package/umd/typings/types/PromptbookJson/PromptbookJson.d.ts +8 -6
- package/esm/typings/execution/plugins/script-execution-tools/python/PythonExecutionTools.d.ts +0 -16
- package/esm/typings/execution/plugins/script-execution-tools/typescript/TypescriptExecutionTools.d.ts +0 -16
- package/umd/typings/execution/plugins/script-execution-tools/python/PythonExecutionTools.d.ts +0 -16
- package/umd/typings/execution/plugins/script-execution-tools/typescript/TypescriptExecutionTools.d.ts +0 -16
- /package/esm/typings/{utils → formats/json/utils}/isValidJsonString.d.ts +0 -0
- /package/esm/typings/{utils → formats/json/utils}/isValidJsonString.test.d.ts +0 -0
- /package/esm/typings/{execution/plugins/user-interface-execution-tools → knowledge/dialogs}/user-interface-execution-tools.test.d.ts +0 -0
- /package/esm/typings/{execution/plugins/llm-execution-tools/mocked/fakeTextToExpectations.test.d.ts → knowledge/prepare-knowledge/markdown/prepareKnowledgeFromMarkdown.test.d.ts} +0 -0
- /package/esm/typings/{execution/plugins/llm-execution-tools → llm-providers}/anthropic-claude/playground/playground.d.ts +0 -0
- /package/esm/typings/{execution/plugins/llm-execution-tools → llm-providers}/azure-openai/playground/playground.d.ts +0 -0
- /package/esm/typings/{execution/plugins/llm-execution-tools → llm-providers}/langtail/LangtailExecutionToolsOptions.d.ts +0 -0
- /package/esm/typings/{execution/plugins/llm-execution-tools → llm-providers}/langtail/playground/playground.d.ts +0 -0
- /package/{umd/typings/execution/plugins/llm-execution-tools → esm/typings/llm-providers}/mocked/fakeTextToExpectations.test.d.ts +0 -0
- /package/esm/typings/{execution/plugins/llm-execution-tools → llm-providers}/mocked/faked-completion.test.d.ts +0 -0
- /package/esm/typings/{execution/plugins/llm-execution-tools → llm-providers}/mocked/joker.test.d.ts +0 -0
- /package/esm/typings/{execution/plugins/llm-execution-tools → llm-providers}/mocked/mocked-chat.test.d.ts +0 -0
- /package/esm/typings/{execution/plugins/llm-execution-tools → llm-providers}/mocked/mocked-completion.test.d.ts +0 -0
- /package/esm/typings/{execution/plugins/llm-execution-tools → llm-providers}/multiple/playground/playground.d.ts +0 -0
- /package/esm/typings/{execution/plugins/llm-execution-tools → llm-providers}/openai/computeUsage.d.ts +0 -0
- /package/esm/typings/{execution/plugins/llm-execution-tools → llm-providers}/openai/computeUsage.test.d.ts +0 -0
- /package/esm/typings/{execution/plugins/llm-execution-tools → llm-providers}/openai/playground/playground.d.ts +0 -0
- /package/esm/typings/{execution/plugins/llm-execution-tools → llm-providers}/remote/interfaces/Promptbook_Server_Error.d.ts +0 -0
- /package/esm/typings/{execution/plugins/llm-execution-tools → llm-providers}/remote/startRemoteServer.d.ts +0 -0
- /package/esm/typings/{library → promptbook-library}/PromptbookLibrary.d.ts +0 -0
- /package/esm/typings/{library → promptbook-library}/SimplePromptbookLibrary.d.ts +0 -0
- /package/esm/typings/{library → promptbook-library}/constructors/createPromptbookLibraryFromDirectory.test.d.ts +0 -0
- /package/esm/typings/{library → promptbook-library}/constructors/createPromptbookLibraryFromPromise.test.d.ts +0 -0
- /package/esm/typings/{library → promptbook-library}/constructors/createPromptbookLibraryFromSources.test.d.ts +0 -0
- /package/esm/typings/{library → promptbook-library}/constructors/createPromptbookSublibrary.d.ts +0 -0
- /package/esm/typings/{library → promptbook-library}/constructors/justTestFsImport.d.ts +0 -0
- /package/esm/typings/{execution/plugins/script-execution-tools → scripting/_test}/custom-function-async.test.ts.test.d.ts +0 -0
- /package/esm/typings/{execution/plugins/script-execution-tools → scripting/_test}/custom-function-missing.test.d.ts +0 -0
- /package/esm/typings/{execution/plugins/script-execution-tools → scripting/_test}/custom-function-with-dependencies.test.d.ts +0 -0
- /package/esm/typings/{execution/plugins/script-execution-tools → scripting/_test}/custom-function.test.d.ts +0 -0
- /package/esm/typings/{execution/plugins/script-execution-tools → scripting/_test}/postprocessing.test.d.ts +0 -0
- /package/esm/typings/{execution/plugins/script-execution-tools → scripting/_test}/script-execution-errors.test.d.ts +0 -0
- /package/esm/typings/{execution/plugins/script-execution-tools → scripting/_test}/script-execution-tools.test.d.ts +0 -0
- /package/esm/typings/{execution/plugins/script-execution-tools → scripting}/javascript/JavascriptEvalExecutionTools.test.d.ts +0 -0
- /package/esm/typings/{execution/plugins/script-execution-tools → scripting}/javascript/JavascriptExecutionTools.d.ts +0 -0
- /package/esm/typings/{execution/plugins/script-execution-tools → scripting}/javascript/utils/preserve.d.ts +0 -0
- /package/esm/typings/{execution/plugins/script-execution-tools → scripting}/javascript/utils/unknownToString.d.ts +0 -0
- /package/umd/typings/{utils → formats/json/utils}/isValidJsonString.d.ts +0 -0
- /package/umd/typings/{utils → formats/json/utils}/isValidJsonString.test.d.ts +0 -0
- /package/umd/typings/{execution/plugins/user-interface-execution-tools → knowledge/dialogs}/user-interface-execution-tools.test.d.ts +0 -0
- /package/umd/typings/{execution/plugins/llm-execution-tools/mocked/faked-completion.test.d.ts → knowledge/prepare-knowledge/markdown/prepareKnowledgeFromMarkdown.test.d.ts} +0 -0
- /package/umd/typings/{execution/plugins/llm-execution-tools → llm-providers}/anthropic-claude/playground/playground.d.ts +0 -0
- /package/umd/typings/{execution/plugins/llm-execution-tools → llm-providers}/azure-openai/playground/playground.d.ts +0 -0
- /package/umd/typings/{execution/plugins/llm-execution-tools → llm-providers}/langtail/LangtailExecutionToolsOptions.d.ts +0 -0
- /package/umd/typings/{execution/plugins/llm-execution-tools → llm-providers}/langtail/playground/playground.d.ts +0 -0
- /package/umd/typings/{execution/plugins/llm-execution-tools/openai/computeUsage.test.d.ts → llm-providers/mocked/fakeTextToExpectations.test.d.ts} +0 -0
- /package/umd/typings/{execution/plugins/script-execution-tools/custom-function-async.test.ts.test.d.ts → llm-providers/mocked/faked-completion.test.d.ts} +0 -0
- /package/umd/typings/{execution/plugins/llm-execution-tools → llm-providers}/mocked/joker.test.d.ts +0 -0
- /package/umd/typings/{execution/plugins/llm-execution-tools → llm-providers}/mocked/mocked-chat.test.d.ts +0 -0
- /package/umd/typings/{execution/plugins/llm-execution-tools → llm-providers}/mocked/mocked-completion.test.d.ts +0 -0
- /package/umd/typings/{execution/plugins/llm-execution-tools → llm-providers}/multiple/playground/playground.d.ts +0 -0
- /package/umd/typings/{execution/plugins/llm-execution-tools → llm-providers}/openai/computeUsage.d.ts +0 -0
- /package/umd/typings/{execution/plugins/script-execution-tools/custom-function-missing.test.d.ts → llm-providers/openai/computeUsage.test.d.ts} +0 -0
- /package/umd/typings/{execution/plugins/llm-execution-tools → llm-providers}/openai/playground/playground.d.ts +0 -0
- /package/umd/typings/{execution/plugins/llm-execution-tools → llm-providers}/remote/interfaces/Promptbook_Server_Error.d.ts +0 -0
- /package/umd/typings/{execution/plugins/llm-execution-tools → llm-providers}/remote/startRemoteServer.d.ts +0 -0
- /package/umd/typings/{library → promptbook-library}/PromptbookLibrary.d.ts +0 -0
- /package/umd/typings/{library → promptbook-library}/SimplePromptbookLibrary.d.ts +0 -0
- /package/umd/typings/{library → promptbook-library}/constructors/createPromptbookLibraryFromDirectory.test.d.ts +0 -0
- /package/umd/typings/{library → promptbook-library}/constructors/createPromptbookLibraryFromPromise.test.d.ts +0 -0
- /package/umd/typings/{library → promptbook-library}/constructors/createPromptbookLibraryFromSources.test.d.ts +0 -0
- /package/umd/typings/{library → promptbook-library}/constructors/createPromptbookSublibrary.d.ts +0 -0
- /package/umd/typings/{library → promptbook-library}/constructors/justTestFsImport.d.ts +0 -0
- /package/umd/typings/{execution/plugins/script-execution-tools/custom-function-with-dependencies.test.d.ts → scripting/_test/custom-function-async.test.ts.test.d.ts} +0 -0
- /package/umd/typings/{execution/plugins/script-execution-tools/custom-function.test.d.ts → scripting/_test/custom-function-missing.test.d.ts} +0 -0
- /package/umd/typings/{execution/plugins/script-execution-tools/postprocessing.test.d.ts → scripting/_test/custom-function-with-dependencies.test.d.ts} +0 -0
- /package/umd/typings/{execution/plugins/script-execution-tools/script-execution-errors.test.d.ts → scripting/_test/custom-function.test.d.ts} +0 -0
- /package/umd/typings/{execution/plugins/script-execution-tools/script-execution-tools.test.d.ts → scripting/_test/postprocessing.test.d.ts} +0 -0
- /package/umd/typings/{execution/plugins/script-execution-tools → scripting}/javascript/JavascriptEvalExecutionTools.test.d.ts +0 -0
- /package/umd/typings/{execution/plugins/script-execution-tools → scripting}/javascript/JavascriptExecutionTools.d.ts +0 -0
- /package/umd/typings/{execution/plugins/script-execution-tools → scripting}/javascript/utils/preserve.d.ts +0 -0
- /package/umd/typings/{execution/plugins/script-execution-tools → scripting}/javascript/utils/unknownToString.d.ts +0 -0
|
@@ -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,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
|
+
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { UserInterfaceTools } from '../../../UserInterfaceTools';
|
|
2
|
-
import type { UserInterfaceToolsPromptDialogOptions } from '../../../UserInterfaceTools';
|
|
1
|
+
import type { UserInterfaceTools } from '../../../execution/UserInterfaceTools';
|
|
2
|
+
import type { UserInterfaceToolsPromptDialogOptions } from '../../../execution/UserInterfaceTools';
|
|
3
3
|
import type { CallbackInterfaceToolsOptions } from './CallbackInterfaceToolsOptions';
|
|
4
4
|
/**
|
|
5
5
|
* Delagates the user interaction to a async callback function
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Promisable } from 'type-fest';
|
|
2
|
-
import type { CommonExecutionToolsOptions } from '../../../CommonExecutionToolsOptions';
|
|
3
|
-
import type { UserInterfaceToolsPromptDialogOptions } from '../../../UserInterfaceTools';
|
|
2
|
+
import type { CommonExecutionToolsOptions } from '../../../execution/CommonExecutionToolsOptions';
|
|
3
|
+
import type { UserInterfaceToolsPromptDialogOptions } from '../../../execution/UserInterfaceTools';
|
|
4
4
|
/**
|
|
5
5
|
* Options for CallbackInterfaceTools
|
|
6
6
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { CommonExecutionToolsOptions } from '../../../CommonExecutionToolsOptions';
|
|
2
|
-
import type { UserInterfaceTools } from '../../../UserInterfaceTools';
|
|
3
|
-
import type { UserInterfaceToolsPromptDialogOptions } from '../../../UserInterfaceTools';
|
|
1
|
+
import type { CommonExecutionToolsOptions } from '../../../execution/CommonExecutionToolsOptions';
|
|
2
|
+
import type { UserInterfaceTools } from '../../../execution/UserInterfaceTools';
|
|
3
|
+
import type { UserInterfaceToolsPromptDialogOptions } from '../../../execution/UserInterfaceTools';
|
|
4
4
|
/**
|
|
5
5
|
* Wrapper around `window.prompt` synchronous function that interacts with the user via browser prompt
|
|
6
6
|
*
|
|
@@ -9,7 +9,7 @@ import type { UserInterfaceToolsPromptDialogOptions } from '../../../UserInterfa
|
|
|
9
9
|
*/
|
|
10
10
|
export declare class SimplePromptInterfaceTools implements UserInterfaceTools {
|
|
11
11
|
private readonly options;
|
|
12
|
-
constructor(options
|
|
12
|
+
constructor(options?: CommonExecutionToolsOptions);
|
|
13
13
|
/**
|
|
14
14
|
* Trigger window.PROMPT DIALOG
|
|
15
15
|
*/
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { KnowledgeJson } from '../../../types/PromptbookJson/KnowledgeJson';
|
|
2
|
+
import type { LlmExecutionTools } from '../../../execution/LlmExecutionTools';
|
|
3
|
+
import type { string_markdown } from '../../../types/typeAliases';
|
|
4
|
+
export declare function prepareKnowledgeFromMarkdown(options: {
|
|
5
|
+
content: string_markdown;
|
|
6
|
+
llmTools: LlmExecutionTools;
|
|
7
|
+
}): Promise<KnowledgeJson>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
4
|
-
import type {
|
|
5
|
-
import type {
|
|
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
6
|
import type { AnthropicClaudeExecutionToolsOptions } from './AnthropicClaudeExecutionToolsOptions';
|
|
7
7
|
/**
|
|
8
8
|
* Execution Tools for calling Anthropic Claude API.
|
|
@@ -18,7 +18,7 @@ export declare class AnthropicClaudeExecutionTools implements LlmExecutionTools
|
|
|
18
18
|
*
|
|
19
19
|
* @param options which are relevant are directly passed to the Anthropic Claude client
|
|
20
20
|
*/
|
|
21
|
-
constructor(options
|
|
21
|
+
constructor(options?: AnthropicClaudeExecutionToolsOptions);
|
|
22
22
|
/**
|
|
23
23
|
* Calls Anthropic Claude API to use a chat model.
|
|
24
24
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ClientOptions } from '@anthropic-ai/sdk';
|
|
2
|
-
import type { CommonExecutionToolsOptions } from '
|
|
2
|
+
import type { CommonExecutionToolsOptions } from '../../execution/CommonExecutionToolsOptions';
|
|
3
3
|
/**
|
|
4
4
|
* Options for AnthropicClaudeExecutionTools
|
|
5
5
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
1
|
+
import type { AvailableModel } from '../../execution/LlmExecutionTools';
|
|
2
|
+
import type { number_usd } from '../../types/typeAliases';
|
|
3
3
|
/**
|
|
4
4
|
* List of available Anthropic Claude models with pricing
|
|
5
5
|
*
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
4
|
-
import type {
|
|
5
|
-
import type {
|
|
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
6
|
import type { AzureOpenAiExecutionToolsOptions } from './AzureOpenAiExecutionToolsOptions';
|
|
7
7
|
/**
|
|
8
8
|
* Execution Tools for calling Azure OpenAI API.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
1
|
+
import type { CommonExecutionToolsOptions } from '../../execution/CommonExecutionToolsOptions';
|
|
2
|
+
import type { string_name } from '../../types/typeAliases';
|
|
3
|
+
import type { string_token } from '../../types/typeAliases';
|
|
4
4
|
/**
|
|
5
5
|
* Options for AzureOpenAiExecutionTools
|
|
6
6
|
*
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
4
|
-
import type {
|
|
5
|
-
import type {
|
|
6
|
-
import type {
|
|
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
7
|
/**
|
|
8
8
|
* Mocked execution Tools for just echoing the requests for testing purposes.
|
|
9
9
|
*/
|
|
10
10
|
export declare class MockedEchoLlmExecutionTools implements LlmExecutionTools {
|
|
11
11
|
private readonly options;
|
|
12
|
-
constructor(options
|
|
12
|
+
constructor(options?: CommonExecutionToolsOptions);
|
|
13
13
|
/**
|
|
14
14
|
* Mocks chat model
|
|
15
15
|
*/
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
4
|
-
import type {
|
|
5
|
-
import type {
|
|
6
|
-
import type {
|
|
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
7
|
/**
|
|
8
8
|
* Mocked execution Tools for just faking expected responses for testing purposes
|
|
9
9
|
*/
|
|
10
10
|
export declare class MockedFackedLlmExecutionTools implements LlmExecutionTools {
|
|
11
11
|
private readonly options;
|
|
12
|
-
constructor(options
|
|
12
|
+
constructor(options?: CommonExecutionToolsOptions);
|
|
13
13
|
/**
|
|
14
14
|
* Fakes chat model
|
|
15
15
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
1
|
+
import type { PostprocessingFunction } from '../../scripting/javascript/JavascriptExecutionToolsOptions';
|
|
2
|
+
import type { Expectations } from '../../types/PromptbookJson/PromptTemplateJson';
|
|
3
3
|
/**
|
|
4
4
|
* Gets the expectations and creates a fake text that meets the expectations
|
|
5
5
|
*
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
4
|
-
import type {
|
|
5
|
-
import type {
|
|
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
6
|
/**
|
|
7
7
|
* Multiple LLM Execution Tools is a proxy server that uses multiple execution tools internally and exposes the executor interface externally.
|
|
8
8
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
1
|
+
import type { CommonExecutionToolsOptions } from '../../execution/CommonExecutionToolsOptions';
|
|
2
|
+
import type { client_id } from '../../types/typeAliases';
|
|
3
|
+
import type { string_uri } from '../../types/typeAliases';
|
|
4
4
|
/**
|
|
5
5
|
* Options for MultipleLlmExecutionTools
|
|
6
6
|
*/
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
4
|
-
import type {
|
|
5
|
-
import type {
|
|
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
6
|
import type { OpenAiExecutionToolsOptions } from './OpenAiExecutionToolsOptions';
|
|
7
7
|
/**
|
|
8
8
|
* Execution Tools for calling OpenAI API.
|
|
@@ -18,7 +18,7 @@ export declare class OpenAiExecutionTools implements LlmExecutionTools {
|
|
|
18
18
|
*
|
|
19
19
|
* @param options which are relevant are directly passed to the OpenAI client
|
|
20
20
|
*/
|
|
21
|
-
constructor(options
|
|
21
|
+
constructor(options?: OpenAiExecutionToolsOptions);
|
|
22
22
|
/**
|
|
23
23
|
* Calls OpenAI API to use a chat model.
|
|
24
24
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ClientOptions } from 'openai';
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
2
|
+
import type { CommonExecutionToolsOptions } from '../../execution/CommonExecutionToolsOptions';
|
|
3
|
+
import type { string_token } from '../../types/typeAliases';
|
|
4
4
|
/**
|
|
5
5
|
* Options for OpenAiExecutionTools
|
|
6
6
|
*
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type OpenAI from 'openai';
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
4
|
-
import type {
|
|
2
|
+
import type { PromptResult } from '../../execution/PromptResult';
|
|
3
|
+
import type { PromptResultUsage } from '../../execution/PromptResult';
|
|
4
|
+
import type { Prompt } from '../../types/Prompt';
|
|
5
5
|
/**
|
|
6
6
|
* Computes the usage of the OpenAI API based on the response from OpenAI
|
|
7
7
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
1
|
+
import type { AvailableModel } from '../../execution/LlmExecutionTools';
|
|
2
|
+
import type { number_usd } from '../../types/typeAliases';
|
|
3
3
|
/**
|
|
4
4
|
* List of available OpenAI models with pricing
|
|
5
5
|
*
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
4
|
-
import type {
|
|
5
|
-
import type {
|
|
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
6
|
import type { RemoteLlmExecutionToolsOptions } from './RemoteLlmExecutionToolsOptions';
|
|
7
7
|
/**
|
|
8
8
|
* Remote server is a proxy server that uses its execution tools internally and exposes the executor interface externally.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
1
|
+
import type { CommonExecutionToolsOptions } from '../../execution/CommonExecutionToolsOptions';
|
|
2
|
+
import type { client_id } from '../../types/typeAliases';
|
|
3
|
+
import type { string_uri } from '../../types/typeAliases';
|
|
4
4
|
/**
|
|
5
5
|
* Options for RemoteLlmExecutionTools
|
|
6
6
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
1
|
+
import type { Prompt } from '../../../types/Prompt';
|
|
2
|
+
import type { client_id } from '../../../types/typeAliases';
|
|
3
3
|
/**
|
|
4
4
|
* Socket.io progress for remote text generation
|
|
5
5
|
*
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
4
|
-
import type {
|
|
5
|
-
import type {
|
|
1
|
+
import type { CommonExecutionToolsOptions } from '../../../execution/CommonExecutionToolsOptions';
|
|
2
|
+
import type { LlmExecutionTools } from '../../../execution/LlmExecutionTools';
|
|
3
|
+
import type { PromptbookLibrary } from '../../../promptbook-library/PromptbookLibrary';
|
|
4
|
+
import type { client_id } from '../../../types/typeAliases';
|
|
5
|
+
import type { string_uri } from '../../../types/typeAliases';
|
|
6
6
|
export type RemoteServerOptions = CommonExecutionToolsOptions & {
|
|
7
7
|
/**
|
|
8
8
|
* Port on which the server will listen
|
|
@@ -41,3 +41,6 @@ type CreatePromptbookLibraryFromDirectoryOptions = {
|
|
|
41
41
|
*/
|
|
42
42
|
export declare function createPromptbookLibraryFromDirectory(path: string_folder_path, options?: CreatePromptbookLibraryFromDirectoryOptions): Promise<PromptbookLibrary>;
|
|
43
43
|
export {};
|
|
44
|
+
/**
|
|
45
|
+
* TODO: !!!! [🧠] Library precompilation and do not mix markdown and json promptbooks
|
|
46
|
+
*/
|
|
@@ -21,3 +21,6 @@ import type { PromptbookLibrary } from '../PromptbookLibrary';
|
|
|
21
21
|
* @deprecated Do not use, it will became internal tool for other constructor functions
|
|
22
22
|
*/
|
|
23
23
|
export declare function createPromptbookLibraryFromPromise(promptbookSourcesPromiseOrFactory: Promise<Array<PromptbookJson | PromptbookString>> | (() => Promise<Array<PromptbookJson | PromptbookString>>)): PromptbookLibrary;
|
|
24
|
+
/**
|
|
25
|
+
* TODO: !!!! [🧠] Library precompilation and do not mix markdown and json promptbooks
|
|
26
|
+
*/
|
|
@@ -10,4 +10,7 @@ import { SimplePromptbookLibrary } from '../SimplePromptbookLibrary';
|
|
|
10
10
|
* @param promptbookSources
|
|
11
11
|
* @returns PromptbookLibrary
|
|
12
12
|
*/
|
|
13
|
-
export declare function createPromptbookLibraryFromSources(...promptbookSources: Array<PromptbookJson | PromptbookString>): SimplePromptbookLibrary
|
|
13
|
+
export declare function createPromptbookLibraryFromSources(...promptbookSources: Array<PromptbookJson | PromptbookString>): Promise<SimplePromptbookLibrary>;
|
|
14
|
+
/**
|
|
15
|
+
* TODO: !!!! [🧠] Library precompilation and do not mix markdown and json promptbooks
|
|
16
|
+
*/
|
package/esm/typings/{library → promptbook-library}/constructors/createPromptbookLibraryFromUrl.d.ts
RENAMED
|
@@ -24,3 +24,6 @@ type CreatePromptbookLibraryFromUrlyOptions = {
|
|
|
24
24
|
*/
|
|
25
25
|
export declare function createPromptbookLibraryFromUrl(url: string_url | URL, options: CreatePromptbookLibraryFromUrlyOptions): Promise<PromptbookLibrary>;
|
|
26
26
|
export {};
|
|
27
|
+
/**
|
|
28
|
+
* TODO: !!!! [🧠] Library precompilation and do not mix markdown and json promptbooks
|
|
29
|
+
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ScriptExecutionTools, ScriptExecutionToolsExecuteOptions } from '
|
|
2
|
-
import { JavascriptExecutionToolsOptions } from './JavascriptExecutionToolsOptions';
|
|
1
|
+
import type { ScriptExecutionTools, ScriptExecutionToolsExecuteOptions } from '../../execution/ScriptExecutionTools';
|
|
2
|
+
import type { JavascriptExecutionToolsOptions } from './JavascriptExecutionToolsOptions';
|
|
3
3
|
/**
|
|
4
4
|
* ScriptExecutionTools for JavaScript implemented via eval
|
|
5
5
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Promisable } from 'type-fest';
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
2
|
+
import type { CommonExecutionToolsOptions } from '../../execution/CommonExecutionToolsOptions';
|
|
3
|
+
import type { string_javascript_name } from '../../types/typeAliases';
|
|
4
4
|
/**
|
|
5
5
|
* Options for javascript execution
|
|
6
6
|
*/
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { CommonExecutionToolsOptions } from '../../execution/CommonExecutionToolsOptions';
|
|
2
|
+
import type { ScriptExecutionTools } from '../../execution/ScriptExecutionTools';
|
|
3
|
+
import type { ScriptExecutionToolsExecuteOptions } from '../../execution/ScriptExecutionTools';
|
|
4
|
+
/**
|
|
5
|
+
* ScriptExecutionTools for Python
|
|
6
|
+
*
|
|
7
|
+
* Warning: This is not implemented yet
|
|
8
|
+
*/
|
|
9
|
+
export declare class PythonExecutionTools implements ScriptExecutionTools {
|
|
10
|
+
private readonly options;
|
|
11
|
+
constructor(options?: CommonExecutionToolsOptions);
|
|
12
|
+
/**
|
|
13
|
+
* Executes a Python
|
|
14
|
+
*/
|
|
15
|
+
execute(options: ScriptExecutionToolsExecuteOptions): Promise<string>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { CommonExecutionToolsOptions } from '../../execution/CommonExecutionToolsOptions';
|
|
2
|
+
import type { ScriptExecutionTools } from '../../execution/ScriptExecutionTools';
|
|
3
|
+
import type { ScriptExecutionToolsExecuteOptions } from '../../execution/ScriptExecutionTools';
|
|
4
|
+
/**
|
|
5
|
+
* ScriptExecutionTools for TypeScript
|
|
6
|
+
*
|
|
7
|
+
* Warning: This is not implemented yet
|
|
8
|
+
*/
|
|
9
|
+
export declare class TypescriptExecutionTools implements ScriptExecutionTools {
|
|
10
|
+
private readonly options;
|
|
11
|
+
constructor(options?: CommonExecutionToolsOptions);
|
|
12
|
+
/**
|
|
13
|
+
* Executes a TypeScript
|
|
14
|
+
*/
|
|
15
|
+
execute(options: ScriptExecutionToolsExecuteOptions): Promise<string>;
|
|
16
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { PostprocessingFunction } from '../
|
|
1
|
+
import type { PostprocessingFunction } from '../scripting/javascript/JavascriptExecutionToolsOptions';
|
|
2
2
|
import type { ExpectFormatCommand } from './Command';
|
|
3
3
|
import type { ModelRequirements } from './ModelRequirements';
|
|
4
4
|
import type { Expectations } from './PromptbookJson/PromptTemplateJson';
|