@promptbook/types 0.59.0 → 0.60.0-3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (206) hide show
  1. package/README.md +5 -5
  2. package/esm/index.es.js +1 -1
  3. package/esm/index.es.js.map +1 -1
  4. package/esm/typings/src/_packages/core.index.d.ts +23 -23
  5. package/esm/typings/src/_packages/node.index.d.ts +2 -2
  6. package/esm/typings/src/_packages/types.index.d.ts +11 -11
  7. package/esm/typings/src/_packages/utils.index.d.ts +9 -11
  8. package/esm/typings/src/config.d.ts +1 -1
  9. package/esm/typings/src/conversion/pipelineJsonToString.d.ts +12 -0
  10. package/esm/typings/src/conversion/pipelineStringToJson.d.ts +32 -0
  11. package/esm/typings/src/conversion/pipelineStringToJsonSync.d.ts +23 -0
  12. package/esm/typings/src/conversion/prettify/PrettifyOptions.d.ts +1 -1
  13. package/{umd/typings/src/conversion/prettify/prettifyPromptbookString.d.ts → esm/typings/src/conversion/prettify/prettifyPipelineString.d.ts} +2 -2
  14. package/esm/typings/src/conversion/prettify/{renderPromptbookMermaid.d.ts → renderPipelineMermaidOptions.d.ts} +4 -4
  15. package/esm/typings/src/conversion/utils/extractParametersFromPromptTemplate.d.ts +2 -2
  16. package/esm/typings/src/conversion/utils/extractVariables.d.ts +1 -1
  17. package/esm/typings/src/conversion/utils/parseCommand.d.ts +2 -2
  18. package/esm/typings/src/conversion/utils/parseNumber.d.ts +1 -1
  19. package/esm/typings/src/conversion/utils/renameParameter.d.ts +4 -4
  20. package/esm/typings/src/conversion/validation/_importPipeline.d.ts +13 -0
  21. package/esm/typings/src/conversion/validation/validatePipeline.d.ts +27 -0
  22. package/{umd/typings/src/errors/PromptbookLibraryError.d.ts → esm/typings/src/errors/CollectionError.d.ts} +2 -2
  23. package/esm/typings/src/errors/{PromptbookExecutionError.d.ts → ExecutionError.d.ts} +2 -2
  24. package/{umd/typings/src/errors/PromptbookNotFoundError.d.ts → esm/typings/src/errors/NotFoundError.d.ts} +2 -2
  25. package/{umd/typings/src/errors/PromptbookLogicError.d.ts → esm/typings/src/errors/PipelineLogicError.d.ts} +2 -2
  26. package/{umd/typings/src/errors/PromptbookReferenceError.d.ts → esm/typings/src/errors/ReferenceError.d.ts} +2 -2
  27. package/esm/typings/src/errors/{PromptbookSyntaxError.d.ts → SyntaxError.d.ts} +2 -2
  28. package/esm/typings/src/errors/TemplateError.d.ts +1 -1
  29. package/esm/typings/src/errors/_ExpectError.d.ts +2 -2
  30. package/esm/typings/src/execution/ExecutionTools.d.ts +1 -1
  31. package/esm/typings/src/execution/LlmExecutionTools.d.ts +4 -4
  32. package/esm/typings/src/execution/PromptResult.d.ts +1 -1
  33. package/esm/typings/src/execution/assertsExecutionSuccessful.d.ts +1 -1
  34. package/esm/typings/src/execution/createPromptbookExecutor.d.ts +3 -3
  35. package/esm/typings/src/execution/translation/automatic-translate/automatic-translators/utils/extractMultiplicatedOccurrence.d.ts +1 -1
  36. package/esm/typings/src/execution/utils/checkExpectations.d.ts +1 -1
  37. package/esm/typings/src/knowledge/prepare-knowledge/markdown/prepareKnowledgeFromMarkdown.d.ts +1 -1
  38. package/esm/typings/src/knowledge/prepare-knowledge/pdf/prepareKnowledgeFromPdf.d.ts +1 -1
  39. package/esm/typings/src/library/PipelineCollection.d.ts +25 -0
  40. package/esm/typings/src/library/{SimplePromptbookLibrary.d.ts → SimplePipelineCollection.d.ts} +11 -11
  41. package/{umd/typings/src/library/constructors/createLibraryFromDirectory.d.ts → esm/typings/src/library/constructors/createCollectionFromDirectory.d.ts} +5 -5
  42. package/esm/typings/src/library/constructors/createCollectionFromJson.d.ts +12 -0
  43. package/esm/typings/src/library/constructors/createCollectionFromPromise.d.ts +22 -0
  44. package/esm/typings/src/library/constructors/{createLibraryFromUrl.d.ts → createCollectionFromUrl.d.ts} +5 -5
  45. package/esm/typings/src/library/constructors/createSubcollection.d.ts +12 -0
  46. package/esm/typings/src/library/libraryToJson.d.ts +5 -5
  47. package/esm/typings/src/llm-providers/anthropic-claude/AnthropicClaudeExecutionTools.d.ts +3 -3
  48. package/esm/typings/src/llm-providers/azure-openai/AzureOpenAiExecutionTools.d.ts +3 -3
  49. package/esm/typings/src/llm-providers/mocked/MockedEchoLlmExecutionTools.d.ts +2 -2
  50. package/esm/typings/src/llm-providers/mocked/MockedFackedLlmExecutionTools.d.ts +3 -3
  51. package/esm/typings/src/llm-providers/mocked/fakeTextToExpectations.d.ts +1 -1
  52. package/esm/typings/src/llm-providers/multiple/MultipleLlmExecutionTools.d.ts +3 -3
  53. package/esm/typings/src/llm-providers/openai/OpenAiExecutionTools.d.ts +3 -3
  54. package/esm/typings/src/llm-providers/openai/computeOpenaiUsage.d.ts +1 -1
  55. package/esm/typings/src/llm-providers/openai/computeUsage.d.ts +2 -2
  56. package/esm/typings/src/llm-providers/remote/RemoteLlmExecutionTools.d.ts +3 -3
  57. package/esm/typings/src/llm-providers/remote/interfaces/RemoteServerOptions.d.ts +2 -2
  58. package/esm/typings/src/llm-providers/remote/startRemoteServer.d.ts +1 -1
  59. package/esm/typings/src/types/Command.d.ts +4 -4
  60. package/esm/typings/src/types/Parameters.d.ts +1 -1
  61. package/esm/typings/src/types/{PromptbookJson/PromptbookJson.d.ts → PipelineJson/PipelineJson.d.ts} +4 -4
  62. package/{umd/typings/src/types/PromptbookString.d.ts → esm/typings/src/types/PipelineString.d.ts} +3 -3
  63. package/esm/typings/src/types/Prompt.d.ts +3 -3
  64. package/esm/typings/src/types/execution-report/ExecutionReportJson.d.ts +2 -2
  65. package/esm/typings/src/types/execution-report/countWorkingDuration.d.ts +1 -1
  66. package/esm/typings/src/types/typeAliases.d.ts +2 -2
  67. package/esm/typings/src/utils/emojis.d.ts +2 -2
  68. package/esm/typings/src/utils/expectation-counters/countCharacters.d.ts +1 -1
  69. package/esm/typings/src/utils/expectation-counters/countLines.d.ts +1 -1
  70. package/esm/typings/src/utils/expectation-counters/countPages.d.ts +1 -1
  71. package/esm/typings/src/utils/expectation-counters/countParagraphs.d.ts +1 -1
  72. package/esm/typings/src/utils/expectation-counters/countSentences.d.ts +1 -1
  73. package/esm/typings/src/utils/expectation-counters/countWords.d.ts +1 -1
  74. package/esm/typings/src/utils/expectation-counters/index.d.ts +2 -2
  75. package/esm/typings/src/utils/formatNumber.d.ts +1 -1
  76. package/esm/typings/src/utils/markdown/addAutoGeneratedSection.d.ts +1 -1
  77. package/esm/typings/src/utils/markdown/createMarkdownChart.d.ts +1 -1
  78. package/esm/typings/src/utils/markdown/createMarkdownTable.d.ts +1 -1
  79. package/esm/typings/src/utils/markdown-json/MarkdownStructure.d.ts +1 -1
  80. package/esm/typings/src/utils/markdown-json/countMarkdownStructureDeepness.d.ts +1 -1
  81. package/esm/typings/src/utils/markdown-json/markdownToMarkdownStructure.d.ts +1 -1
  82. package/package.json +3 -3
  83. package/umd/index.umd.js +1 -1
  84. package/umd/index.umd.js.map +1 -1
  85. package/umd/typings/src/_packages/core.index.d.ts +23 -23
  86. package/umd/typings/src/_packages/node.index.d.ts +2 -2
  87. package/umd/typings/src/_packages/types.index.d.ts +11 -11
  88. package/umd/typings/src/_packages/utils.index.d.ts +9 -11
  89. package/umd/typings/src/config.d.ts +1 -1
  90. package/umd/typings/src/conversion/pipelineJsonToString.d.ts +12 -0
  91. package/umd/typings/src/conversion/pipelineStringToJson.d.ts +32 -0
  92. package/umd/typings/src/conversion/pipelineStringToJsonSync.d.ts +23 -0
  93. package/umd/typings/src/conversion/prettify/PrettifyOptions.d.ts +1 -1
  94. package/{esm/typings/src/conversion/prettify/prettifyPromptbookString.d.ts → umd/typings/src/conversion/prettify/prettifyPipelineString.d.ts} +2 -2
  95. package/umd/typings/src/conversion/prettify/{renderPromptbookMermaid.d.ts → renderPipelineMermaidOptions.d.ts} +4 -4
  96. package/umd/typings/src/conversion/utils/extractParametersFromPromptTemplate.d.ts +2 -2
  97. package/umd/typings/src/conversion/utils/extractVariables.d.ts +1 -1
  98. package/umd/typings/src/conversion/utils/parseCommand.d.ts +2 -2
  99. package/umd/typings/src/conversion/utils/parseNumber.d.ts +1 -1
  100. package/umd/typings/src/conversion/utils/renameParameter.d.ts +4 -4
  101. package/umd/typings/src/conversion/validation/_importPipeline.d.ts +13 -0
  102. package/umd/typings/src/conversion/validation/validatePipeline.d.ts +27 -0
  103. package/{esm/typings/src/errors/PromptbookLibraryError.d.ts → umd/typings/src/errors/CollectionError.d.ts} +2 -2
  104. package/umd/typings/src/errors/{PromptbookExecutionError.d.ts → ExecutionError.d.ts} +2 -2
  105. package/{esm/typings/src/errors/PromptbookNotFoundError.d.ts → umd/typings/src/errors/NotFoundError.d.ts} +2 -2
  106. package/{esm/typings/src/errors/PromptbookLogicError.d.ts → umd/typings/src/errors/PipelineLogicError.d.ts} +2 -2
  107. package/{esm/typings/src/errors/PromptbookReferenceError.d.ts → umd/typings/src/errors/ReferenceError.d.ts} +2 -2
  108. package/umd/typings/src/errors/{PromptbookSyntaxError.d.ts → SyntaxError.d.ts} +2 -2
  109. package/umd/typings/src/errors/TemplateError.d.ts +1 -1
  110. package/umd/typings/src/errors/_ExpectError.d.ts +2 -2
  111. package/umd/typings/src/execution/ExecutionTools.d.ts +1 -1
  112. package/umd/typings/src/execution/LlmExecutionTools.d.ts +4 -4
  113. package/umd/typings/src/execution/PromptResult.d.ts +1 -1
  114. package/umd/typings/src/execution/assertsExecutionSuccessful.d.ts +1 -1
  115. package/umd/typings/src/execution/createPromptbookExecutor.d.ts +3 -3
  116. package/umd/typings/src/execution/translation/automatic-translate/automatic-translators/utils/extractMultiplicatedOccurrence.d.ts +1 -1
  117. package/umd/typings/src/execution/utils/checkExpectations.d.ts +1 -1
  118. package/umd/typings/src/knowledge/prepare-knowledge/markdown/prepareKnowledgeFromMarkdown.d.ts +1 -1
  119. package/umd/typings/src/knowledge/prepare-knowledge/pdf/prepareKnowledgeFromPdf.d.ts +1 -1
  120. package/umd/typings/src/library/PipelineCollection.d.ts +25 -0
  121. package/umd/typings/src/library/{SimplePromptbookLibrary.d.ts → SimplePipelineCollection.d.ts} +11 -11
  122. package/{esm/typings/src/library/constructors/createLibraryFromDirectory.d.ts → umd/typings/src/library/constructors/createCollectionFromDirectory.d.ts} +5 -5
  123. package/umd/typings/src/library/constructors/createCollectionFromJson.d.ts +12 -0
  124. package/umd/typings/src/library/constructors/createCollectionFromPromise.d.ts +22 -0
  125. package/umd/typings/src/library/constructors/{createLibraryFromUrl.d.ts → createCollectionFromUrl.d.ts} +5 -5
  126. package/umd/typings/src/library/constructors/createSubcollection.d.ts +12 -0
  127. package/umd/typings/src/library/libraryToJson.d.ts +5 -5
  128. package/umd/typings/src/llm-providers/anthropic-claude/AnthropicClaudeExecutionTools.d.ts +3 -3
  129. package/umd/typings/src/llm-providers/azure-openai/AzureOpenAiExecutionTools.d.ts +3 -3
  130. package/umd/typings/src/llm-providers/mocked/MockedEchoLlmExecutionTools.d.ts +2 -2
  131. package/umd/typings/src/llm-providers/mocked/MockedFackedLlmExecutionTools.d.ts +3 -3
  132. package/umd/typings/src/llm-providers/mocked/fakeTextToExpectations.d.ts +1 -1
  133. package/umd/typings/src/llm-providers/multiple/MultipleLlmExecutionTools.d.ts +3 -3
  134. package/umd/typings/src/llm-providers/openai/OpenAiExecutionTools.d.ts +3 -3
  135. package/umd/typings/src/llm-providers/openai/computeOpenaiUsage.d.ts +1 -1
  136. package/umd/typings/src/llm-providers/openai/computeUsage.d.ts +2 -2
  137. package/umd/typings/src/llm-providers/remote/RemoteLlmExecutionTools.d.ts +3 -3
  138. package/umd/typings/src/llm-providers/remote/interfaces/RemoteServerOptions.d.ts +2 -2
  139. package/umd/typings/src/llm-providers/remote/startRemoteServer.d.ts +1 -1
  140. package/umd/typings/src/types/Command.d.ts +4 -4
  141. package/umd/typings/src/types/Parameters.d.ts +1 -1
  142. package/umd/typings/src/types/{PromptbookJson/PromptbookJson.d.ts → PipelineJson/PipelineJson.d.ts} +4 -4
  143. package/{esm/typings/src/types/PromptbookString.d.ts → umd/typings/src/types/PipelineString.d.ts} +3 -3
  144. package/umd/typings/src/types/Prompt.d.ts +3 -3
  145. package/umd/typings/src/types/execution-report/ExecutionReportJson.d.ts +2 -2
  146. package/umd/typings/src/types/execution-report/countWorkingDuration.d.ts +1 -1
  147. package/umd/typings/src/types/typeAliases.d.ts +2 -2
  148. package/umd/typings/src/utils/emojis.d.ts +2 -2
  149. package/umd/typings/src/utils/expectation-counters/countCharacters.d.ts +1 -1
  150. package/umd/typings/src/utils/expectation-counters/countLines.d.ts +1 -1
  151. package/umd/typings/src/utils/expectation-counters/countPages.d.ts +1 -1
  152. package/umd/typings/src/utils/expectation-counters/countParagraphs.d.ts +1 -1
  153. package/umd/typings/src/utils/expectation-counters/countSentences.d.ts +1 -1
  154. package/umd/typings/src/utils/expectation-counters/countWords.d.ts +1 -1
  155. package/umd/typings/src/utils/expectation-counters/index.d.ts +2 -2
  156. package/umd/typings/src/utils/formatNumber.d.ts +1 -1
  157. package/umd/typings/src/utils/markdown/addAutoGeneratedSection.d.ts +1 -1
  158. package/umd/typings/src/utils/markdown/createMarkdownChart.d.ts +1 -1
  159. package/umd/typings/src/utils/markdown/createMarkdownTable.d.ts +1 -1
  160. package/umd/typings/src/utils/markdown-json/MarkdownStructure.d.ts +1 -1
  161. package/umd/typings/src/utils/markdown-json/countMarkdownStructureDeepness.d.ts +1 -1
  162. package/umd/typings/src/utils/markdown-json/markdownToMarkdownStructure.d.ts +1 -1
  163. package/esm/typings/src/conversion/promptbookJsonToString.d.ts +0 -12
  164. package/esm/typings/src/conversion/promptbookStringToJson.d.ts +0 -32
  165. package/esm/typings/src/conversion/promptbookStringToJsonSync.d.ts +0 -23
  166. package/esm/typings/src/conversion/validation/_importPromptbook.d.ts +0 -13
  167. package/esm/typings/src/conversion/validation/validatePromptbook.d.ts +0 -27
  168. package/esm/typings/src/library/PromptbookLibrary.d.ts +0 -25
  169. package/esm/typings/src/library/constructors/createLibraryFromJson.d.ts +0 -12
  170. package/esm/typings/src/library/constructors/createLibraryFromPromise.d.ts +0 -22
  171. package/esm/typings/src/library/constructors/createSublibrary.d.ts +0 -12
  172. package/umd/typings/src/conversion/promptbookJsonToString.d.ts +0 -12
  173. package/umd/typings/src/conversion/promptbookStringToJson.d.ts +0 -32
  174. package/umd/typings/src/conversion/promptbookStringToJsonSync.d.ts +0 -23
  175. package/umd/typings/src/conversion/validation/_importPromptbook.d.ts +0 -13
  176. package/umd/typings/src/conversion/validation/validatePromptbook.d.ts +0 -27
  177. package/umd/typings/src/library/PromptbookLibrary.d.ts +0 -25
  178. package/umd/typings/src/library/constructors/createLibraryFromJson.d.ts +0 -12
  179. package/umd/typings/src/library/constructors/createLibraryFromPromise.d.ts +0 -22
  180. package/umd/typings/src/library/constructors/createSublibrary.d.ts +0 -12
  181. /package/esm/typings/{promptbook-library → promptbook-collection}/index.d.ts +0 -0
  182. /package/esm/typings/src/conversion/{promptbookStringToJson.test.d.ts → pipelineStringToJson.test.d.ts} +0 -0
  183. /package/esm/typings/src/conversion/{promptbookStringToJsonSync.test.d.ts → pipelineStringToJsonSync.test.d.ts} +0 -0
  184. /package/esm/typings/src/conversion/validation/{promptbookStringToJson-syntaxErrors.test.d.ts → pipelineStringToJson-syntaxErrors.test.d.ts} +0 -0
  185. /package/esm/typings/src/conversion/validation/{validatePromptbook-logicErrors.test.d.ts → validatePipeline-logicErrors.test.d.ts} +0 -0
  186. /package/esm/typings/src/conversion/validation/{validatePromptbook.test.d.ts → validatePipeline.test.d.ts} +0 -0
  187. /package/esm/typings/src/library/constructors/{createLibraryFromDirectory.test.d.ts → createCollectionFromDirectory.test.d.ts} +0 -0
  188. /package/esm/typings/src/library/constructors/{createLibraryFromJson.test.d.ts → createCollectionFromJson.test.d.ts} +0 -0
  189. /package/esm/typings/src/library/constructors/{createLibraryFromPromise.test.d.ts → createCollectionFromPromise.test.d.ts} +0 -0
  190. /package/esm/typings/src/types/{PromptbookJson → PipelineJson}/KnowledgeJson.d.ts +0 -0
  191. /package/esm/typings/src/types/{PromptbookJson → PipelineJson}/MaterialKnowledgePieceJson.d.ts +0 -0
  192. /package/esm/typings/src/types/{PromptbookJson → PipelineJson}/PromptTemplateJson.d.ts +0 -0
  193. /package/esm/typings/src/types/{PromptbookJson → PipelineJson}/PromptTemplateParameterJson.d.ts +0 -0
  194. /package/umd/typings/{promptbook-library → promptbook-collection}/index.d.ts +0 -0
  195. /package/umd/typings/src/conversion/{promptbookStringToJson.test.d.ts → pipelineStringToJson.test.d.ts} +0 -0
  196. /package/umd/typings/src/conversion/{promptbookStringToJsonSync.test.d.ts → pipelineStringToJsonSync.test.d.ts} +0 -0
  197. /package/umd/typings/src/conversion/validation/{promptbookStringToJson-syntaxErrors.test.d.ts → pipelineStringToJson-syntaxErrors.test.d.ts} +0 -0
  198. /package/umd/typings/src/conversion/validation/{validatePromptbook-logicErrors.test.d.ts → validatePipeline-logicErrors.test.d.ts} +0 -0
  199. /package/umd/typings/src/conversion/validation/{validatePromptbook.test.d.ts → validatePipeline.test.d.ts} +0 -0
  200. /package/umd/typings/src/library/constructors/{createLibraryFromDirectory.test.d.ts → createCollectionFromDirectory.test.d.ts} +0 -0
  201. /package/umd/typings/src/library/constructors/{createLibraryFromJson.test.d.ts → createCollectionFromJson.test.d.ts} +0 -0
  202. /package/umd/typings/src/library/constructors/{createLibraryFromPromise.test.d.ts → createCollectionFromPromise.test.d.ts} +0 -0
  203. /package/umd/typings/src/types/{PromptbookJson → PipelineJson}/KnowledgeJson.d.ts +0 -0
  204. /package/umd/typings/src/types/{PromptbookJson → PipelineJson}/MaterialKnowledgePieceJson.d.ts +0 -0
  205. /package/umd/typings/src/types/{PromptbookJson → PipelineJson}/PromptTemplateJson.d.ts +0 -0
  206. /package/umd/typings/src/types/{PromptbookJson → PipelineJson}/PromptTemplateParameterJson.d.ts +0 -0
