@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.
Files changed (190) hide show
  1. package/README.md +5 -0
  2. package/esm/index.es.js +1403 -0
  3. package/esm/index.es.js.map +1 -0
  4. package/esm/typings/_packages/core.index.d.ts +17 -0
  5. package/esm/typings/_packages/execute-javascript.index.d.ts +3 -0
  6. package/esm/typings/_packages/openai.index.d.ts +3 -0
  7. package/esm/typings/_packages/remote-client.index.d.ts +4 -0
  8. package/esm/typings/_packages/remote-server.index.d.ts +3 -0
  9. package/esm/typings/_packages/types.index.d.ts +20 -0
  10. package/esm/typings/_packages/utils.index.d.ts +6 -0
  11. package/esm/typings/_packages/wizzard.index.d.ts +2 -0
  12. package/esm/typings/classes/PromptTemplatePipeline.d.ts +68 -0
  13. package/esm/typings/classes/PromptTemplatePipelineLibrary.d.ts +55 -0
  14. package/esm/typings/config.d.ts +10 -0
  15. package/esm/typings/conversion/_importPtp.d.ts +12 -0
  16. package/esm/typings/conversion/parseCommand.d.ts +6 -0
  17. package/esm/typings/conversion/parseCommand.test.d.ts +1 -0
  18. package/esm/typings/conversion/promptTemplatePipelineStringToJson.d.ts +12 -0
  19. package/esm/typings/conversion/promptTemplatePipelineStringToJson.test.d.ts +1 -0
  20. package/esm/typings/conversion/validatePromptTemplatePipelineJson.d.ts +26 -0
  21. package/esm/typings/conversion/validatePromptTemplatePipelineJson.test.d.ts +1 -0
  22. package/esm/typings/execution/CommonExecutionToolsOptions.d.ts +6 -0
  23. package/esm/typings/execution/ExecutionTools.d.ts +25 -0
  24. package/esm/typings/execution/NaturalExecutionTools.d.ts +22 -0
  25. package/esm/typings/execution/PromptResult.d.ts +38 -0
  26. package/esm/typings/execution/PtpExecutor.d.ts +19 -0
  27. package/esm/typings/execution/ScriptExecutionTools.d.ts +34 -0
  28. package/esm/typings/execution/UserInterfaceTools.d.ts +30 -0
  29. package/esm/typings/execution/createPtpExecutor.d.ts +18 -0
  30. package/esm/typings/execution/plugins/natural-execution-tools/mocked/MockedEchoNaturalExecutionTools.d.ts +22 -0
  31. package/esm/typings/execution/plugins/natural-execution-tools/mocked/mocked-chat.test.d.ts +4 -0
  32. package/esm/typings/execution/plugins/natural-execution-tools/mocked/mocked-completion.test.d.ts +4 -0
  33. package/esm/typings/execution/plugins/natural-execution-tools/openai/OpenAiExecutionTools.d.ts +27 -0
  34. package/esm/typings/execution/plugins/natural-execution-tools/openai/OpenAiExecutionToolsOptions.d.ts +11 -0
  35. package/esm/typings/execution/plugins/natural-execution-tools/remote/RemoteNaturalExecutionTools.d.ts +35 -0
  36. package/esm/typings/execution/plugins/natural-execution-tools/remote/RemoteNaturalExecutionToolsOptions.d.ts +16 -0
  37. package/esm/typings/execution/plugins/natural-execution-tools/remote/createRemoteServer.d.ts +16 -0
  38. package/esm/typings/execution/plugins/natural-execution-tools/remote/interfaces/Ptps_Error.d.ts +3 -0
  39. package/esm/typings/execution/plugins/natural-execution-tools/remote/interfaces/Ptps_Progress.d.ts +4 -0
  40. package/esm/typings/execution/plugins/natural-execution-tools/remote/interfaces/Ptps_Request.d.ts +6 -0
  41. package/esm/typings/execution/plugins/natural-execution-tools/remote/interfaces/Ptps_Response.d.ts +4 -0
  42. package/esm/typings/execution/plugins/natural-execution-tools/remote/interfaces/RemoteServerOptions.d.ts +20 -0
  43. package/esm/typings/execution/plugins/script-execution-tools/javascript/JavascriptEvalExecutionTools.d.ts +19 -0
  44. package/esm/typings/execution/plugins/script-execution-tools/javascript/JavascriptEvalExecutionTools.test.d.ts +4 -0
  45. package/esm/typings/execution/plugins/script-execution-tools/javascript/JavascriptExecutionTools.d.ts +20 -0
  46. package/esm/typings/execution/plugins/script-execution-tools/javascript/utils/preserve.d.ts +11 -0
  47. package/esm/typings/execution/plugins/script-execution-tools/postprocessing.test.d.ts +4 -0
  48. package/esm/typings/execution/plugins/script-execution-tools/python/PythonExecutionTools.d.ts +15 -0
  49. package/esm/typings/execution/plugins/script-execution-tools/script-execution-errors.test.d.ts +1 -0
  50. package/esm/typings/execution/plugins/script-execution-tools/script-execution-tools.test.d.ts +1 -0
  51. package/esm/typings/execution/plugins/script-execution-tools/typescript/TypescriptExecutionTools.d.ts +15 -0
  52. package/esm/typings/execution/plugins/user-interface-execution-tools/callback/CallbackInterfaceTools.d.ts +14 -0
  53. package/esm/typings/execution/plugins/user-interface-execution-tools/callback/CallbackInterfaceToolsOptions.d.ts +12 -0
  54. package/esm/typings/execution/plugins/user-interface-execution-tools/simple-prompt/SimplePromptInterfaceTools.d.ts +16 -0
  55. package/esm/typings/execution/plugins/user-interface-execution-tools/user-interface-execution-tools.test.d.ts +1 -0
  56. package/esm/typings/types/Command.d.ts +65 -0
  57. package/esm/typings/types/ExecutionTypes.d.ts +13 -0
  58. package/esm/typings/types/ModelRequirements.d.ts +28 -0
  59. package/esm/typings/types/Parameters.d.ts +14 -0
  60. package/esm/typings/types/Prompt.d.ts +35 -0
  61. package/esm/typings/types/PromptTemplatePipelineJson/PromptTemplateJson.d.ts +82 -0
  62. package/esm/typings/types/PromptTemplatePipelineJson/PromptTemplateParameterJson.d.ts +23 -0
  63. package/esm/typings/types/PromptTemplatePipelineJson/PromptTemplatePipelineJson.d.ts +56 -0
  64. package/esm/typings/types/PromptTemplatePipelineString.d.ts +14 -0
  65. package/esm/typings/types/ScriptLanguage.d.ts +9 -0
  66. package/esm/typings/types/TaskProgress.d.ts +12 -0
  67. package/esm/typings/types/typeAliasEmoji.d.ts +9 -0
  68. package/esm/typings/types/typeAliases.d.ts +477 -0
  69. package/esm/typings/utils/emojis.d.ts +16 -0
  70. package/esm/typings/utils/just.d.ts +10 -0
  71. package/esm/typings/utils/markdown/extractAllListItemsFromMarkdown.d.ts +15 -0
  72. package/esm/typings/utils/markdown/extractAllListItemsFromMarkdown.test.d.ts +1 -0
  73. package/esm/typings/utils/markdown/extractBlocksFromMarkdown.d.ts +13 -0
  74. package/esm/typings/utils/markdown/extractBlocksFromMarkdown.test.d.ts +1 -0
  75. package/esm/typings/utils/markdown/extractOneBlockFromMarkdown.d.ts +16 -0
  76. package/esm/typings/utils/markdown/extractOneBlockFromMarkdown.test.d.ts +1 -0
  77. package/esm/typings/utils/markdown/removeContentComments.d.ts +8 -0
  78. package/esm/typings/utils/markdown/removeContentComments.test.d.ts +1 -0
  79. package/esm/typings/utils/markdown/removeMarkdownFormatting.d.ts +8 -0
  80. package/esm/typings/utils/markdown/removeMarkdownFormatting.test.d.ts +1 -0
  81. package/esm/typings/utils/markdown-json/MarkdownStructure.d.ts +25 -0
  82. package/esm/typings/utils/markdown-json/countMarkdownStructureDeepness.d.ts +7 -0
  83. package/esm/typings/utils/markdown-json/countMarkdownStructureDeepness.test.d.ts +1 -0
  84. package/esm/typings/utils/markdown-json/markdownToMarkdownStructure.d.ts +13 -0
  85. package/esm/typings/utils/markdown-json/markdownToMarkdownStructure.test.d.ts +1 -0
  86. package/esm/typings/utils/removeEmojis.d.ts +7 -0
  87. package/esm/typings/utils/removeEmojis.test.d.ts +1 -0
  88. package/esm/typings/utils/removeQuotes.d.ts +13 -0
  89. package/esm/typings/utils/removeQuotes.test.d.ts +1 -0
  90. package/esm/typings/utils/replaceParameters.d.ts +16 -0
  91. package/esm/typings/utils/replaceParameters.test.d.ts +1 -0
  92. package/esm/typings/utils/unwrapResult.d.ts +13 -0
  93. package/esm/typings/utils/unwrapResult.test.d.ts +1 -0
  94. package/esm/typings/wizzard/Wizzard.d.ts +1 -0
  95. package/esm/typings/wizzard/sample.d.ts +5 -0
  96. package/package.json +43 -0
  97. package/umd/index.umd.js +1423 -0
  98. package/umd/index.umd.js.map +1 -0
  99. package/umd/typings/_packages/core.index.d.ts +17 -0
  100. package/umd/typings/_packages/execute-javascript.index.d.ts +3 -0
  101. package/umd/typings/_packages/openai.index.d.ts +3 -0
  102. package/umd/typings/_packages/remote-client.index.d.ts +4 -0
  103. package/umd/typings/_packages/remote-server.index.d.ts +3 -0
  104. package/umd/typings/_packages/types.index.d.ts +20 -0
  105. package/umd/typings/_packages/utils.index.d.ts +6 -0
  106. package/umd/typings/_packages/wizzard.index.d.ts +2 -0
  107. package/umd/typings/classes/PromptTemplatePipeline.d.ts +68 -0
  108. package/umd/typings/classes/PromptTemplatePipelineLibrary.d.ts +55 -0
  109. package/umd/typings/config.d.ts +10 -0
  110. package/umd/typings/conversion/_importPtp.d.ts +12 -0
  111. package/umd/typings/conversion/parseCommand.d.ts +6 -0
  112. package/umd/typings/conversion/parseCommand.test.d.ts +1 -0
  113. package/umd/typings/conversion/promptTemplatePipelineStringToJson.d.ts +12 -0
  114. package/umd/typings/conversion/promptTemplatePipelineStringToJson.test.d.ts +1 -0
  115. package/umd/typings/conversion/validatePromptTemplatePipelineJson.d.ts +26 -0
  116. package/umd/typings/conversion/validatePromptTemplatePipelineJson.test.d.ts +1 -0
  117. package/umd/typings/execution/CommonExecutionToolsOptions.d.ts +6 -0
  118. package/umd/typings/execution/ExecutionTools.d.ts +25 -0
  119. package/umd/typings/execution/NaturalExecutionTools.d.ts +22 -0
  120. package/umd/typings/execution/PromptResult.d.ts +38 -0
  121. package/umd/typings/execution/PtpExecutor.d.ts +19 -0
  122. package/umd/typings/execution/ScriptExecutionTools.d.ts +34 -0
  123. package/umd/typings/execution/UserInterfaceTools.d.ts +30 -0
  124. package/umd/typings/execution/createPtpExecutor.d.ts +18 -0
  125. package/umd/typings/execution/plugins/natural-execution-tools/mocked/MockedEchoNaturalExecutionTools.d.ts +22 -0
  126. package/umd/typings/execution/plugins/natural-execution-tools/mocked/mocked-chat.test.d.ts +4 -0
  127. package/umd/typings/execution/plugins/natural-execution-tools/mocked/mocked-completion.test.d.ts +4 -0
  128. package/umd/typings/execution/plugins/natural-execution-tools/openai/OpenAiExecutionTools.d.ts +27 -0
  129. package/umd/typings/execution/plugins/natural-execution-tools/openai/OpenAiExecutionToolsOptions.d.ts +11 -0
  130. package/umd/typings/execution/plugins/natural-execution-tools/remote/RemoteNaturalExecutionTools.d.ts +35 -0
  131. package/umd/typings/execution/plugins/natural-execution-tools/remote/RemoteNaturalExecutionToolsOptions.d.ts +16 -0
  132. package/umd/typings/execution/plugins/natural-execution-tools/remote/createRemoteServer.d.ts +16 -0
  133. package/umd/typings/execution/plugins/natural-execution-tools/remote/interfaces/Ptps_Error.d.ts +3 -0
  134. package/umd/typings/execution/plugins/natural-execution-tools/remote/interfaces/Ptps_Progress.d.ts +4 -0
  135. package/umd/typings/execution/plugins/natural-execution-tools/remote/interfaces/Ptps_Request.d.ts +6 -0
  136. package/umd/typings/execution/plugins/natural-execution-tools/remote/interfaces/Ptps_Response.d.ts +4 -0
  137. package/umd/typings/execution/plugins/natural-execution-tools/remote/interfaces/RemoteServerOptions.d.ts +20 -0
  138. package/umd/typings/execution/plugins/script-execution-tools/javascript/JavascriptEvalExecutionTools.d.ts +19 -0
  139. package/umd/typings/execution/plugins/script-execution-tools/javascript/JavascriptEvalExecutionTools.test.d.ts +4 -0
  140. package/umd/typings/execution/plugins/script-execution-tools/javascript/JavascriptExecutionTools.d.ts +20 -0
  141. package/umd/typings/execution/plugins/script-execution-tools/javascript/utils/preserve.d.ts +11 -0
  142. package/umd/typings/execution/plugins/script-execution-tools/postprocessing.test.d.ts +4 -0
  143. package/umd/typings/execution/plugins/script-execution-tools/python/PythonExecutionTools.d.ts +15 -0
  144. package/umd/typings/execution/plugins/script-execution-tools/script-execution-errors.test.d.ts +1 -0
  145. package/umd/typings/execution/plugins/script-execution-tools/script-execution-tools.test.d.ts +1 -0
  146. package/umd/typings/execution/plugins/script-execution-tools/typescript/TypescriptExecutionTools.d.ts +15 -0
  147. package/umd/typings/execution/plugins/user-interface-execution-tools/callback/CallbackInterfaceTools.d.ts +14 -0
  148. package/umd/typings/execution/plugins/user-interface-execution-tools/callback/CallbackInterfaceToolsOptions.d.ts +12 -0
  149. package/umd/typings/execution/plugins/user-interface-execution-tools/simple-prompt/SimplePromptInterfaceTools.d.ts +16 -0
  150. package/umd/typings/execution/plugins/user-interface-execution-tools/user-interface-execution-tools.test.d.ts +1 -0
  151. package/umd/typings/types/Command.d.ts +65 -0
  152. package/umd/typings/types/ExecutionTypes.d.ts +13 -0
  153. package/umd/typings/types/ModelRequirements.d.ts +28 -0
  154. package/umd/typings/types/Parameters.d.ts +14 -0
  155. package/umd/typings/types/Prompt.d.ts +35 -0
  156. package/umd/typings/types/PromptTemplatePipelineJson/PromptTemplateJson.d.ts +82 -0
  157. package/umd/typings/types/PromptTemplatePipelineJson/PromptTemplateParameterJson.d.ts +23 -0
  158. package/umd/typings/types/PromptTemplatePipelineJson/PromptTemplatePipelineJson.d.ts +56 -0
  159. package/umd/typings/types/PromptTemplatePipelineString.d.ts +14 -0
  160. package/umd/typings/types/ScriptLanguage.d.ts +9 -0
  161. package/umd/typings/types/TaskProgress.d.ts +12 -0
  162. package/umd/typings/types/typeAliasEmoji.d.ts +9 -0
  163. package/umd/typings/types/typeAliases.d.ts +477 -0
  164. package/umd/typings/utils/emojis.d.ts +16 -0
  165. package/umd/typings/utils/just.d.ts +10 -0
  166. package/umd/typings/utils/markdown/extractAllListItemsFromMarkdown.d.ts +15 -0
  167. package/umd/typings/utils/markdown/extractAllListItemsFromMarkdown.test.d.ts +1 -0
  168. package/umd/typings/utils/markdown/extractBlocksFromMarkdown.d.ts +13 -0
  169. package/umd/typings/utils/markdown/extractBlocksFromMarkdown.test.d.ts +1 -0
  170. package/umd/typings/utils/markdown/extractOneBlockFromMarkdown.d.ts +16 -0
  171. package/umd/typings/utils/markdown/extractOneBlockFromMarkdown.test.d.ts +1 -0
  172. package/umd/typings/utils/markdown/removeContentComments.d.ts +8 -0
  173. package/umd/typings/utils/markdown/removeContentComments.test.d.ts +1 -0
  174. package/umd/typings/utils/markdown/removeMarkdownFormatting.d.ts +8 -0
  175. package/umd/typings/utils/markdown/removeMarkdownFormatting.test.d.ts +1 -0
  176. package/umd/typings/utils/markdown-json/MarkdownStructure.d.ts +25 -0
  177. package/umd/typings/utils/markdown-json/countMarkdownStructureDeepness.d.ts +7 -0
  178. package/umd/typings/utils/markdown-json/countMarkdownStructureDeepness.test.d.ts +1 -0
  179. package/umd/typings/utils/markdown-json/markdownToMarkdownStructure.d.ts +13 -0
  180. package/umd/typings/utils/markdown-json/markdownToMarkdownStructure.test.d.ts +1 -0
  181. package/umd/typings/utils/removeEmojis.d.ts +7 -0
  182. package/umd/typings/utils/removeEmojis.test.d.ts +1 -0
  183. package/umd/typings/utils/removeQuotes.d.ts +13 -0
  184. package/umd/typings/utils/removeQuotes.test.d.ts +1 -0
  185. package/umd/typings/utils/replaceParameters.d.ts +16 -0
  186. package/umd/typings/utils/replaceParameters.test.d.ts +1 -0
  187. package/umd/typings/utils/unwrapResult.d.ts +13 -0
  188. package/umd/typings/utils/unwrapResult.test.d.ts +1 -0
  189. package/umd/typings/wizzard/Wizzard.d.ts +1 -0
  190. package/umd/typings/wizzard/sample.d.ts +5 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.es.js","sources":["../../../node_modules/tslib/tslib.es6.js","../../../src/config.ts","../../../src/types/ScriptLanguage.ts","../../../src/utils/markdown-json/countMarkdownStructureDeepness.ts","../../../src/utils/markdown-json/markdownToMarkdownStructure.ts","../../../src/utils/markdown/extractAllListItemsFromMarkdown.ts","../../../src/utils/markdown/extractBlocksFromMarkdown.ts","../../../src/utils/markdown/extractOneBlockFromMarkdown.ts","../../../src/utils/markdown/removeContentComments.ts","../../../src/types/ExecutionTypes.ts","../../../src/utils/markdown/removeMarkdownFormatting.ts","../../../src/conversion/parseCommand.ts","../../../src/conversion/promptTemplatePipelineStringToJson.ts","../../../src/conversion/validatePromptTemplatePipelineJson.ts","../../../src/classes/PromptTemplatePipeline.ts","../../../src/utils/emojis.ts","../../../src/utils/removeEmojis.ts","../../../src/utils/replaceParameters.ts","../../../src/execution/createPtpExecutor.ts","../../../src/classes/PromptTemplatePipelineLibrary.ts","../../../src/execution/plugins/natural-execution-tools/mocked/MockedEchoNaturalExecutionTools.ts","../../../src/execution/plugins/user-interface-execution-tools/callback/CallbackInterfaceTools.ts","../../../src/execution/plugins/user-interface-execution-tools/simple-prompt/SimplePromptInterfaceTools.ts"],"sourcesContent":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null],"names":[],"mappings":";;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAiBA;AACO,IAAI,QAAQ,GAAG,WAAW;AACjC,IAAI,QAAQ,GAAG,MAAM,CAAC,MAAM,IAAI,SAAS,QAAQ,CAAC,CAAC,EAAE;AACrD,QAAQ,KAAK,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE;AAC7D,YAAY,CAAC,GAAG,SAAS,CAAC,CAAC,CAAC,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;;AC1BD;;;;;;;IAOI,oCAAoC,OAAoC;QAApC,YAAO,GAAP,OAAO,CAA6B;KAAI;;;;IAK/D,iDAAY,GAAzB,UAA0B,OAA8C;;;;gBAC9D,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;gBAE7C,IAAI,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE;oBACxB,OAAO,CAAC,IAAI,CACR,SAAS,CACL,UAAC,KAAK,IAAK,OAAA,iDACF,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,oDACrB,KAAK,CAAC,MAAM,IAAI,0BAA0B,CAAC,2BACnD,GAAA,CACJ,CACJ,CAAC;iBACL;gBAED,IAAI,MAAM,KAAK,IAAI,EAAE;oBACjB,MAAM,IAAI,KAAK,CAAC,uBAAuB,CAAC,CAAC;iBAC5C;gBAED,sBAAO,MAAM,EAAC;;;KACjB;IACL,iCAAC;AAAD,CAAC;;;;"}
