@promptbook/core 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -0
- package/esm/index.es.js +1403 -0
- package/esm/index.es.js.map +1 -0
- package/esm/typings/_packages/core.index.d.ts +17 -0
- package/esm/typings/_packages/execute-javascript.index.d.ts +3 -0
- package/esm/typings/_packages/openai.index.d.ts +3 -0
- package/esm/typings/_packages/remote-client.index.d.ts +4 -0
- package/esm/typings/_packages/remote-server.index.d.ts +3 -0
- package/esm/typings/_packages/types.index.d.ts +20 -0
- package/esm/typings/_packages/utils.index.d.ts +6 -0
- package/esm/typings/_packages/wizzard.index.d.ts +2 -0
- package/esm/typings/classes/PromptTemplatePipeline.d.ts +68 -0
- package/esm/typings/classes/PromptTemplatePipelineLibrary.d.ts +55 -0
- package/esm/typings/config.d.ts +10 -0
- package/esm/typings/conversion/_importPtp.d.ts +12 -0
- package/esm/typings/conversion/parseCommand.d.ts +6 -0
- package/esm/typings/conversion/parseCommand.test.d.ts +1 -0
- package/esm/typings/conversion/promptTemplatePipelineStringToJson.d.ts +12 -0
- package/esm/typings/conversion/promptTemplatePipelineStringToJson.test.d.ts +1 -0
- package/esm/typings/conversion/validatePromptTemplatePipelineJson.d.ts +26 -0
- package/esm/typings/conversion/validatePromptTemplatePipelineJson.test.d.ts +1 -0
- package/esm/typings/execution/CommonExecutionToolsOptions.d.ts +6 -0
- package/esm/typings/execution/ExecutionTools.d.ts +25 -0
- package/esm/typings/execution/NaturalExecutionTools.d.ts +22 -0
- package/esm/typings/execution/PromptResult.d.ts +38 -0
- package/esm/typings/execution/PtpExecutor.d.ts +19 -0
- package/esm/typings/execution/ScriptExecutionTools.d.ts +34 -0
- package/esm/typings/execution/UserInterfaceTools.d.ts +30 -0
- package/esm/typings/execution/createPtpExecutor.d.ts +18 -0
- package/esm/typings/execution/plugins/natural-execution-tools/mocked/MockedEchoNaturalExecutionTools.d.ts +22 -0
- package/esm/typings/execution/plugins/natural-execution-tools/mocked/mocked-chat.test.d.ts +4 -0
- package/esm/typings/execution/plugins/natural-execution-tools/mocked/mocked-completion.test.d.ts +4 -0
- package/esm/typings/execution/plugins/natural-execution-tools/openai/OpenAiExecutionTools.d.ts +27 -0
- package/esm/typings/execution/plugins/natural-execution-tools/openai/OpenAiExecutionToolsOptions.d.ts +11 -0
- package/esm/typings/execution/plugins/natural-execution-tools/remote/RemoteNaturalExecutionTools.d.ts +35 -0
- package/esm/typings/execution/plugins/natural-execution-tools/remote/RemoteNaturalExecutionToolsOptions.d.ts +16 -0
- package/esm/typings/execution/plugins/natural-execution-tools/remote/createRemoteServer.d.ts +16 -0
- package/esm/typings/execution/plugins/natural-execution-tools/remote/interfaces/Ptps_Error.d.ts +3 -0
- package/esm/typings/execution/plugins/natural-execution-tools/remote/interfaces/Ptps_Progress.d.ts +4 -0
- package/esm/typings/execution/plugins/natural-execution-tools/remote/interfaces/Ptps_Request.d.ts +6 -0
- package/esm/typings/execution/plugins/natural-execution-tools/remote/interfaces/Ptps_Response.d.ts +4 -0
- package/esm/typings/execution/plugins/natural-execution-tools/remote/interfaces/RemoteServerOptions.d.ts +20 -0
- package/esm/typings/execution/plugins/script-execution-tools/javascript/JavascriptEvalExecutionTools.d.ts +19 -0
- package/esm/typings/execution/plugins/script-execution-tools/javascript/JavascriptEvalExecutionTools.test.d.ts +4 -0
- package/esm/typings/execution/plugins/script-execution-tools/javascript/JavascriptExecutionTools.d.ts +20 -0
- package/esm/typings/execution/plugins/script-execution-tools/javascript/utils/preserve.d.ts +11 -0
- package/esm/typings/execution/plugins/script-execution-tools/postprocessing.test.d.ts +4 -0
- package/esm/typings/execution/plugins/script-execution-tools/python/PythonExecutionTools.d.ts +15 -0
- package/esm/typings/execution/plugins/script-execution-tools/script-execution-errors.test.d.ts +1 -0
- package/esm/typings/execution/plugins/script-execution-tools/script-execution-tools.test.d.ts +1 -0
- package/esm/typings/execution/plugins/script-execution-tools/typescript/TypescriptExecutionTools.d.ts +15 -0
- package/esm/typings/execution/plugins/user-interface-execution-tools/callback/CallbackInterfaceTools.d.ts +14 -0
- package/esm/typings/execution/plugins/user-interface-execution-tools/callback/CallbackInterfaceToolsOptions.d.ts +12 -0
- package/esm/typings/execution/plugins/user-interface-execution-tools/simple-prompt/SimplePromptInterfaceTools.d.ts +16 -0
- package/esm/typings/execution/plugins/user-interface-execution-tools/user-interface-execution-tools.test.d.ts +1 -0
- package/esm/typings/types/Command.d.ts +65 -0
- package/esm/typings/types/ExecutionTypes.d.ts +13 -0
- package/esm/typings/types/ModelRequirements.d.ts +28 -0
- package/esm/typings/types/Parameters.d.ts +14 -0
- package/esm/typings/types/Prompt.d.ts +35 -0
- package/esm/typings/types/PromptTemplatePipelineJson/PromptTemplateJson.d.ts +82 -0
- package/esm/typings/types/PromptTemplatePipelineJson/PromptTemplateParameterJson.d.ts +23 -0
- package/esm/typings/types/PromptTemplatePipelineJson/PromptTemplatePipelineJson.d.ts +56 -0
- package/esm/typings/types/PromptTemplatePipelineString.d.ts +14 -0
- package/esm/typings/types/ScriptLanguage.d.ts +9 -0
- package/esm/typings/types/TaskProgress.d.ts +12 -0
- package/esm/typings/types/typeAliasEmoji.d.ts +9 -0
- package/esm/typings/types/typeAliases.d.ts +477 -0
- package/esm/typings/utils/emojis.d.ts +16 -0
- package/esm/typings/utils/just.d.ts +10 -0
- package/esm/typings/utils/markdown/extractAllListItemsFromMarkdown.d.ts +15 -0
- package/esm/typings/utils/markdown/extractAllListItemsFromMarkdown.test.d.ts +1 -0
- package/esm/typings/utils/markdown/extractBlocksFromMarkdown.d.ts +13 -0
- package/esm/typings/utils/markdown/extractBlocksFromMarkdown.test.d.ts +1 -0
- package/esm/typings/utils/markdown/extractOneBlockFromMarkdown.d.ts +16 -0
- package/esm/typings/utils/markdown/extractOneBlockFromMarkdown.test.d.ts +1 -0
- package/esm/typings/utils/markdown/removeContentComments.d.ts +8 -0
- package/esm/typings/utils/markdown/removeContentComments.test.d.ts +1 -0
- package/esm/typings/utils/markdown/removeMarkdownFormatting.d.ts +8 -0
- package/esm/typings/utils/markdown/removeMarkdownFormatting.test.d.ts +1 -0
- package/esm/typings/utils/markdown-json/MarkdownStructure.d.ts +25 -0
- package/esm/typings/utils/markdown-json/countMarkdownStructureDeepness.d.ts +7 -0
- package/esm/typings/utils/markdown-json/countMarkdownStructureDeepness.test.d.ts +1 -0
- package/esm/typings/utils/markdown-json/markdownToMarkdownStructure.d.ts +13 -0
- package/esm/typings/utils/markdown-json/markdownToMarkdownStructure.test.d.ts +1 -0
- package/esm/typings/utils/removeEmojis.d.ts +7 -0
- package/esm/typings/utils/removeEmojis.test.d.ts +1 -0
- package/esm/typings/utils/removeQuotes.d.ts +13 -0
- package/esm/typings/utils/removeQuotes.test.d.ts +1 -0
- package/esm/typings/utils/replaceParameters.d.ts +16 -0
- package/esm/typings/utils/replaceParameters.test.d.ts +1 -0
- package/esm/typings/utils/unwrapResult.d.ts +13 -0
- package/esm/typings/utils/unwrapResult.test.d.ts +1 -0
- package/esm/typings/wizzard/Wizzard.d.ts +1 -0
- package/esm/typings/wizzard/sample.d.ts +5 -0
- package/package.json +43 -0
- package/umd/index.umd.js +1423 -0
- package/umd/index.umd.js.map +1 -0
- package/umd/typings/_packages/core.index.d.ts +17 -0
- package/umd/typings/_packages/execute-javascript.index.d.ts +3 -0
- package/umd/typings/_packages/openai.index.d.ts +3 -0
- package/umd/typings/_packages/remote-client.index.d.ts +4 -0
- package/umd/typings/_packages/remote-server.index.d.ts +3 -0
- package/umd/typings/_packages/types.index.d.ts +20 -0
- package/umd/typings/_packages/utils.index.d.ts +6 -0
- package/umd/typings/_packages/wizzard.index.d.ts +2 -0
- package/umd/typings/classes/PromptTemplatePipeline.d.ts +68 -0
- package/umd/typings/classes/PromptTemplatePipelineLibrary.d.ts +55 -0
- package/umd/typings/config.d.ts +10 -0
- package/umd/typings/conversion/_importPtp.d.ts +12 -0
- package/umd/typings/conversion/parseCommand.d.ts +6 -0
- package/umd/typings/conversion/parseCommand.test.d.ts +1 -0
- package/umd/typings/conversion/promptTemplatePipelineStringToJson.d.ts +12 -0
- package/umd/typings/conversion/promptTemplatePipelineStringToJson.test.d.ts +1 -0
- package/umd/typings/conversion/validatePromptTemplatePipelineJson.d.ts +26 -0
- package/umd/typings/conversion/validatePromptTemplatePipelineJson.test.d.ts +1 -0
- package/umd/typings/execution/CommonExecutionToolsOptions.d.ts +6 -0
- package/umd/typings/execution/ExecutionTools.d.ts +25 -0
- package/umd/typings/execution/NaturalExecutionTools.d.ts +22 -0
- package/umd/typings/execution/PromptResult.d.ts +38 -0
- package/umd/typings/execution/PtpExecutor.d.ts +19 -0
- package/umd/typings/execution/ScriptExecutionTools.d.ts +34 -0
- package/umd/typings/execution/UserInterfaceTools.d.ts +30 -0
- package/umd/typings/execution/createPtpExecutor.d.ts +18 -0
- package/umd/typings/execution/plugins/natural-execution-tools/mocked/MockedEchoNaturalExecutionTools.d.ts +22 -0
- package/umd/typings/execution/plugins/natural-execution-tools/mocked/mocked-chat.test.d.ts +4 -0
- package/umd/typings/execution/plugins/natural-execution-tools/mocked/mocked-completion.test.d.ts +4 -0
- package/umd/typings/execution/plugins/natural-execution-tools/openai/OpenAiExecutionTools.d.ts +27 -0
- package/umd/typings/execution/plugins/natural-execution-tools/openai/OpenAiExecutionToolsOptions.d.ts +11 -0
- package/umd/typings/execution/plugins/natural-execution-tools/remote/RemoteNaturalExecutionTools.d.ts +35 -0
- package/umd/typings/execution/plugins/natural-execution-tools/remote/RemoteNaturalExecutionToolsOptions.d.ts +16 -0
- package/umd/typings/execution/plugins/natural-execution-tools/remote/createRemoteServer.d.ts +16 -0
- package/umd/typings/execution/plugins/natural-execution-tools/remote/interfaces/Ptps_Error.d.ts +3 -0
- package/umd/typings/execution/plugins/natural-execution-tools/remote/interfaces/Ptps_Progress.d.ts +4 -0
- package/umd/typings/execution/plugins/natural-execution-tools/remote/interfaces/Ptps_Request.d.ts +6 -0
- package/umd/typings/execution/plugins/natural-execution-tools/remote/interfaces/Ptps_Response.d.ts +4 -0
- package/umd/typings/execution/plugins/natural-execution-tools/remote/interfaces/RemoteServerOptions.d.ts +20 -0
- package/umd/typings/execution/plugins/script-execution-tools/javascript/JavascriptEvalExecutionTools.d.ts +19 -0
- package/umd/typings/execution/plugins/script-execution-tools/javascript/JavascriptEvalExecutionTools.test.d.ts +4 -0
- package/umd/typings/execution/plugins/script-execution-tools/javascript/JavascriptExecutionTools.d.ts +20 -0
- package/umd/typings/execution/plugins/script-execution-tools/javascript/utils/preserve.d.ts +11 -0
- package/umd/typings/execution/plugins/script-execution-tools/postprocessing.test.d.ts +4 -0
- package/umd/typings/execution/plugins/script-execution-tools/python/PythonExecutionTools.d.ts +15 -0
- package/umd/typings/execution/plugins/script-execution-tools/script-execution-errors.test.d.ts +1 -0
- package/umd/typings/execution/plugins/script-execution-tools/script-execution-tools.test.d.ts +1 -0
- package/umd/typings/execution/plugins/script-execution-tools/typescript/TypescriptExecutionTools.d.ts +15 -0
- package/umd/typings/execution/plugins/user-interface-execution-tools/callback/CallbackInterfaceTools.d.ts +14 -0
- package/umd/typings/execution/plugins/user-interface-execution-tools/callback/CallbackInterfaceToolsOptions.d.ts +12 -0
- package/umd/typings/execution/plugins/user-interface-execution-tools/simple-prompt/SimplePromptInterfaceTools.d.ts +16 -0
- package/umd/typings/execution/plugins/user-interface-execution-tools/user-interface-execution-tools.test.d.ts +1 -0
- package/umd/typings/types/Command.d.ts +65 -0
- package/umd/typings/types/ExecutionTypes.d.ts +13 -0
- package/umd/typings/types/ModelRequirements.d.ts +28 -0
- package/umd/typings/types/Parameters.d.ts +14 -0
- package/umd/typings/types/Prompt.d.ts +35 -0
- package/umd/typings/types/PromptTemplatePipelineJson/PromptTemplateJson.d.ts +82 -0
- package/umd/typings/types/PromptTemplatePipelineJson/PromptTemplateParameterJson.d.ts +23 -0
- package/umd/typings/types/PromptTemplatePipelineJson/PromptTemplatePipelineJson.d.ts +56 -0
- package/umd/typings/types/PromptTemplatePipelineString.d.ts +14 -0
- package/umd/typings/types/ScriptLanguage.d.ts +9 -0
- package/umd/typings/types/TaskProgress.d.ts +12 -0
- package/umd/typings/types/typeAliasEmoji.d.ts +9 -0
- package/umd/typings/types/typeAliases.d.ts +477 -0
- package/umd/typings/utils/emojis.d.ts +16 -0
- package/umd/typings/utils/just.d.ts +10 -0
- package/umd/typings/utils/markdown/extractAllListItemsFromMarkdown.d.ts +15 -0
- package/umd/typings/utils/markdown/extractAllListItemsFromMarkdown.test.d.ts +1 -0
- package/umd/typings/utils/markdown/extractBlocksFromMarkdown.d.ts +13 -0
- package/umd/typings/utils/markdown/extractBlocksFromMarkdown.test.d.ts +1 -0
- package/umd/typings/utils/markdown/extractOneBlockFromMarkdown.d.ts +16 -0
- package/umd/typings/utils/markdown/extractOneBlockFromMarkdown.test.d.ts +1 -0
- package/umd/typings/utils/markdown/removeContentComments.d.ts +8 -0
- package/umd/typings/utils/markdown/removeContentComments.test.d.ts +1 -0
- package/umd/typings/utils/markdown/removeMarkdownFormatting.d.ts +8 -0
- package/umd/typings/utils/markdown/removeMarkdownFormatting.test.d.ts +1 -0
- package/umd/typings/utils/markdown-json/MarkdownStructure.d.ts +25 -0
- package/umd/typings/utils/markdown-json/countMarkdownStructureDeepness.d.ts +7 -0
- package/umd/typings/utils/markdown-json/countMarkdownStructureDeepness.test.d.ts +1 -0
- package/umd/typings/utils/markdown-json/markdownToMarkdownStructure.d.ts +13 -0
- package/umd/typings/utils/markdown-json/markdownToMarkdownStructure.test.d.ts +1 -0
- package/umd/typings/utils/removeEmojis.d.ts +7 -0
- package/umd/typings/utils/removeEmojis.test.d.ts +1 -0
- package/umd/typings/utils/removeQuotes.d.ts +13 -0
- package/umd/typings/utils/removeQuotes.test.d.ts +1 -0
- package/umd/typings/utils/replaceParameters.d.ts +16 -0
- package/umd/typings/utils/replaceParameters.test.d.ts +1 -0
- package/umd/typings/utils/unwrapResult.d.ts +13 -0
- package/umd/typings/utils/unwrapResult.test.d.ts +1 -0
- package/umd/typings/wizzard/Wizzard.d.ts +1 -0
- package/umd/typings/wizzard/sample.d.ts +5 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Removes quotes and optional introduce text from a string
|
|
3
|
+
*
|
|
4
|
+
* Tip: This is very usefull for post-processing of the result of the LLM model
|
|
5
|
+
* Note: This function trims the text and removes whole introduce sentence if it is present
|
|
6
|
+
* Note: There are two simmilar functions:
|
|
7
|
+
* - `removeQuotes` which removes only bounding quotes
|
|
8
|
+
* - `unwrapResult` which removes whole introduce sentence
|
|
9
|
+
*
|
|
10
|
+
* @param text optionally quoted text
|
|
11
|
+
* @returns text without quotes
|
|
12
|
+
*/
|
|
13
|
+
export declare function unwrapResult(text: string): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const Wizzard: any;
|
package/package.json
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@promptbook/core",
|
|
3
|
+
"version": "0.8.0",
|
|
4
|
+
"description": "Library to supercharge your use of large language models",
|
|
5
|
+
"private": false,
|
|
6
|
+
"sideEffects": false,
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/webgptorg/promptbook"
|
|
10
|
+
},
|
|
11
|
+
"contributors": [
|
|
12
|
+
"Pavol Hejný <me@pavolhejny.com> (https://www.pavolhejny.com/)"
|
|
13
|
+
],
|
|
14
|
+
"keywords": [
|
|
15
|
+
"autogpt",
|
|
16
|
+
"openai",
|
|
17
|
+
"gpt-3",
|
|
18
|
+
"gpt-4",
|
|
19
|
+
"chatgpt",
|
|
20
|
+
"ai",
|
|
21
|
+
"machine-learning",
|
|
22
|
+
"natural-language-processing",
|
|
23
|
+
"nlp",
|
|
24
|
+
"prompt",
|
|
25
|
+
"template",
|
|
26
|
+
"pipeline",
|
|
27
|
+
"automation",
|
|
28
|
+
"text-generation",
|
|
29
|
+
"language-model"
|
|
30
|
+
],
|
|
31
|
+
"license": "SEE LICENSE IN LICENSE",
|
|
32
|
+
"bugs": {
|
|
33
|
+
"url": "https://github.com/webgptorg/promptbook/issues"
|
|
34
|
+
},
|
|
35
|
+
"homepage": "https://www.npmjs.com/package/@promptbook/core",
|
|
36
|
+
"dependencies": {
|
|
37
|
+
"n12": "1.6.0",
|
|
38
|
+
"spacetrim": "0.9.2"
|
|
39
|
+
},
|
|
40
|
+
"main": "./umd/index.umd.js",
|
|
41
|
+
"module": "./esm/index.es.js",
|
|
42
|
+
"typings": "./esm/typings/_packages/core.index.d.ts"
|
|
43
|
+
}
|