@@ -1,10 +1,10 @@
1
+ import type { ExecutionType } from './ExecutionTypes';
2
+ import type { ModelRequirements } from './ModelRequirements';
3
+ import type { ExpectationAmount } from './PipelineJson/PromptTemplateJson';
4
+ import type { ExpectationUnit } from './PipelineJson/PromptTemplateJson';
1
5
  import type { string_markdown_text } from './typeAliases';
2
6
  import type { string_name } from './typeAliases';
3
7
  import type { string_version } from './typeAliases';
4
- import type { ExecutionType } from './ExecutionTypes';
5
- import type { ModelRequirements } from './ModelRequirements';
6
- import type { ExpectationAmount } from './PromptbookJson/PromptTemplateJson';
7
- import type { ExpectationUnit } from './PromptbookJson/PromptTemplateJson';
8
8
  /**
9
9
  * Command is one piece of the prompt template which adds some logic to the prompt template or the whole pipeline.
10
10
  * It is parsed from the markdown from ul/ol items - one command per one item.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Parameters of the prompt template (pipeline)
2
+ * Parameters of the pipeline
3
3
  *
4
4
  * There are three types of parameters:
5
5
  * - **INPUT PARAMETERs** are required to execute the pipeline.
@@ -1,5 +1,5 @@
1
1
  import type { string_markdown_text } from '../typeAliases';
2
- import type { string_promptbook_url } from '../typeAliases';
2
+ import type { string_pipeline_url } from '../typeAliases';
3
3
  import type { string_version } from '../typeAliases';
4
4
  import type { KnowledgeJson } from './KnowledgeJson';
5
5
  import type { PromptTemplateJson } from './PromptTemplateJson';
@@ -8,9 +8,9 @@ import type { PromptTemplateParameterJson } from './PromptTemplateParameterJson'
8
8
  * Promptbook is the **core concept of this library**.
9
9
  * It represents a series of prompt templates chained together to form a pipeline / one big prompt template with input and result parameters.
10
10
  *
11
- * @see https://github.com/webgptorg/promptbook#promptbook
11
+ * @see !!! https://github.com/webgptorg/promptbook#promptbook
12
12
  */