@@ -0,0 +1,17 @@
1
+ import { PromptTemplatePipeline } from '../classes/PromptTemplatePipeline';
2
+ import { PromptTemplatePipelineLibrary } from '../classes/PromptTemplatePipelineLibrary';
3
+ import { PTP_VERSION } from '../config';
4
+ import { promptTemplatePipelineStringToJson } from '../conversion/promptTemplatePipelineStringToJson';
5
+ import { validatePromptTemplatePipelineJson } from '../conversion/validatePromptTemplatePipelineJson';
6
+ import { createPtpExecutor } from '../execution/createPtpExecutor';
7
+ import { MockedEchoNaturalExecutionTools } from '../execution/plugins/natural-execution-tools/mocked/MockedEchoNaturalExecutionTools';
8
+ import { CallbackInterfaceTools } from '../execution/plugins/user-interface-execution-tools/callback/CallbackInterfaceTools';
9
+ import { CallbackInterfaceToolsOptions } from '../execution/plugins/user-interface-execution-tools/callback/CallbackInterfaceToolsOptions';
10
+ import { SimplePromptInterfaceTools } from '../execution/plugins/user-interface-execution-tools/simple-prompt/SimplePromptInterfaceTools';
11
+ import { ExecutionTypes } from '../types/ExecutionTypes';
12
+ export { ExecutionTypes, PTP_VERSION, PromptTemplatePipeline, PromptTemplatePipelineLibrary };
13
+ export { SimplePromptInterfaceTools };
14
+ export { promptTemplatePipelineStringToJson, validatePromptTemplatePipelineJson };
15
+ export { MockedEchoNaturalExecutionTools };
16
+ export { createPtpExecutor };
17
+ export { CallbackInterfaceTools, CallbackInterfaceToolsOptions };
@@ -0,0 +1,3 @@
1
+ import { JavascriptEvalExecutionTools } from '../execution/plugins/script-execution-tools/javascript/JavascriptEvalExecutionTools';
2
+ import { JavascriptExecutionTools } from '../execution/plugins/script-execution-tools/javascript/JavascriptExecutionTools';
3
+ export { JavascriptEvalExecutionTools, JavascriptExecutionTools };
@@ -0,0 +1,3 @@
1
+ import { OpenAiExecutionTools } from '../execution/plugins/natural-execution-tools/openai/OpenAiExecutionTools';
2
+ import { OpenAiExecutionToolsOptions } from '../execution/plugins/natural-execution-tools/openai/OpenAiExecutionToolsOptions';
3
+ export { OpenAiExecutionTools, OpenAiExecutionToolsOptions };
@@ -0,0 +1,4 @@
1
+ import { RemoteServerOptions } from '../execution/plugins/natural-execution-tools/remote/interfaces/RemoteServerOptions';
2
+ import { RemoteNaturalExecutionTools } from '../execution/plugins/natural-execution-tools/remote/RemoteNaturalExecutionTools';
3
+ import { RemoteNaturalExecutionToolsOptions } from '../execution/plugins/natural-execution-tools/remote/RemoteNaturalExecutionToolsOptions';
4
+ export { RemoteNaturalExecutionTools, RemoteNaturalExecutionToolsOptions, RemoteServerOptions };
@@ -0,0 +1,3 @@
1
+ import { createRemoteServer } from '../execution/plugins/natural-execution-tools/remote/createRemoteServer';
2
+ import { RemoteServerOptions } from '../execution/plugins/natural-execution-tools/remote/interfaces/RemoteServerOptions';
3
+ export { createRemoteServer, RemoteServerOptions };
@@ -0,0 +1,20 @@
1
+ import { CommonExecutionToolsOptions } from '../execution/CommonExecutionToolsOptions';
2
+ import { ExecutionTools } from '../execution/ExecutionTools';
3
+ import { NaturalExecutionTools } from '../execution/NaturalExecutionTools';
4
+ import { PromptChatResult, PromptCommonResult, PromptCompletionResult, PromptResult } from '../execution/PromptResult';
5
+ import { PtpExecutor } from '../execution/PtpExecutor';
6
+ import { ScriptExecutionTools, ScriptExecutionToolsExecuteOptions } from '../execution/ScriptExecutionTools';
7
+ import { UserInterfaceTools, UserInterfaceToolsPromptDialogOptions } from '../execution/UserInterfaceTools';
8
+ import { ExecutionType } from '../types/ExecutionTypes';
9
+ import { ModelRequirements, ModelVariant } from '../types/ModelRequirements';
10
+ import { Parameters } from '../types/Parameters';
11
+ import { Prompt } from '../types/Prompt';
12
+ import { PromptTemplateJson } from '../types/PromptTemplatePipelineJson/PromptTemplateJson';
13
+ import { PromptTemplateParameterJson } from '../types/PromptTemplatePipelineJson/PromptTemplateParameterJson';
14
+ import { PromptTemplatePipelineJson } from '../types/PromptTemplatePipelineJson/PromptTemplatePipelineJson';
15
+ import { PromptTemplatePipelineString } from '../types/PromptTemplatePipelineString';
16
+ import { ScriptLanguage } from '../types/ScriptLanguage';
17
+ import { DoneTaskProgress, PendingTaskProgress, TaskProgress } from '../types/TaskProgress';
18
+ import { string_char_emoji } from '../types/typeAliasEmoji';
19
+ import { ILicense, IPersonProfile, IRepository, number_bytes, number_days, number_gigabytes, number_hours, number_integer, number_kilobytes, number_likeness, number_megabytes, number_miliseconds, number_minutes, number_months, number_negative, number_percent, number_positive, number_seconds, number_terabytes, number_weeks, number_years, string_attribute, string_attribute_value_scope, string_business_category_name, string_char, string_chat_prompt, string_color, string_completion_prompt, string_css, string_css_class, string_css_cursor, string_css_property, string_css_selector, string_css_value, string_data_url, string_domain, string_email, string_file_absolute_path, string_file_extension, string_file_path, string_file_relative_path, string_filename, string_folder_absolute_path, string_folder_path, string_folder_relative_path, string_host, string_hostname, string_href, string_html, string_image_prompt, string_javascript, string_javascript_name, string_license, string_license_token, string_markdown, string_markdown_text, string_midjourney_prompt, string_mime_type, string_mime_type_with_wildcard, string_model_name, string_name, string_page, string_password, string_person_fullname, string_person_profile, string_pgp_key, string_prompt, string_protocol, string_ptp_url, string_ptp_url_with_hashtemplate, string_script, string_sha256, string_ssh_key, string_svg, string_tdl, string_template, string_text_prompt, string_title, string_token, string_translate_language, string_translate_name, string_translate_name_not_normalized, string_uri, string_uri_part, string_uriid, string_url, string_url_image, string_version, string_version_dependency, string_wallpaper_id, string_xml, uuid, uuid_first_segment } from '../types/typeAliases';
20
+ export { CommonExecutionToolsOptions, DoneTaskProgress, ExecutionTools, ExecutionType, ILicense, IPersonProfile, IRepository, ModelRequirements, ModelVariant, NaturalExecutionTools, Parameters, PendingTaskProgress, Prompt, PromptChatResult, PromptCommonResult, PromptCompletionResult, PromptResult, PromptTemplateJson, PromptTemplateParameterJson, PromptTemplatePipelineJson, PromptTemplatePipelineString, PtpExecutor, ScriptExecutionTools, ScriptExecutionToolsExecuteOptions, ScriptLanguage, TaskProgress, UserInterfaceTools, UserInterfaceToolsPromptDialogOptions, number_bytes, number_days, number_gigabytes, number_hours, number_integer, number_kilobytes, number_likeness, number_megabytes, number_miliseconds, number_minutes, number_months, number_negative, number_percent, number_positive, number_seconds, number_terabytes, number_weeks, number_years, string_attribute, string_attribute_value_scope, string_business_category_name, string_char, string_char_emoji, string_chat_prompt, string_color, string_completion_prompt, string_css, string_css_class, string_css_cursor, string_css_property, string_css_selector, string_css_value, string_data_url, string_domain, string_email, string_file_absolute_path, string_file_extension, string_file_path, string_file_relative_path, string_filename, string_folder_absolute_path, string_folder_path, string_folder_relative_path, string_host, string_hostname, string_href, string_html, string_image_prompt, string_javascript, string_javascript_name, string_license, string_license_token, string_markdown, string_markdown_text, string_midjourney_prompt, string_mime_type, string_mime_type_with_wildcard, string_model_name, string_name, string_page, string_password, string_person_fullname, string_person_profile, string_pgp_key, string_prompt, string_protocol, string_ptp_url, string_ptp_url_with_hashtemplate, string_script, string_sha256, string_ssh_key, string_svg, string_tdl, string_template, string_text_prompt, string_title, string_token, string_translate_language, string_translate_name, string_translate_name_not_normalized, string_uri, string_uri_part, string_uriid, string_url, string_url_image, string_version, string_version_dependency, string_wallpaper_id, string_xml, uuid, uuid_first_segment, };
@@ -0,0 +1,6 @@
1
+ import { removeContentComments } from '../utils/markdown/removeContentComments';
2
+ import { removeMarkdownFormatting } from '../utils/markdown/removeMarkdownFormatting';
3
+ import { removeEmojis } from '../utils/removeEmojis';
4
+ import { removeQuotes } from '../utils/removeQuotes';
5
+ import { unwrapResult } from '../utils/unwrapResult';
6
+ export { removeContentComments, removeEmojis, removeMarkdownFormatting, removeQuotes, unwrapResult };
@@ -0,0 +1,2 @@
1
+ import { Wizzard } from '../wizzard/Wizzard';
2
+ export { Wizzard };
@@ -0,0 +1,68 @@
1
+ import { string_name } from '.././types/typeAliases';
2
+ import { PromptTemplateJson } from '../types/PromptTemplatePipelineJson/PromptTemplateJson';
3
+ import { PromptTemplateParameterJson } from '../types/PromptTemplatePipelineJson/PromptTemplateParameterJson';
4
+ import { PromptTemplatePipelineJson } from '../types/PromptTemplatePipelineJson/PromptTemplatePipelineJson';
5
+ import { PromptTemplatePipelineString } from '../types/PromptTemplatePipelineString';
6
+ /**
7
+ * Prompt template pipeline is the **core concept of this library**.
8
+ * It represents a series of prompt templates chained together to form a pipeline / one big prompt template with input and result parameters.
9
+ *
10
+ * It can have 3 formats:
11
+ * - **.ptp.md file** in custom markdown format described above
12
+ * - **JSON** format, parsed from the .ptp.md file
13
+ * - _(this)_ **Object** which is created from JSON format and bound with tools around (but not the execution logic)
14
+ *
15
+ * @see https://github.com/webgptorg/promptbook#prompt-template-pipeline
16
+ */
17
+ export declare class PromptTemplatePipeline {
18
+ readonly ptpUrl: URL | null;
19
+ readonly parameters: Record<string_name, PromptTemplateParameterJson>;
20
+ readonly promptTemplates: Array<PromptTemplateJson>;
21
+ /**
22
+ * Constructs PromptTemplatePipeline from any source
23
+ *
24
+ * Note: During the construction syntax and logic of source is validated
25
+ *
26
+ * @param source content of .ptp.md or .ptp.json file
27
+ * @returns PromptTemplatePipeline
28
+ */
29
+ static fromSource(ptpSource: PromptTemplatePipelineString | PromptTemplatePipelineJson): PromptTemplatePipeline;
30
+ /**
31
+ * Constructs PromptTemplatePipeline from markdown source
32
+ *
33
+ * Note: During the construction syntax and logic of source is validated
34
+ *
35
+ * @param ptpString content of .ptp.md file
36
+ * @returns PromptTemplatePipeline
37
+ */
38
+ static fromString(ptpString: PromptTemplatePipelineString): PromptTemplatePipeline;
39
+ /**
40
+ * Constructs PromptTemplatePipeline from JSON source
41
+ *
42
+ * Note: During the construction the source is logic validated
43
+ *
44
+ * @param ptpjson content of .ptp.json file parsed into JSON
45
+ * @returns PromptTemplatePipeline
46
+ */
47
+ static fromJson(ptpjson: PromptTemplatePipelineJson): PromptTemplatePipeline;
48
+ private constructor();
49
+ /**
50
+ * Returns the first prompt template in the pipeline
51
+ */
52
+ get entryPromptTemplate(): PromptTemplateJson;
53
+ /**
54
+ * Gets the parameter that is the result of given prompt template
55
+ */
56
+ getResultingParameter(promptTemplateName: string_name): PromptTemplateParameterJson;
57
+ /**
58
+ * Gets the following prompt template in the pipeline or null if there is no following prompt template and this is the last one
59
+ */
60
+ getFollowingPromptTemplate(promptTemplateName: string_name): PromptTemplateJson | null;
61
+ }
62
+ /**
63
+ * TODO: !! [👐][🧠] Split of PromptTemplatePipeline,PromptTemplatePipelineLibrary between interface and class
64
+ * TODO: !! [👐] Make parameters and promptTemplates private WHEN split between interface and class
65
+ * TODO: !! Add generic type for entry and result parameters
66
+ * TODO: Can be Array elegantly typed such as it must have at least one element?
67
+ * TODO: [🧠] Each PromptTemplatePipeline should have its unique hash to be able to compare them and execute on server ONLY the desired ones
68
+ */
@@ -0,0 +1,55 @@
1
+ import { string_name } from '.././types/typeAliases';
2
+ import { ExecutionTools } from '../execution/ExecutionTools';
3
+ import { PtpExecutor } from '../execution/PtpExecutor';
4
+ import { Prompt } from '../types/Prompt';
5
+ import { PromptTemplatePipelineJson } from '../types/PromptTemplatePipelineJson/PromptTemplatePipelineJson';
6
+ import { PromptTemplatePipelineString } from '../types/PromptTemplatePipelineString';
7
+ import { PromptTemplatePipeline } from './PromptTemplatePipeline';
8
+ /**
9
+ * Library of prompt template pipelines that groups together prompt template pipelines for an application. This is a very thin wrapper around the Array / Set of prompt template pipelines.
10
+ *
11
+ * Prompt Template Pipeline library is a useful helper in execution, it can be shared between execution and consumer parts of the app and make common knowledge about prompt template pipelines.
12
+ *
13
+ * It allows to create executor functions from prompt template pipelines in the library.
14
+ *
15
+ * @see https://github.com/webgptorg/promptbook#prompt-template-pipeline-library
16
+ */
17
+ export declare class PromptTemplatePipelineLibrary {
18
+ readonly promptTemplatePipelines: Record<string_name, PromptTemplatePipeline>;
19
+ /**
20
+ * Constructs PromptTemplatePipeline from any sources
21
+ *
22
+ * Note: During the construction syntax and logic of all sources are validated
23
+ * Note: You can combine .ptp.md and .ptp.json files BUT it is not recommended
24
+ *
25
+ * @param ptpSources contents of .ptp.md or .ptp.json files
26
+ * @returns PromptTemplatePipelineLibrary
27
+ */
28
+ static fromSources(ptpSources: Record<string_name, PromptTemplatePipelineJson | PromptTemplatePipelineString>): PromptTemplatePipelineLibrary;
29
+ private constructor();
30
+ /**
31
+ * Gets prompt template pipeline by name
32
+ */
33
+ getPtp(name: string_name): PromptTemplatePipeline;
34
+ /**
35
+ * Checks whether prompt is in the library
36
+ */
37
+ isPromptInLibrary(prompt: Prompt): boolean;
38
+ /**
39
+ * Gets executor function for given prompt template pipeline
40
+ */
41
+ createExecutor(name: string_name, tools: ExecutionTools): PtpExecutor;
42
+ }
43
+ /**
44
+ * TODO: !! [👐][🧠] Split of PromptTemplatePipeline,PromptTemplatePipelineLibrary between interface and class
45
+ * TODO: !! [👐] Make promptTemplatePipelines private WHEN split between interface and class
46
+ * TODO: [🧠] Maybe isPromptInLibrary should be separate utility function
47
+ * TODO: [🧠] Maybe createExecutor should be separate utility function
48
+ * TODO: Static method fromDirectory
49
+ * TODO: [🤜] Add generic type for entry and result parameters
50
+ * TODO: [🧠] Is it better to ptpLibrary.executePtp('writeXyz',{...}) OR ptpLibrary.createExecutor('writeXyz')({...}) OR createExecutor(ptpLibrary.getPtp('writeXyz'))
51
+ * TODO: [🧠] Formarly (before commit 62229afce7668a5b85077cc18becf798b583bf8d) there were two classes PromptTemplatePipelineLibrary+PtpLibraryExecutor (maybe it was better?)
52
+ * TODO: [🧠] Is it better to pass tools into getExecutor or into constructor
53
+ * Maybe it is not a good idea to cache executors when they are can be created with different tools
54
+ * TODO: [👧] Strongly type the executors to avoid need of remove nullables whtn noUncheckedIndexedAccess in tsconfig.json
55
+ */
@@ -0,0 +1,10 @@
1
+ import { ModelRequirements } from './types/ModelRequirements';
2
+ import { string_version } from './types/typeAliases';
3
+ /**
4
+ * The version of the PTP
5
+ */
6
+ export declare const PTP_VERSION: string_version;
7
+ /**
8
+ * Default model requirements for the pipeline
9
+ */
10
+ export declare const DEFAULT_MODEL_REQUIREMENTS: ModelRequirements;
@@ -0,0 +1,12 @@
1
+ import { PromptTemplatePipelineJson } from '../types/PromptTemplatePipelineJson/PromptTemplatePipelineJson';
2
+ import { PromptTemplatePipelineString } from '../types/PromptTemplatePipelineString';
3
+ /**
4
+ * Import the text file
5
+ *
6
+ * Note: Using here custom import to work in jest tests
7
+ * Note: Using sync version is 💩 in the production code, but it's ok here in tests
8
+ *
9
+ * @private
10
+ */
11
+ export declare function importPtp(path: `${string}.ptp.md`): PromptTemplatePipelineString;
12
+ export declare function importPtp(path: `${string}.ptp.json`): PromptTemplatePipelineJson;
@@ -0,0 +1,6 @@
1
+ import { string_markdown_text } from '.././types/typeAliases';
2
+ import { Command } from '../types/Command';
3
+ /**
4
+ * Parses one line of ul/ol to command
5
+ */
6
+ export declare function parseCommand(listItem: string_markdown_text): Command;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,12 @@
1
+ import { PromptTemplatePipelineJson } from '../types/PromptTemplatePipelineJson/PromptTemplatePipelineJson';
2
+ import { PromptTemplatePipelineString } from '../types/PromptTemplatePipelineString';
3
+ /**
4
+ * Parse prompt template pipeline from string format to JSON format
5
+ *
6
+ * Note: This function does not validate logic of the pipeline only the syntax
7
+ */
8
+ export declare function promptTemplatePipelineStringToJson(promptTemplatePipelineString: PromptTemplatePipelineString): PromptTemplatePipelineJson;
9
+ /**
10
+ * TODO: Report here line/column of error
11
+ * TODO: Use spaceTrim more effectively
12
+ */
@@ -0,0 +1,26 @@
1
+ import { PromptTemplatePipelineJson } from '../types/PromptTemplatePipelineJson/PromptTemplatePipelineJson';
2
+ /**
3
+ * Validates PromptTemplatePipelineJson if it is logically valid.
4
+ *
5
+ * It checks:
6
+ * - if it has correct parameters dependency
7
+ *
8
+ * It does NOT check:
9
+ * - if it is valid json
10
+ * - if it is meaningful
11
+ *
12
+ * @param ptp valid or invalid PromptTemplatePipelineJson
13
+ * @throws {Error} if invalid
14
+ */
15
+ export declare function validatePromptTemplatePipelineJson(ptp: PromptTemplatePipelineJson): void;
16
+ /**
17
+ * TODO: [🧠] Work with ptpVersion
18
+ * TODO: Use here some json-schema, Zod or something similar and change it to:
19
+ * > /**
20
+ * > * Validates PromptTemplatePipelineJson if it is logically valid.
21
+ * > *
22
+ * > * It checks:
23
+ * > * - it has a valid structure
24
+ * > * - ...
25
+ * > ex port function validatePromptTemplatePipelineJson(ptp: unknown): asserts ptp is PromptTemplatePipelineJson {
26
+ */
@@ -0,0 +1,6 @@
1
+ export interface CommonExecutionToolsOptions {
2
+ /**
3
+ * If true, the internal executions will be logged
4
+ */
5
+ readonly isVerbose?: boolean;
6
+ }
@@ -0,0 +1,25 @@
1
+ import { NaturalExecutionTools } from './NaturalExecutionTools';
2
+ import { ScriptExecutionTools } from './ScriptExecutionTools';
3
+ import { UserInterfaceTools } from './UserInterfaceTools';
4
+ /**
5
+ * All the tools needed to execute prompts (template pipelines).
6
+ *
7
+ * @see https://github.com/webgptorg/promptbook#execution-tools
8
+ */
9
+ export interface ExecutionTools {
10
+ /**
11
+ * Tools for executing prompts to large language models like GPT-4
12
+ */
13
+ natural: NaturalExecutionTools;
14
+ /**
15
+ * Tools for executing scripts
16
+ *
17
+ * Note: You can pass multiple ScriptExecutionTools, they will be tried one by one until one of them supports the script
18
+ * If none of them supports the script, an error is thrown
19
+ */
20
+ script: Array<ScriptExecutionTools>;
21
+ /**
22
+ * Tools for interacting with the user
23
+ */
24
+ userInterface: UserInterfaceTools;
25
+ }
@@ -0,0 +1,22 @@
1
+ import { Prompt } from '../types/Prompt';
2
+ import { PromptChatResult, PromptCompletionResult } from './PromptResult';
3
+ /**
4
+ * Vontainer for all the tools needed to execute prompts to large language models like GPT-4
5
+ * On its interface it exposes common methods for prompt execution.
6
+ * Inside (in constructor) it calls OpenAI, Azure, GPU, proxy, cache, logging,...
7
+ *
8
+ * @see https://github.com/webgptorg/promptbook#natural-execution-tools
9
+ */
10
+ export interface NaturalExecutionTools {
11
+ /**
12
+ * Use a chat model
13
+ */
14
+ gptChat(prompt: Prompt): Promise<PromptChatResult>;
15
+ /**
16
+ * Use a completion model
17
+ */
18
+ gptComplete(prompt: Prompt): Promise<PromptCompletionResult>;
19
+ }
20
+ /**
21
+ * TODO: [🧠] Should or should not there be a word "GPT" in both gptComplete and gptChat
22
+ */
@@ -0,0 +1,38 @@
1
+ import { string_model_name } from '.././types/typeAliases';
2
+ /**
3
+ * Prompt result is the simplest concept of execution.
4
+ * It is the result of executing one prompt _(NOT a template)_.
5
+ *
6
+ * @see https://github.com/webgptorg/promptbook#prompt-result
7
+ */
8
+ export type PromptResult = PromptCompletionResult | PromptChatResult;
9
+ /**
10
+ * Prompt completion result
11
+ * It contains only the following text NOT the whole completion
12
+ */
13
+ export type PromptCompletionResult = PromptCommonResult;
14
+ /**
15
+ * Prompt chat result
16
+ */
17
+ export interface PromptChatResult extends PromptCommonResult {
18
+ }
19
+ export interface PromptCommonResult {
20
+ /**
21
+ * Exact text response from the model
22
+ */
23
+ readonly content: string;
24
+ /**
25
+ * Name of the model used to generate the response
26
+ */
27
+ readonly model: string_model_name;
28
+ /**
29
+ * Raw response from the model
30
+ */
31
+ readonly rawResponse: object;
32
+ }
33
+ /**
34
+ * TODO: [🧠] Should here be link to the prompt?
35
+ * TODO: [🧠] Maybe type raw properly - not onject but OpenAI.result.whatever
36
+ * TODO: [🧠] Maybe remove redundant raw.choices.text
37
+ * TODO: Log raw even if prompt failed - log the raw error
38
+ */
@@ -0,0 +1,19 @@
1
+ import { Promisable } from 'type-fest';
2
+ import { string_name } from '.././types/typeAliases';
3
+ import { TaskProgress } from '../types/TaskProgress';
4
+ /**
5
+ * Executor is a simple async function that takes input parameters and returns result parameters _(along with all intermediate parameters and input parameters = it extends input object)_.
6
+ * Executor is made by combining execution tools and prompt template pipeline library.
7
+ *
8
+ * It can be done in two ways:
9
+ * - From `PromptTemplatePipelineLibrary.getExecutor` method
10
+ * - `createPtpExecutor` utility function
11
+ *
12
+ * @see https://github.com/webgptorg/promptbook#executor
13
+ */
14
+ export interface PtpExecutor {
15
+ (inputParameters: Record<string_name, string>, onProgress: (taskProgress: TaskProgress) => Promisable<void>): Promise<Record<string_name, string>>;
16
+ }
17
+ /**
18
+ * TODO: [🧠] Should this file be in /execution or /types folder?
19
+ */
@@ -0,0 +1,34 @@
1
+ import { string_name, string_script } from '.././types/typeAliases';
2
+ import { ScriptLanguage } from '../types/ScriptLanguage';
3
+ /**
4
+ * Represents all the tools needed to execute scripts
5
+ *
6
+ * @see https://github.com/webgptorg/promptbook#script-execution-tools
7
+ */
8
+ export interface ScriptExecutionTools {
9
+ execute(options: ScriptExecutionToolsExecuteOptions): Promise<string>;
10
+ }
11
+ /**
12
+ * Input for the script execution
13
+ */
14
+ export interface ScriptExecutionToolsExecuteOptions {
15
+ /**
16
+ * Language of the script
17
+ */
18
+ scriptLanguage: ScriptLanguage;
19
+ /**
20
+ * Parameters for the script
21
+ * Theese parameters are passed to the script as variables
22
+ * For example: { "name": "John" } => const name = "John";
23
+ */
24
+ parameters: Record<string_name, string>;
25
+ /**
26
+ * The content of the script to execute
27
+ * - It can be a single statement
28
+ * - It can be multiple statements separated by semicolon and return
29
+ * - It can be a function (but you need to call it)
30
+ * - It can be IIFE (immediately invoked function expression)
31
+ * - It can use the parameters as variables and functions from global scope
32
+ */
33
+ script: string_script;
34
+ }
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Represents all the tools needed to interact with the user.
3
+ *
4
+ * @see https://github.com/webgptorg/promptbook#user-interface-tools
5
+ */
6
+ export interface UserInterfaceTools {
7
+ /**
8
+ * Asks the user to answer a free-text (multiline) question
9
+ *
10
+ * @param options the question to ask
11
+ * @returns the answer from the user
12
+ */
13
+ promptDialog(options: UserInterfaceToolsPromptDialogOptions): Promise<string>;
14
+ }
15
+ export interface UserInterfaceToolsPromptDialogOptions {
16
+ /**
17
+ * Prompt message
18
+ *
19
+ * Note: This is not a prompt to language model but a prompt to the user
20
+ */
21
+ prompt: string;
22
+ /**
23
+ * Default value for the input/textarea
24
+ */
25
+ defaultValue: string | null;
26
+ /**
27
+ * Placeholder for the input/textarea
28
+ */
29
+ placeholder?: string;
30
+ }
@@ -0,0 +1,18 @@
1
+ import { PromptTemplatePipeline } from '../classes/PromptTemplatePipeline';
2
+ import { ExecutionTools } from './ExecutionTools';
3
+ import { PtpExecutor } from './PtpExecutor';
4
+ interface CreatePtpExecutorOptions {
5
+ readonly ptp: PromptTemplatePipeline;
6
+ readonly tools: ExecutionTools;
7
+ }
8
+ /**
9
+ * Creates executor function from prompt template pipeline and execution tools.
10
+ *
11
+ * Note: Consider using getExecutor method of the library instead of using this function
12
+ */
13
+ export declare function createPtpExecutor(options: CreatePtpExecutorOptions): PtpExecutor;
14
+ export {};
15
+ /**
16
+ * TODO: [👧] Strongly type the executors to avoid need of remove nullables whtn noUncheckedIndexedAccess in tsconfig.json
17
+ * Note: CreatePtpExecutorOptions are just connected to PtpExecutor so do not extract to types folder
18
+ */
@@ -0,0 +1,22 @@
1
+ import { Prompt } from '../../../../types/Prompt';
2
+ import { CommonExecutionToolsOptions } from '../../../CommonExecutionToolsOptions';
3
+ import { NaturalExecutionTools } from '../../../NaturalExecutionTools';
4
+ import { PromptChatResult, PromptCompletionResult } from '../../../PromptResult';
5
+ /**
6
+ * Mocked execution Tools for just echoing the requests for testing purposes.
7
+ */
8
+ export declare class MockedEchoNaturalExecutionTools implements NaturalExecutionTools {
9
+ private readonly options;
10
+ constructor(options: CommonExecutionToolsOptions);
11
+ /**
12
+ * Mocks chat model
13
+ */
14
+ gptChat(prompt: Prompt): Promise<PromptChatResult>;
15
+ /**
16
+ * Mocks completion model
17
+ */
18
+ gptComplete(prompt: Prompt): Promise<PromptCompletionResult>;
19
+ }
20
+ /**
21
+ * TODO: Allow in spaceTrim: nesting with > ${block(prompt.request)}
22
+ */