13
- export type PromptbookJson = {
13
+ export type PipelineJson = {
14
14
  /**
15
15
  * Unique identifier of the promptbook
16
16
  *
@@ -20,7 +20,7 @@ export type PromptbookJson = {
20
20
  * For example: https://promptbook.webgpt.com/cs/write-website-content.ptbk.md@1.0.0
21
21
  * Warning: Do not hash part of the URL, hash part is used for identification of the prompt template in the pipeline
22
22
  */
23
- readonly promptbookUrl?: string_promptbook_url;
23
+ readonly promptbookUrl?: string_pipeline_url;
24
24
  /**
25
25
  * Title of the promptbook
26
26
  * -It can use simple markdown formatting like **bold**, *italic*, [link](https://example.com), ... BUT not code blocks and structure
@@ -2,11 +2,11 @@
2
2
  * Promptbook is the **core concept of this library**.
3
3
  * It represents a series of prompt templates chained together to form a pipeline / one big prompt template with input and result parameters.
4
4
  *
5
- * @see https://github.com/webgptorg/promptbook#promptbook
5
+ * @see !!! https://github.com/webgptorg/promptbook#promptbook
6
6
  */
7
- export type PromptbookString = string & {
7
+ export type PipelineString = string & {
8
8
  readonly _type: 'Promptbook';
9
9
  };
10
10
  /**
11
- * TODO: !! Better validation (validatePromptbookString) or remove branded type and make it just string
11
+ * TODO: !! Better validation (validatePipelineString) or remove branded type and make it just string
12
12
  */
@@ -1,10 +1,10 @@
1
1
  import type { PostprocessingFunction } from '../scripting/javascript/JavascriptExecutionToolsOptions';
2
2
  import type { ExpectFormatCommand } from './Command';
3
3
  import type { ModelRequirements } from './ModelRequirements';
4
- import type { Expectations } from './PromptbookJson/PromptTemplateJson';
4
+ import type { Expectations } from './PipelineJson/PromptTemplateJson';
5
5
  import type { string_name } from './typeAliases';
6
+ import type { string_pipeline_url_with_hashtemplate } from './typeAliases';
6
7
  import type { string_prompt } from './typeAliases';
7
- import type { string_promptbook_url_with_hashtemplate } from './typeAliases';
8
8
  import type { string_title } from './typeAliases';
9
9
  /**
10
10
  * Prompt in a text along with model requirements, but without any execution or templating logic.
@@ -52,7 +52,7 @@ export type Prompt = {
52
52
  *
53
53
  * @example https://promptbook.webgpt.com/cs/write-website-content.ptbk.md#keywords
54
54
  */
55
- readonly promptbookUrl: string_promptbook_url_with_hashtemplate;
55
+ readonly promptbookUrl: string_pipeline_url_with_hashtemplate;
56
56
  /**
57
57
  * Parameters used in the prompt
58
58
  *
@@ -1,7 +1,7 @@
1
1
  import type { PromptResult } from '../../execution/PromptResult';
2
2
  import type { Prompt } from '../Prompt';
3
3
  import type { string_markdown_text } from '../typeAliases';
4
- import type { string_promptbook_url } from '../typeAliases';
4
+ import type { string_pipeline_url } from '../typeAliases';
5
5
  import type { string_version } from '../typeAliases';
6
6
  /**
7
7
  * ExecutionReport is result of executing one promptbook
@@ -17,7 +17,7 @@ export type ExecutionReportJson = {
17
17
  /**
18
18
  * Unique identifier of the promptbook from promptbook which was executed
19
19
  */
20
- readonly promptbookUrl?: string_promptbook_url;
20
+ readonly promptbookUrl?: string_pipeline_url;
21
21
  /**
22
22
  * Title of from promptbook which was executed
23
23
  */
@@ -2,6 +2,6 @@ import type { FromtoItems } from '../../utils/FromtoItems';
2
2
  /**
3
3
  * Count the duration of working time
4
4
  *
5
- * @private within the library
5
+ * @private within the package
6
6
  */
7
7
  export declare function countWorkingDuration(items: FromtoItems): number;
@@ -181,13 +181,13 @@ export type string_url = string;
181
181
  *
182
182
  * For example `"https://promptbook.webgpt.com/cs/write-website-content.ptbk.md"`
183
183
  */
184
- export type string_promptbook_url = string;
184
+ export type string_pipeline_url = string;
185
185
  /**
186
186
  * Semantic helper
187
187
  *
188
188
  * For example `"https://promptbook.webgpt.com/cs/write-website-content.ptbk.md#keywords"`
189
189
  */
190
- export type string_promptbook_url_with_hashtemplate = string;
190
+ export type string_pipeline_url_with_hashtemplate = string;
191
191
  /**
192
192
  * Semantic helper
193
193
  *
@@ -5,7 +5,7 @@ import type { string_char_emoji } from '../types/typeAliasEmoji';
5
5
  *
6
6
  * @see https://getemoji.com/
7
7
  *
8
- * @private within the library
8
+ * @private within the package
9
9
  * @deprecated Use /\p{Extended_Pictographic}/ instead
10
10
  */
11
11
  export declare const EMOJIS_IN_CATEGORIES: Record<string, Array<string_char_emoji>>;
@@ -13,7 +13,7 @@ export declare const EMOJIS_IN_CATEGORIES: Record<string, Array<string_char_emoj
13
13
  *
14
14
  * All possible emoji chars like "🍆", "🍡", "🍤"...
15
15
  *
16
- * @private within the library
16
+ * @private within the package
17
17
  * @deprecated Use /\p{Extended_Pictographic}/ instead
18
18
  */
19
19
  export declare const EMOJIS: Set<string_char_emoji>;
@@ -1,4 +1,4 @@
1
- import type { ExpectationAmount } from '../../types/PromptbookJson/PromptTemplateJson';
1
+ import type { ExpectationAmount } from '../../types/PipelineJson/PromptTemplateJson';
2
2
  /**
3
3
  * Counts number of characters in the text
4
4
  */
@@ -1,4 +1,4 @@
1
- import type { ExpectationAmount } from '../../types/PromptbookJson/PromptTemplateJson';
1
+ import type { ExpectationAmount } from '../../types/PipelineJson/PromptTemplateJson';
2
2
  /**
3
3
  * Counts number of lines in the text
4
4
  */
@@ -1,4 +1,4 @@
1
- import type { ExpectationAmount } from '../../types/PromptbookJson/PromptTemplateJson';
1
+ import type { ExpectationAmount } from '../../types/PipelineJson/PromptTemplateJson';
2
2
  /**
3
3
  * Counts number of pages in the text
4
4
  */
@@ -1,4 +1,4 @@
1
- import type { ExpectationAmount } from '../../types/PromptbookJson/PromptTemplateJson';
1
+ import type { ExpectationAmount } from '../../types/PipelineJson/PromptTemplateJson';
2
2
  /**
3
3
  * Counts number of paragraphs in the text
4
4
  */
@@ -1,4 +1,4 @@
1
- import type { ExpectationAmount } from '../../types/PromptbookJson/PromptTemplateJson';
1
+ import type { ExpectationAmount } from '../../types/PipelineJson/PromptTemplateJson';
2
2
  /**
3
3
  * Split text into sentences
4
4
  */
@@ -1,4 +1,4 @@
1
- import type { ExpectationAmount } from '../../types/PromptbookJson/PromptTemplateJson';
1
+ import type { ExpectationAmount } from '../../types/PipelineJson/PromptTemplateJson';
2
2
  /**
3
3
  * Counts number of words in the text
4
4
  */
@@ -1,5 +1,5 @@
1
- import type { ExpectationAmount } from '../../types/PromptbookJson/PromptTemplateJson';
2
- import type { ExpectationUnit } from '../../types/PromptbookJson/PromptTemplateJson';
1
+ import type { ExpectationAmount } from '../../types/PipelineJson/PromptTemplateJson';
2
+ import type { ExpectationUnit } from '../../types/PipelineJson/PromptTemplateJson';
3
3
  /**
4
4
  * Index of all counter functions
5
5
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Format either small or big number
3
3
  *
4
- * @private within the library
4
+ * @private within the package
5
5
  */
6
6
  export declare function formatNumber(value: number): string;
@@ -3,7 +3,7 @@ import type { string_name } from '../../types/typeAliases';
3
3
  /**
4
4
  * Add or modify an auto-generated section in a markdown file
5
5
  *
6
- * @private within the library
6
+ * @private within the package
7
7
  */
8
8
  export declare function addAutoGeneratedSection(content: string_markdown, options: {
9
9
  sectionName: string_name;
@@ -31,7 +31,7 @@ type CreateMarkdownChartOptions = {
31
31
  /**
32
32
  * Function createMarkdownChart will draw a chart in markdown from ⬛+🟦 tiles
33
33
  *
34
- * @private within the library
34
+ * @private within the package
35
35
  */
36
36
  export declare function createMarkdownChart(options: CreateMarkdownChartOptions): string_markdown;
37
37
  export {};
@@ -3,6 +3,6 @@ import type { string_markdown_text } from '../../types/typeAliases';
3
3
  /**
4
4
  * Create a markdown table from a 2D array of strings
5
5
  *
6
- * @private within the library
6
+ * @private within the package
7
7
  */
8
8
  export declare function createMarkdownTable(table: Array<Array<string_markdown_text>>): string_markdown;
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Represents the structure of a markdown file.
3
3
  *
4
- * @private within the library
4
+ * @private within the package
5
5
  */
6
6
  export type MarkdownStructure = {
7
7
  /**
@@ -2,6 +2,6 @@ import type { MarkdownStructure } from './MarkdownStructure';
2
2
  /**
3
3
  * Computes the deepness of the markdown structure.
4
4
  *
5
- * @private within the library
5
+ * @private within the package
6
6
  */
7
7
  export declare function countMarkdownStructureDeepness(markdownStructure: MarkdownStructure): number;
@@ -8,6 +8,6 @@ import type { MarkdownStructure } from './MarkdownStructure';
8
8
  * @param markdown The markdown string to parse.
9
9
  * @returns The MarkdownStructure object.
10
10
  *
11
- * @private within the library
11
+ * @private within the package
12
12
  */
13
13
  export declare function markdownToMarkdownStructure(markdown: string): MarkdownStructure;
@@ -1,12 +0,0 @@
1
- import type { PromptbookJson } from '../types/PromptbookJson/PromptbookJson';
2
- import type { PromptbookString } from '../types/PromptbookString';
3
- /**
4
- * Converts promptbook in JSON format to string format
5
- *
6
- * @param promptbookJson Promptbook in JSON format (.ptbk.json)
7
- * @returns Promptbook in string format (.ptbk.md)
8
- */
9
- export declare function promptbookJsonToString(promptbookJson: PromptbookJson): PromptbookString;
10
- /**
11
- * TODO: Escape all
12
- */
@@ -1,32 +0,0 @@
1
- import type { LlmExecutionTools } from '../execution/LlmExecutionTools';
2
- import type { PromptbookJson } from '../types/PromptbookJson/PromptbookJson';
3
- import type { PromptbookString } from '../types/PromptbookString';
4
- /**
5
- * Options for promptbookStringToJson
6
- */
7
- type PromptbookStringToJsonOptions = {
8
- /**
9
- * Tools for processing required for knowledge processing *(not for actual execution)*
10
- */
11
- llmTools?: LlmExecutionTools;
12
- };
13
- /**
14
- * Compile promptbook from string (markdown) format to JSON format
15
- *
16
- * Note: There are two similar functions:
17
- * - `promptbookStringToJson` **(preferred)** - which propperly compiles the promptbook and use embedding for external knowledge
18
- * - `promptbookStringToJsonSync` - use only if you need to compile promptbook synchronously and it contains NO external knowledge
19
- *
20
- * @param promptbookString {Promptbook} in string markdown format (.ptbk.md)
21
- * @param options - Options and tools for the compilation
22
- * @returns {Promptbook} compiled in JSON format (.ptbk.json)
23
- * @throws {PromptbookSyntaxError} if the promptbook string is not valid
24
- *
25
- * Note: This function does not validate logic of the pipeline only the syntax
26
- * Note: This function acts as compilation process
27
- */
28
- export declare function promptbookStringToJson(promptbookString: PromptbookString, options?: PromptbookStringToJsonOptions): Promise<PromptbookJson>;
29
- export {};
30
- /**
31
- * TODO: [🏏] Leverage the batch API and build queues @see https://platform.openai.com/docs/guides/batch
32
- */
@@ -1,23 +0,0 @@
1
- import type { PromptbookJson } from '../types/PromptbookJson/PromptbookJson';
2
- import type { PromptbookString } from '../types/PromptbookString';
3
- /**
4
- * Compile promptbook from string (markdown) format to JSON format synchronously
5
- *
6
- * Note: There are two similar functions:
7
- * - `promptbookStringToJson` **(preferred)** - which propperly compiles the promptbook and use embedding for external knowledge
8
- * - `promptbookStringToJsonSync` - use only if you need to compile promptbook synchronously and it contains NO external knowledge
9
- *
10
- * @param promptbookString {Promptbook} in string markdown format (.ptbk.md)
11
- * @param options - Options and tools for the compilation
12
- * @returns {Promptbook} compiled in JSON format (.ptbk.json)
13
- * @throws {PromptbookSyntaxError} if the promptbook string is not valid
14
- *
15
- * Note: This function does not validate logic of the pipeline only the syntax
16
- * Note: This function acts as compilation process
17
- */
18
- export declare function promptbookStringToJsonSync(promptbookString: PromptbookString): PromptbookJson;
19
- /**
20
- * TODO: Report here line/column of error
21
- * TODO: Use spaceTrim more effectively
22
- * TODO: [🧠] Parameter flags - isInput, isOutput, isInternal
23
- */
@@ -1,13 +0,0 @@
1
- import type { PromptbookJson } from '../../types/PromptbookJson/PromptbookJson';
2
- import type { PromptbookString } from '../../types/PromptbookString';
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
- * @param path - The path to the file relative to samples/templates directory
10
- * @private
11
- */
12
- export declare function importPromptbook(path: `${string}.ptbk.md`): PromptbookString;
13
- export declare function importPromptbook(path: `${string}.ptbk.json`): PromptbookJson;
@@ -1,27 +0,0 @@
1
- import type { PromptbookJson } from '../../types/PromptbookJson/PromptbookJson';
2
- /**
3
- * Validates PromptbookJson 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 promptbook valid or invalid PromptbookJson
13
- * @returns the same promptbook if it is logically valid
14
- * @throws {PromptbookLogicError} on logical error in the promptbook
15
- */
16
- export declare function validatePromptbook(promptbook: PromptbookJson): PromptbookJson;
17
- /**
18
- * TODO: [🧠] Work with promptbookVersion
19
- * TODO: Use here some json-schema, Zod or something similar and change it to:
20
- * > /**
21
- * > * Validates PromptbookJson if it is logically valid.
22
- * > *
23
- * > * It checks:
24
- * > * - it has a valid structure
25
- * > * - ...
26
- * > ex port function validatePromptbook(promptbook: unknown): asserts promptbook is PromptbookJson {
27
- */
@@ -1,25 +0,0 @@
1
- import type { Promisable } from 'type-fest';
2
- import type { Prompt } from '../types/Prompt';
3
- import type { PromptbookJson } from '../types/PromptbookJson/PromptbookJson';
4
- import type { string_promptbook_url } from '../types/typeAliases';
5
- /**
6
- * Library of promptbooks that groups together promptbooks for an application.
7
- *
8
- * @see https://github.com/webgptorg/promptbook#promptbook-library
9
- */
10
- export type PromptbookLibrary = {
11
- /**
12
- * Gets all promptbooks in the library
13
- */
14
- listPromptbooks(): Promisable<Array<string_promptbook_url>>;
15
- /**
16
- * Gets promptbook by its URL
17
- *
18
- * Note: This is not a direct fetching from the URL, but a lookup in the library
19
- */
20
- getPromptbookByUrl(url: string_promptbook_url): Promisable<PromptbookJson>;
21
- /**
22
- * Checks whether given prompt was defined in any promptbook in the library
23
- */
24
- isResponsibleForPrompt(prompt: Prompt): Promisable<boolean>;
25
- };
@@ -1,12 +0,0 @@
1
- import type { PromptbookJson } from '../../types/PromptbookJson/PromptbookJson';
2
- import type { PromptbookLibrary } from '../PromptbookLibrary';
3
- /**
4
- * Creates PromptbookLibrary from array of PromptbookJson or PromptbookString
5
- *
6
- * Note: Functions `libraryToJson` and `createLibraryFromJson` are complementary
7
- * Note: During the construction syntax and logic of all sources are validated
8
- *
9
- * @param promptbookSources
10
- * @returns PromptbookLibrary
11
- */
12
- export declare function createLibraryFromJson(...promptbooks: Array<PromptbookJson>): PromptbookLibrary;
@@ -1,22 +0,0 @@
1
- import type { PromptbookJson } from '../../types/PromptbookJson/PromptbookJson';
2
- import type { PromptbookLibrary } from '../PromptbookLibrary';
3
- /**
4
- * Constructs Promptbook from async sources
5
- * It can be one of the following:
6
- * - Promise of array of PromptbookJson or PromptbookString
7
- * - Factory function that returns Promise of array of PromptbookJson or PromptbookString
8
- *
9
- * Note: This is useful as internal tool for other constructor functions like
10
- * `createLibraryFromUrl` or `createLibraryFromDirectory`
11
- * Consider using those functions instead of this one
12
- *
13
- * Note: The function does NOT return promise it returns the library directly which waits for the sources to be resolved
14
- * when error occurs in given promise or factory function, it is thrown during `listPromptbooks` or `getPromptbookByUrl` call
15
- *
16
- * Note: Consider using `createLibraryFromDirectory` or `createLibraryFromUrl`
17
- *
18
- * @param promptbookSourcesPromiseOrFactory
19
- * @returns PromptbookLibrary
20
- * @deprecated Do not use, it will became internal tool for other constructor functions
21
- */
22
- export declare function createLibraryFromPromise(promptbookSourcesPromiseOrFactory: Promise<Array<PromptbookJson>> | (() => Promise<Array<PromptbookJson>>)): PromptbookLibrary;
@@ -1,12 +0,0 @@
1
- import type { string_promptbook_url } from '../../types/typeAliases';
2
- import type { PromptbookLibrary } from '../PromptbookLibrary';
3
- /**
4
- * Creates PromptbookLibrary as a subset of another PromptbookLibrary
5
- *
6
- * Note: You can use any type of library as a parent library - local, remote, etc.
7
- * Note: This is just a thin wrapper / proxy around the parent library
8
- *
9
- * @param promptbookSources
10
- * @returns PromptbookLibrary
11
- */
12
- export declare function createSublibrary(library: PromptbookLibrary, predicate: (url: string_promptbook_url) => boolean): PromptbookLibrary;
@@ -1,12 +0,0 @@
1
- import type { PromptbookJson } from '../types/PromptbookJson/PromptbookJson';
2
- import type { PromptbookString } from '../types/PromptbookString';
3
- /**
4
- * Converts promptbook in JSON format to string format
5
- *
6
- * @param promptbookJson Promptbook in JSON format (.ptbk.json)
7
- * @returns Promptbook in string format (.ptbk.md)
8
- */
9
- export declare function promptbookJsonToString(promptbookJson: PromptbookJson): PromptbookString;
10
- /**
11
- * TODO: Escape all
12
- */
@@ -1,32 +0,0 @@
1
- import type { LlmExecutionTools } from '../execution/LlmExecutionTools';
2
- import type { PromptbookJson } from '../types/PromptbookJson/PromptbookJson';
3
- import type { PromptbookString } from '../types/PromptbookString';
4
- /**
5
- * Options for promptbookStringToJson
6
- */
7
- type PromptbookStringToJsonOptions = {
8
- /**
9
- * Tools for processing required for knowledge processing *(not for actual execution)*
10
- */
11
- llmTools?: LlmExecutionTools;
12
- };
13
- /**
14
- * Compile promptbook from string (markdown) format to JSON format
15
- *
16
- * Note: There are two similar functions:
17
- * - `promptbookStringToJson` **(preferred)** - which propperly compiles the promptbook and use embedding for external knowledge
18
- * - `promptbookStringToJsonSync` - use only if you need to compile promptbook synchronously and it contains NO external knowledge
19
- *
20
- * @param promptbookString {Promptbook} in string markdown format (.ptbk.md)
21
- * @param options - Options and tools for the compilation
22
- * @returns {Promptbook} compiled in JSON format (.ptbk.json)
23
- * @throws {PromptbookSyntaxError} if the promptbook string is not valid
24
- *
25
- * Note: This function does not validate logic of the pipeline only the syntax
26
- * Note: This function acts as compilation process
27
- */
28
- export declare function promptbookStringToJson(promptbookString: PromptbookString, options?: PromptbookStringToJsonOptions): Promise<PromptbookJson>;
29
- export {};
30
- /**
31
- * TODO: [🏏] Leverage the batch API and build queues @see https://platform.openai.com/docs/guides/batch
32
- */
@@ -1,23 +0,0 @@
1
- import type { PromptbookJson } from '../types/PromptbookJson/PromptbookJson';
2
- import type { PromptbookString } from '../types/PromptbookString';
3
- /**
4
- * Compile promptbook from string (markdown) format to JSON format synchronously
5
- *
6
- * Note: There are two similar functions:
7
- * - `promptbookStringToJson` **(preferred)** - which propperly compiles the promptbook and use embedding for external knowledge
8
- * - `promptbookStringToJsonSync` - use only if you need to compile promptbook synchronously and it contains NO external knowledge
9
- *
10
- * @param promptbookString {Promptbook} in string markdown format (.ptbk.md)
11
- * @param options - Options and tools for the compilation
12
- * @returns {Promptbook} compiled in JSON format (.ptbk.json)
13
- * @throws {PromptbookSyntaxError} if the promptbook string is not valid
14
- *
15
- * Note: This function does not validate logic of the pipeline only the syntax
16
- * Note: This function acts as compilation process
17
- */
18
- export declare function promptbookStringToJsonSync(promptbookString: PromptbookString): PromptbookJson;
19
- /**
20
- * TODO: Report here line/column of error
21
- * TODO: Use spaceTrim more effectively
22
- * TODO: [🧠] Parameter flags - isInput, isOutput, isInternal
23
- */
@@ -1,13 +0,0 @@
1
- import type { PromptbookJson } from '../../types/PromptbookJson/PromptbookJson';
2
- import type { PromptbookString } from '../../types/PromptbookString';
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
- * @param path - The path to the file relative to samples/templates directory
10
- * @private
11
- */
12
- export declare function importPromptbook(path: `${string}.ptbk.md`): PromptbookString;
13
- export declare function importPromptbook(path: `${string}.ptbk.json`): PromptbookJson;
@@ -1,27 +0,0 @@
1
- import type { PromptbookJson } from '../../types/PromptbookJson/PromptbookJson';
2
- /**
3
- * Validates PromptbookJson 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 promptbook valid or invalid PromptbookJson
13
- * @returns the same promptbook if it is logically valid
14
- * @throws {PromptbookLogicError} on logical error in the promptbook
15
- */
16
- export declare function validatePromptbook(promptbook: PromptbookJson): PromptbookJson;
17
- /**
18
- * TODO: [🧠] Work with promptbookVersion
19
- * TODO: Use here some json-schema, Zod or something similar and change it to:
20
- * > /**
21
- * > * Validates PromptbookJson if it is logically valid.
22
- * > *
23
- * > * It checks:
24
- * > * - it has a valid structure
25
- * > * - ...
26
- * > ex port function validatePromptbook(promptbook: unknown): asserts promptbook is PromptbookJson {
27
- */
@@ -1,25 +0,0 @@
1
- import type { Promisable } from 'type-fest';
2
- import type { Prompt } from '../types/Prompt';
3
- import type { PromptbookJson } from '../types/PromptbookJson/PromptbookJson';
4
- import type { string_promptbook_url } from '../types/typeAliases';
5
- /**
6
- * Library of promptbooks that groups together promptbooks for an application.
7
- *
8
- * @see https://github.com/webgptorg/promptbook#promptbook-library
9
- */
10
- export type PromptbookLibrary = {
11
- /**
12
- * Gets all promptbooks in the library
13
- */
14
- listPromptbooks(): Promisable<Array<string_promptbook_url>>;
15
- /**
16
- * Gets promptbook by its URL
17
- *
18
- * Note: This is not a direct fetching from the URL, but a lookup in the library
19
- */
20
- getPromptbookByUrl(url: string_promptbook_url): Promisable<PromptbookJson>;
21
- /**
22
- * Checks whether given prompt was defined in any promptbook in the library
23
- */
24
- isResponsibleForPrompt(prompt: Prompt): Promisable<boolean>;
25
- };
@@ -1,12 +0,0 @@
1
- import type { PromptbookJson } from '../../types/PromptbookJson/PromptbookJson';
2
- import type { PromptbookLibrary } from '../PromptbookLibrary';
3
- /**
4
- * Creates PromptbookLibrary from array of PromptbookJson or PromptbookString
5
- *
6
- * Note: Functions `libraryToJson` and `createLibraryFromJson` are complementary
7
- * Note: During the construction syntax and logic of all sources are validated
8
- *
9
- * @param promptbookSources
10
- * @returns PromptbookLibrary
11
- */
12
- export declare function createLibraryFromJson(...promptbooks: Array<PromptbookJson>): PromptbookLibrary;