@promptbook/openai 0.61.0-1 → 0.61.0-11

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 (225) hide show
  1. package/esm/index.es.js +4 -1
  2. package/esm/index.es.js.map +1 -1
  3. package/esm/typings/promptbook-collection/index.d.ts +196 -23
  4. package/esm/typings/src/_packages/core.index.d.ts +5 -1
  5. package/esm/typings/src/_packages/types.index.d.ts +6 -4
  6. package/esm/typings/src/_packages/utils.index.d.ts +4 -3
  7. package/esm/typings/src/collection/constructors/createCollectionFromDirectory.d.ts +1 -1
  8. package/esm/typings/src/collection/constructors/createCollectionFromUrl.d.ts +2 -2
  9. package/esm/typings/src/commands/MODEL/ModelCommand.d.ts +1 -1
  10. package/esm/typings/src/commands/PERSONA/PersonaCommand.d.ts +4 -2
  11. package/esm/typings/src/commands/_common/types/CommandParser.d.ts +15 -12
  12. package/esm/typings/src/config.d.ts +8 -0
  13. package/esm/typings/src/conversion/pipelineStringToJson.d.ts +9 -5
  14. package/esm/typings/src/conversion/pipelineStringToJsonSync.d.ts +5 -3
  15. package/esm/typings/src/conversion/prettify/PrettifyOptions.d.ts +2 -2
  16. package/esm/typings/src/conversion/utils/renameParameter.d.ts +3 -3
  17. package/esm/typings/src/conversion/validation/_importPipeline.d.ts +2 -2
  18. package/esm/typings/src/conversion/validation/validatePipeline.d.ts +4 -0
  19. package/esm/typings/src/errors/EnvironmentMismatchError.d.ts +7 -0
  20. package/esm/typings/src/errors/VersionMismatchError.d.ts +8 -0
  21. package/esm/typings/src/execution/LlmExecutionTools.d.ts +3 -1
  22. package/esm/typings/src/execution/PipelineExecutor.d.ts +8 -7
  23. package/esm/typings/src/execution/PromptResult.d.ts +17 -5
  24. package/esm/typings/src/execution/ScriptExecutionTools.d.ts +6 -4
  25. package/esm/typings/src/execution/UserInterfaceTools.d.ts +5 -5
  26. package/esm/typings/src/execution/createPipelineExecutor.d.ts +4 -1
  27. package/esm/typings/src/execution/translation/automatic-translate/automatic-translators/TranslatorOptions.d.ts +2 -2
  28. package/esm/typings/src/execution/utils/forEachAsync.d.ts +1 -1
  29. package/esm/typings/src/formats/csv/ListFormatDefinition.d.ts +1 -1
  30. package/esm/typings/src/formats/json/JsonFormatDefinition.d.ts +1 -1
  31. package/esm/typings/src/formats/list/ListFormatDefinition.d.ts +1 -1
  32. package/esm/typings/src/knowledge/dialogs/callback/CallbackInterfaceToolsOptions.d.ts +1 -1
  33. package/esm/typings/src/knowledge/prepare-knowledge/_common/prepareKnowledgePieces.d.ts +18 -0
  34. package/esm/typings/src/knowledge/prepare-knowledge/_common/prepareKnowledgePieces.test.d.ts +1 -0
  35. package/esm/typings/src/knowledge/prepare-knowledge/_common/utils/getLlmToolsForTestingAndScriptsAndPlayground.d.ts +10 -0
  36. package/esm/typings/src/knowledge/prepare-knowledge/markdown/prepareKnowledgeFromMarkdown.d.ts +8 -23
  37. package/esm/typings/src/knowledge/prepare-knowledge/markdown/prepareKnowledgeFromMarkdown.test.d.ts +3 -0
  38. package/esm/typings/src/knowledge/prepare-knowledge/pdf/prepareKnowledgeFromPdf.d.ts +7 -14
  39. package/esm/typings/src/llm-providers/anthropic-claude/AnthropicClaudeExecutionToolsOptions.d.ts +1 -1
  40. package/esm/typings/src/llm-providers/anthropic-claude/anthropic-claude-models.d.ts +2 -2
  41. package/esm/typings/src/llm-providers/anthropic-claude/playground/playground.d.ts +3 -0
  42. package/esm/typings/src/llm-providers/azure-openai/AzureOpenAiExecutionToolsOptions.d.ts +5 -5
  43. package/esm/typings/src/llm-providers/azure-openai/playground/playground.d.ts +3 -0
  44. package/esm/typings/src/llm-providers/mocked/MockedEchoLlmExecutionTools.d.ts +1 -1
  45. package/esm/typings/src/llm-providers/mocked/MockedFackedLlmExecutionTools.d.ts +1 -1
  46. package/esm/typings/src/llm-providers/multiple/MultipleLlmExecutionTools.d.ts +3 -1
  47. package/esm/typings/src/llm-providers/openai/OpenAiExecutionToolsOptions.d.ts +1 -1
  48. package/esm/typings/src/llm-providers/openai/openai-models.d.ts +3 -2
  49. package/esm/typings/src/llm-providers/openai/playground/playground.d.ts +3 -0
  50. package/esm/typings/src/llm-providers/remote/RemoteLlmExecutionToolsOptions.d.ts +1 -1
  51. package/esm/typings/src/llm-providers/utils/cache/CacheItem.d.ts +29 -0
  52. package/esm/typings/src/llm-providers/utils/cache/CacheLlmToolsOptions.d.ts +10 -0
  53. package/esm/typings/src/llm-providers/utils/cache/cacheLlmTools.d.ts +17 -0
  54. package/esm/typings/src/llm-providers/utils/count-total-cost/LlmExecutionToolsWithTotalCost.d.ts +11 -0
  55. package/esm/typings/src/llm-providers/utils/count-total-cost/countTotalCost.d.ts +14 -0
  56. package/esm/typings/src/llm-providers/utils/createLlmToolsFromEnv.d.ts +21 -0
  57. package/esm/typings/src/personas/preparePersona.d.ts +10 -0
  58. package/esm/typings/src/personas/preparePersona.test.d.ts +1 -0
  59. package/esm/typings/src/prepare/PrepareOptions.d.ts +22 -0
  60. package/esm/typings/src/prepare/preparePipeline.d.ts +16 -0
  61. package/esm/typings/src/prepare/unpreparePipeline.d.ts +8 -0
  62. package/esm/typings/src/scripting/javascript/JavascriptExecutionToolsOptions.d.ts +1 -1
  63. package/esm/typings/src/scripting/javascript/utils/preserve.d.ts +1 -1
  64. package/esm/typings/src/storage/_common/PromptbookStorage.d.ts +24 -0
  65. package/esm/typings/src/storage/_common/PromptbookStorage.test-type.d.ts +5 -0
  66. package/esm/typings/src/storage/files-storage/FilesStorage.d.ts +28 -0
  67. package/esm/typings/src/storage/files-storage/FilesStorageOptions.d.ts +10 -0
  68. package/esm/typings/src/storage/files-storage/utils/nameToSubfolderPath.d.ts +7 -0
  69. package/esm/typings/src/storage/files-storage/utils/nameToSubfolderPath.test.d.ts +1 -0
  70. package/esm/typings/src/storage/local-storage/getLocalStorage.d.ts +8 -0
  71. package/esm/typings/src/storage/local-storage/getSessionStorage.d.ts +8 -0
  72. package/esm/typings/src/storage/memory/MemoryStorage.d.ts +31 -0
  73. package/esm/typings/src/storage/utils/PrefixStorage.d.ts +23 -0
  74. package/esm/typings/src/storage/utils/makePromptbookStorageFromWebStorage.d.ts +12 -0
  75. package/esm/typings/src/types/ModelRequirements.d.ts +22 -1
  76. package/esm/typings/src/types/PipelineJson/Expectations.d.ts +6 -2
  77. package/esm/typings/src/types/PipelineJson/KnowledgePieceJson.d.ts +67 -0
  78. package/esm/typings/src/types/PipelineJson/KnowledgeSourceJson.d.ts +24 -0
  79. package/esm/typings/src/types/PipelineJson/LlmTemplateJson.d.ts +8 -1
  80. package/esm/typings/src/types/PipelineJson/PersonaJson.d.ts +40 -0
  81. package/esm/typings/src/types/PipelineJson/PipelineJson.d.ts +27 -3
  82. package/esm/typings/src/types/PipelineJson/PreparationJson.d.ts +21 -0
  83. package/esm/typings/src/types/PipelineJson/PromptDialogJson.d.ts +2 -0
  84. package/esm/typings/src/types/PipelineJson/PromptTemplateJson.d.ts +1 -1
  85. package/esm/typings/src/types/PipelineJson/PromptTemplateJsonCommon.d.ts +8 -1
  86. package/esm/typings/src/types/PipelineJson/PromptTemplateParameterJson.d.ts +11 -2
  87. package/esm/typings/src/types/PipelineJson/ScriptJson.d.ts +2 -0
  88. package/esm/typings/src/types/PipelineJson/SimpleTemplateJson.d.ts +2 -0
  89. package/esm/typings/src/types/Prompt.d.ts +5 -2
  90. package/esm/typings/src/types/execution-report/ExecutionReportJson.d.ts +4 -4
  91. package/esm/typings/src/types/execution-report/ExecutionReportStringOptions.d.ts +3 -3
  92. package/esm/typings/src/types/typeAliases.d.ts +62 -14
  93. package/esm/typings/src/utils/FromtoItems.d.ts +3 -3
  94. package/esm/typings/src/utils/currentDate.d.ts +7 -0
  95. package/esm/typings/src/utils/markdown/addAutoGeneratedSection.d.ts +2 -2
  96. package/esm/typings/src/utils/markdown/createMarkdownChart.d.ts +6 -9
  97. package/esm/typings/src/utils/markdown/extractAllBlocksFromMarkdown-real.test.d.ts +1 -0
  98. package/esm/typings/src/utils/markdown/extractAllBlocksFromMarkdown.d.ts +9 -2
  99. package/esm/typings/src/utils/markdown/extractOneBlockFromMarkdown.d.ts +1 -1
  100. package/esm/typings/src/utils/markdown/parseMarkdownSection.d.ts +3 -3
  101. package/esm/typings/src/utils/organization/TODO.d.ts +4 -0
  102. package/esm/typings/src/utils/organization/TODO_USE.d.ts +11 -0
  103. package/esm/typings/src/utils/organization/___.d.ts +4 -0
  104. package/esm/typings/src/utils/organization/notUsing.d.ts +11 -0
  105. package/esm/typings/src/utils/organization/really_any.d.ts +4 -0
  106. package/esm/typings/src/utils/random/randomSeed.d.ts +7 -0
  107. package/package.json +2 -2
  108. package/umd/index.umd.js +4 -1
  109. package/umd/index.umd.js.map +1 -1
  110. package/umd/typings/promptbook-collection/index.d.ts +196 -23
  111. package/umd/typings/src/_packages/core.index.d.ts +5 -1
  112. package/umd/typings/src/_packages/types.index.d.ts +6 -4
  113. package/umd/typings/src/_packages/utils.index.d.ts +4 -3
  114. package/umd/typings/src/collection/constructors/createCollectionFromDirectory.d.ts +1 -1
  115. package/umd/typings/src/collection/constructors/createCollectionFromUrl.d.ts +2 -2
  116. package/umd/typings/src/commands/MODEL/ModelCommand.d.ts +1 -1
  117. package/umd/typings/src/commands/PERSONA/PersonaCommand.d.ts +4 -2
  118. package/umd/typings/src/commands/_common/types/CommandParser.d.ts +15 -12
  119. package/umd/typings/src/config.d.ts +8 -0
  120. package/umd/typings/src/conversion/pipelineStringToJson.d.ts +9 -5
  121. package/umd/typings/src/conversion/pipelineStringToJsonSync.d.ts +5 -3
  122. package/umd/typings/src/conversion/prettify/PrettifyOptions.d.ts +2 -2
  123. package/umd/typings/src/conversion/utils/renameParameter.d.ts +3 -3
  124. package/umd/typings/src/conversion/validation/_importPipeline.d.ts +2 -2
  125. package/umd/typings/src/conversion/validation/validatePipeline.d.ts +4 -0
  126. package/umd/typings/src/errors/EnvironmentMismatchError.d.ts +7 -0
  127. package/umd/typings/src/errors/VersionMismatchError.d.ts +8 -0
  128. package/umd/typings/src/execution/LlmExecutionTools.d.ts +3 -1
  129. package/umd/typings/src/execution/PipelineExecutor.d.ts +8 -7
  130. package/umd/typings/src/execution/PromptResult.d.ts +17 -5
  131. package/umd/typings/src/execution/ScriptExecutionTools.d.ts +6 -4
  132. package/umd/typings/src/execution/UserInterfaceTools.d.ts +5 -5
  133. package/umd/typings/src/execution/createPipelineExecutor.d.ts +4 -1
  134. package/umd/typings/src/execution/translation/automatic-translate/automatic-translators/TranslatorOptions.d.ts +2 -2
  135. package/umd/typings/src/execution/utils/forEachAsync.d.ts +1 -1
  136. package/umd/typings/src/formats/csv/ListFormatDefinition.d.ts +1 -1
  137. package/umd/typings/src/formats/json/JsonFormatDefinition.d.ts +1 -1
  138. package/umd/typings/src/formats/list/ListFormatDefinition.d.ts +1 -1
  139. package/umd/typings/src/knowledge/dialogs/callback/CallbackInterfaceToolsOptions.d.ts +1 -1
  140. package/umd/typings/src/knowledge/prepare-knowledge/_common/prepareKnowledgePieces.d.ts +18 -0
  141. package/umd/typings/src/knowledge/prepare-knowledge/_common/prepareKnowledgePieces.test.d.ts +1 -0
  142. package/umd/typings/src/knowledge/prepare-knowledge/_common/utils/getLlmToolsForTestingAndScriptsAndPlayground.d.ts +10 -0
  143. package/umd/typings/src/knowledge/prepare-knowledge/markdown/prepareKnowledgeFromMarkdown.d.ts +8 -23
  144. package/umd/typings/src/knowledge/prepare-knowledge/markdown/prepareKnowledgeFromMarkdown.test.d.ts +3 -0
  145. package/umd/typings/src/knowledge/prepare-knowledge/pdf/prepareKnowledgeFromPdf.d.ts +7 -14
  146. package/umd/typings/src/llm-providers/anthropic-claude/AnthropicClaudeExecutionToolsOptions.d.ts +1 -1
  147. package/umd/typings/src/llm-providers/anthropic-claude/anthropic-claude-models.d.ts +2 -2
  148. package/umd/typings/src/llm-providers/anthropic-claude/playground/playground.d.ts +3 -0
  149. package/umd/typings/src/llm-providers/azure-openai/AzureOpenAiExecutionToolsOptions.d.ts +5 -5
  150. package/umd/typings/src/llm-providers/azure-openai/playground/playground.d.ts +3 -0
  151. package/umd/typings/src/llm-providers/mocked/MockedEchoLlmExecutionTools.d.ts +1 -1
  152. package/umd/typings/src/llm-providers/mocked/MockedFackedLlmExecutionTools.d.ts +1 -1
  153. package/umd/typings/src/llm-providers/multiple/MultipleLlmExecutionTools.d.ts +3 -1
  154. package/umd/typings/src/llm-providers/openai/OpenAiExecutionToolsOptions.d.ts +1 -1
  155. package/umd/typings/src/llm-providers/openai/openai-models.d.ts +3 -2
  156. package/umd/typings/src/llm-providers/openai/playground/playground.d.ts +3 -0
  157. package/umd/typings/src/llm-providers/remote/RemoteLlmExecutionToolsOptions.d.ts +1 -1
  158. package/umd/typings/src/llm-providers/utils/cache/CacheItem.d.ts +29 -0
  159. package/umd/typings/src/llm-providers/utils/cache/CacheLlmToolsOptions.d.ts +10 -0
  160. package/umd/typings/src/llm-providers/utils/cache/cacheLlmTools.d.ts +17 -0
  161. package/umd/typings/src/llm-providers/utils/count-total-cost/LlmExecutionToolsWithTotalCost.d.ts +11 -0
  162. package/umd/typings/src/llm-providers/utils/count-total-cost/countTotalCost.d.ts +14 -0
  163. package/umd/typings/src/llm-providers/utils/createLlmToolsFromEnv.d.ts +21 -0
  164. package/umd/typings/src/personas/preparePersona.d.ts +10 -0
  165. package/umd/typings/src/personas/preparePersona.test.d.ts +1 -0
  166. package/umd/typings/src/prepare/PrepareOptions.d.ts +22 -0
  167. package/umd/typings/src/prepare/preparePipeline.d.ts +16 -0
  168. package/umd/typings/src/prepare/unpreparePipeline.d.ts +8 -0
  169. package/umd/typings/src/scripting/javascript/JavascriptExecutionToolsOptions.d.ts +1 -1
  170. package/umd/typings/src/scripting/javascript/utils/preserve.d.ts +1 -1
  171. package/umd/typings/src/storage/_common/PromptbookStorage.d.ts +24 -0
  172. package/umd/typings/src/storage/_common/PromptbookStorage.test-type.d.ts +5 -0
  173. package/umd/typings/src/storage/files-storage/FilesStorage.d.ts +28 -0
  174. package/umd/typings/src/storage/files-storage/FilesStorageOptions.d.ts +10 -0
  175. package/umd/typings/src/storage/files-storage/utils/nameToSubfolderPath.d.ts +7 -0
  176. package/umd/typings/src/storage/files-storage/utils/nameToSubfolderPath.test.d.ts +1 -0
  177. package/umd/typings/src/storage/local-storage/getLocalStorage.d.ts +8 -0
  178. package/umd/typings/src/storage/local-storage/getSessionStorage.d.ts +8 -0
  179. package/umd/typings/src/storage/memory/MemoryStorage.d.ts +31 -0
  180. package/umd/typings/src/storage/utils/PrefixStorage.d.ts +23 -0
  181. package/umd/typings/src/storage/utils/makePromptbookStorageFromWebStorage.d.ts +12 -0
  182. package/umd/typings/src/types/ModelRequirements.d.ts +22 -1
  183. package/umd/typings/src/types/PipelineJson/Expectations.d.ts +6 -2
  184. package/umd/typings/src/types/PipelineJson/KnowledgePieceJson.d.ts +67 -0
  185. package/umd/typings/src/types/PipelineJson/KnowledgeSourceJson.d.ts +24 -0
  186. package/umd/typings/src/types/PipelineJson/LlmTemplateJson.d.ts +8 -1
  187. package/umd/typings/src/types/PipelineJson/PersonaJson.d.ts +40 -0
  188. package/umd/typings/src/types/PipelineJson/PipelineJson.d.ts +27 -3
  189. package/umd/typings/src/types/PipelineJson/PreparationJson.d.ts +21 -0
  190. package/umd/typings/src/types/PipelineJson/PromptDialogJson.d.ts +2 -0
  191. package/umd/typings/src/types/PipelineJson/PromptTemplateJson.d.ts +1 -1
  192. package/umd/typings/src/types/PipelineJson/PromptTemplateJsonCommon.d.ts +8 -1
  193. package/umd/typings/src/types/PipelineJson/PromptTemplateParameterJson.d.ts +11 -2
  194. package/umd/typings/src/types/PipelineJson/ScriptJson.d.ts +2 -0
  195. package/umd/typings/src/types/PipelineJson/SimpleTemplateJson.d.ts +2 -0
  196. package/umd/typings/src/types/Prompt.d.ts +5 -2
  197. package/umd/typings/src/types/execution-report/ExecutionReportJson.d.ts +4 -4
  198. package/umd/typings/src/types/execution-report/ExecutionReportStringOptions.d.ts +3 -3
  199. package/umd/typings/src/types/typeAliases.d.ts +62 -14
  200. package/umd/typings/src/utils/FromtoItems.d.ts +3 -3
  201. package/umd/typings/src/utils/currentDate.d.ts +7 -0
  202. package/umd/typings/src/utils/markdown/addAutoGeneratedSection.d.ts +2 -2
  203. package/umd/typings/src/utils/markdown/createMarkdownChart.d.ts +6 -9
  204. package/umd/typings/src/utils/markdown/extractAllBlocksFromMarkdown-real.test.d.ts +1 -0
  205. package/umd/typings/src/utils/markdown/extractAllBlocksFromMarkdown.d.ts +9 -2
  206. package/umd/typings/src/utils/markdown/extractOneBlockFromMarkdown.d.ts +1 -1
  207. package/umd/typings/src/utils/markdown/parseMarkdownSection.d.ts +3 -3
  208. package/umd/typings/src/utils/organization/TODO.d.ts +4 -0
  209. package/umd/typings/src/utils/organization/TODO_USE.d.ts +11 -0
  210. package/umd/typings/src/utils/organization/___.d.ts +4 -0
  211. package/umd/typings/src/utils/organization/notUsing.d.ts +11 -0
  212. package/umd/typings/src/utils/organization/really_any.d.ts +4 -0
  213. package/umd/typings/src/utils/random/randomSeed.d.ts +7 -0
  214. package/esm/typings/src/collection/constructors/justTestFsImport.d.ts +0 -7
  215. package/esm/typings/src/personas/personaToModelRequirements.d.ts +0 -6
  216. package/esm/typings/src/types/PipelineJson/KnowledgeJson.d.ts +0 -6
  217. package/esm/typings/src/types/PipelineJson/MaterialKnowledgePieceJson.d.ts +0 -28
  218. package/umd/typings/src/collection/constructors/justTestFsImport.d.ts +0 -7
  219. package/umd/typings/src/personas/personaToModelRequirements.d.ts +0 -6
  220. package/umd/typings/src/types/PipelineJson/KnowledgeJson.d.ts +0 -6
  221. package/umd/typings/src/types/PipelineJson/MaterialKnowledgePieceJson.d.ts +0 -28
  222. /package/esm/typings/src/_packages/{markdown-utils.d.ts → markdown-utils.index.d.ts} +0 -0
  223. /package/esm/typings/src/utils/{just.d.ts → organization/just.d.ts} +0 -0
  224. /package/umd/typings/src/_packages/{markdown-utils.d.ts → markdown-utils.index.d.ts} +0 -0
  225. /package/umd/typings/src/utils/{just.d.ts → organization/just.d.ts} +0 -0
@@ -29,6 +29,6 @@ export declare class MockedEchoLlmExecutionTools implements LlmExecutionTools {
29
29
  listModels(): Array<AvailableModel>;
30
30
  }
31
31
  /**
32
- * TODO: [🕵️‍♀️] Maybe just remove
32
+ * TODO: !!! Use here `seed`
33
33
  * TODO: Allow in spaceTrim: nesting with > ${block(prompt.request)}, same as replace params
34
34
  */
@@ -34,5 +34,5 @@ export declare class MockedFackedLlmExecutionTools implements LlmExecutionTools
34
34
  listModels(): Array<AvailableModel>;
35
35
  }
36
36
  /**
37
- * TODO: [🕵️‍♀️] Maybe just remove
37
+ * TODO: !!! Use here `seed`
38
38
  */
@@ -41,10 +41,12 @@ export declare class MultipleLlmExecutionTools implements LlmExecutionTools {
41
41
  private callModelCommon;
42
42
  /**
43
43
  * List all available models that can be used
44
- * This liost is a combination of all available models from all execution tools
44
+ * This lists is a combination of all available models from all execution tools
45
45
  */
46
46
  listModels(): Promise<Array<AvailableModel>>;
47
47
  }
48
48
  /**
49
49
  * TODO: [🧠][🎛] Aggregating multiple models - have result not only from one first aviable model BUT all of them
50
+ * TODO: [🏖] If no llmTools have for example not defined `callCompletionModel` this will still return object with defined `callCompletionModel` which just throws `PipelineExecutionError`, make it undefined instead
51
+ * Look how `countTotalUsage` (and `cacheLlmTools`) implements it
50
52
  */
@@ -2,7 +2,7 @@ import type { ClientOptions } from 'openai';
2
2
  import type { CommonExecutionToolsOptions } from '../../execution/CommonExecutionToolsOptions';
3
3
  import type { string_token } from '../../types/typeAliases';
4
4
  /**
5
- * Options for OpenAiExecutionTools
5
+ * Options for `OpenAiExecutionTools`
6
6
  *
7
7
  * This extends OpenAI's `ClientOptions` with are directly passed to the OpenAI client.
8
8
  * Rest is used by the `OpenAiExecutionTools`.
@@ -10,8 +10,8 @@ import type { number_usd } from '../../types/typeAliases';
10
10
  */
11
11
  export declare const OPENAI_MODELS: Array<AvailableModel & {
12
12
  pricing?: {
13
- prompt: number_usd;
14
- output: number_usd;
13
+ readonly prompt: number_usd;
14
+ readonly output: number_usd;
15
15
  };
16
16
  }>;
17
17
  /**
@@ -24,4 +24,5 @@ export declare const OPENAI_MODELS: Array<AvailableModel & {
24
24
  * @see /other/playground/playground.ts
25
25
  * TODO: [🍓] Make better
26
26
  * TODO: Change model titles to human eg: "gpt-4-turbo-2024-04-09" -> "GPT-4 Turbo (2024-04-09)"
27
+ * TODO: [🚸] Not all models are compatible with JSON mode, add this information here and use it
27
28
  */
@@ -1,2 +1,5 @@
1
1
  #!/usr/bin/env ts-node
2
2
  export {};
3
+ /**
4
+ * TODO: !!! Test here that `systemMessage`, `temperature` and `seed` are working correctly
5
+ */
@@ -2,7 +2,7 @@ import type { CommonExecutionToolsOptions } from '../../execution/CommonExecutio
2
2
  import type { client_id } from '../../types/typeAliases';
3
3
  import type { string_uri } from '../../types/typeAliases';
4
4
  /**
5
- * Options for RemoteLlmExecutionTools
5
+ * Options for `RemoteLlmExecutionTools`
6
6
  */
7
7
  export type RemoteLlmExecutionToolsOptions = CommonExecutionToolsOptions & {
8
8
  /**
@@ -0,0 +1,29 @@
1
+ import type { PromptResult } from '../../../execution/PromptResult';
2
+ import type { Prompt } from '../../../types/Prompt';
3
+ import type { string_date_iso8601 } from '../../../types/typeAliases';
4
+ import type { string_promptbook_version } from '../../../version';
5
+ /**
6
+ * @@@
7
+ */
8
+ export type CacheItem = {
9
+ /**
10
+ * @@@
11
+ */
12
+ date: string_date_iso8601;
13
+ /**
14
+ * @@@
15
+ */
16
+ promptbookVersion: string_promptbook_version;
17
+ /**
18
+ * @@@
19
+ */
20
+ prompt: Prompt;
21
+ /**
22
+ * @@@
23
+ */
24
+ promptResult: PromptResult;
25
+ };
26
+ /**
27
+ * TODO: [🧠] Should be this exported alongsite `cacheLlmTools` through `@promptbook/utils` OR through `@promptbook/types`
28
+ * TODO: [🛫] `prompt` is NOT fully serializable as JSON, it contains functions which are not serializable, fix it
29
+ */
@@ -0,0 +1,10 @@
1
+ import type { PromptbookStorage } from '../../../storage/_common/PromptbookStorage';
2
+ import type { CacheItem } from './CacheItem';
3
+ export type CacheLlmToolsOptions = {
4
+ /**
5
+ * Total cost of the execution
6
+ *
7
+ * @default MemoryStorage
8
+ */
9
+ storage: PromptbookStorage<CacheItem>;
10
+ };
@@ -0,0 +1,17 @@
1
+ import type { LlmExecutionTools } from '../../../execution/LlmExecutionTools';
2
+ import type { CacheLlmToolsOptions } from './CacheLlmToolsOptions';
3
+ /**
4
+ * Intercepts LLM tools and counts total usage of the tools
5
+ *
6
+ * @param llmTools LLM tools to be intercepted with usage counting
7
+ * @returns LLM tools with same functionality with added total cost counting
8
+ */
9
+ export declare function cacheLlmTools(llmTools: LlmExecutionTools, options?: Partial<CacheLlmToolsOptions>): LlmExecutionTools;
10
+ /**
11
+ * TODO: !!!!! Export this util
12
+ * TODO: !!!!! Use this for tests in promptbook project itself
13
+ * TODO: !!!! write discussion about this and storages
14
+ * write how to combine multiple interceptors
15
+ * TODO: [🧠][💸] Maybe make some common abstraction `interceptLlmTools` and use here (or use javascript Proxy?)
16
+ * TODO: [🧠] Is there some meaningfull way how to test this util
17
+ */
@@ -0,0 +1,11 @@
1
+ import type { LlmExecutionTools } from '../../../execution/LlmExecutionTools';
2
+ import type { PromptResultUsage } from '../../../execution/PromptResult';
3
+ /**
4
+ * LLM tools with option to get total cost of the execution
5
+ */
6
+ export type LlmExecutionToolsWithTotalCost = LlmExecutionTools & {
7
+ /**
8
+ * Total cost of the execution
9
+ */
10
+ totalUsage: PromptResultUsage;
11
+ };
@@ -0,0 +1,14 @@
1
+ import type { LlmExecutionTools } from '../../../execution/LlmExecutionTools';
2
+ import type { LlmExecutionToolsWithTotalCost } from './LlmExecutionToolsWithTotalCost';
3
+ /**
4
+ * Intercepts LLM tools and counts total usage of the tools
5
+ *
6
+ * @param llmTools LLM tools to be intercepted with usage counting
7
+ * @returns LLM tools with same functionality with added total cost counting
8
+ */
9
+ export declare function countTotalUsage(llmTools: LlmExecutionTools): LlmExecutionToolsWithTotalCost;
10
+ /**
11
+ * TODO: !!!!! Export this utils
12
+ * TODO: [🧠][💸] Maybe make some common abstraction `interceptLlmTools` and use here (or use javascript Proxy?)
13
+ * TODO: [🧠] Is there some meaningfull way how to test this util
14
+ */
@@ -0,0 +1,21 @@
1
+ import type { LlmExecutionTools } from '../../execution/LlmExecutionTools';
2
+ /**
3
+ * @@@
4
+ *
5
+ * Note: This function is not cached, every call creates new instance of LlmExecutionTools
6
+ *
7
+ * It looks for environment variables:
8
+ * - `process.env.OPENAI_API_KEY`
9
+ * - `process.env.ANTHROPIC_CLAUDE_API_KEY`
10
+ *
11
+ * @returns @@@
12
+ */
13
+ export declare function createLlmToolsFromEnv(): LlmExecutionTools;
14
+ /**
15
+ * TODO: !!!!! Export this util
16
+ * TODO: !!!! write discussion about this - wizzard
17
+ * TODO: Add Azure
18
+ * TODO: [🧠] Which name is better `createLlmToolsFromEnv` or `createLlmToolsFromEnvironment`?
19
+ * TODO: [🧠] Is there some meaningfull way how to test this util
20
+ * TODO: [🧠] Maybe pass env as argument
21
+ */
@@ -0,0 +1,10 @@
1
+ import type { PrepareOptions } from '../prepare/PrepareOptions';
2
+ import type { PersonaPreparedJson } from '../types/PipelineJson/PersonaJson';
3
+ import type { string_persona_description } from '../types/typeAliases';
4
+ /**
5
+ * Prepares the persona for the pipeline
6
+ *
7
+ * @see https://github.com/webgptorg/promptbook/discussions/22
8
+ * @private within the package
9
+ */
10
+ export declare function preparePersona(personaDescription: string_persona_description, options: PrepareOptions): Promise<PersonaPreparedJson['modelRequirements']>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,22 @@
1
+ import type { LlmExecutionTools } from '../execution/LlmExecutionTools';
2
+ /**
3
+ * Options for preparation of the pipeline
4
+ */
5
+ export type PrepareOptions = {
6
+ /**
7
+ * LLM tools
8
+ */
9
+ readonly llmTools: LlmExecutionTools;
10
+ /**
11
+ * Maximum number of tasks running in parallel
12
+ *
13
+ * @default MAX_PARALLEL_COUNT
14
+ */
15
+ readonly maxParallelCount?: number;
16
+ /**
17
+ * If true, the preparation logs additional information
18
+ *
19
+ * @default false
20
+ */
21
+ readonly isVerbose?: boolean;
22
+ };
@@ -0,0 +1,16 @@
1
+ import type { PipelineJson } from '../types/PipelineJson/PipelineJson';
2
+ import type { PrepareOptions } from './PrepareOptions';
3
+ /**
4
+ * Prepare pipeline from string (markdown) format to JSON format
5
+ *
6
+ * Note: This function does not validate logic of the pipeline
7
+ * Note: This function acts as part of compilation process
8
+ */
9
+ export declare function preparePipeline(pipeline: PipelineJson, options: PrepareOptions): Promise<PipelineJson>;
10
+ /**
11
+ * TODO: Write tests for `preparePipeline`
12
+ * TODO: [🏏] Leverage the batch API and build queues @see https://platform.openai.com/docs/guides/batch
13
+ * TODO: [🧊] In future one preparation can take data from previous preparation and save tokens and time
14
+ * TODO: !!!!! Use here countTotalUsage
15
+ * TODO: [🛠] Actions, instruments (and maybe knowledge) => Functions and tools
16
+ */
@@ -0,0 +1,8 @@
1
+ import type { PipelineJson } from '../types/PipelineJson/PipelineJson';
2
+ /**
3
+ * Unprepare just strips the preparation data of the pipeline
4
+ */
5
+ export declare function unpreparePipeline(pipeline: PipelineJson): PipelineJson;
6
+ /**
7
+ * TODO: Write tests for `preparePipeline`
8
+ */
@@ -2,7 +2,7 @@ import type { Promisable } from 'type-fest';
2
2
  import type { CommonExecutionToolsOptions } from '../../execution/CommonExecutionToolsOptions';
3
3
  import type { string_javascript_name } from '../../types/typeAliases';
4
4
  /**
5
- * Options for javascript execution
5
+ * Options for `JavascriptExecutionTools`
6
6
  */
7
7
  export type JavascriptExecutionToolsOptions = CommonExecutionToolsOptions & {
8
8
  /**
@@ -1,4 +1,4 @@
1
- import type { really_any } from '../../../types/typeAliases';
1
+ import type { really_any } from '../../../utils/organization/really_any';
2
2
  /**
3
3
  * Does nothing, but preserves the function in the bundle
4
4
  * Compiler is tricked into thinking the function is used
@@ -0,0 +1,24 @@
1
+ import { Promisable } from 'type-fest';
2
+ /**
3
+ * Storage of objects with asynchronous API
4
+ *
5
+ * Note: Naming `PromptbookStorage` not `Storage` to avoid name collision with global `Storage` interface.
6
+ * Note: This is simmilar to Web Storage API interface but everything is asynchronous and can store JSON objects.
7
+ */
8
+ export type PromptbookStorage<TItem> = {
9
+ /**
10
+ * Returns the current value associated with the given key, or null if the given key does not exist in the list associated with the object
11
+ */
12
+ getItem(key: string): Promisable<TItem | null>;
13
+ /**
14
+ * Sets the value of the pair identified by key to value, creating a new key/value pair if none existed for key previously
15
+ */
16
+ setItem(key: string, value: TItem): Promisable<void>;
17
+ /**
18
+ * Removes the key/value pair with the given key from the list associated with the object, if a key/value pair with the given key exists
19
+ */
20
+ removeItem(key: string): Promisable<void>;
21
+ };
22
+ /**
23
+ * TODO: [🧠][🛫] Constrain `TItem` to JSON-serializable objects only
24
+ */
@@ -0,0 +1,5 @@
1
+ export {};
2
+ /**
3
+ * TODO: !!!!! Check that this files is not exported into build
4
+ * TODO: Is this a good pattern to do type testing?
5
+ */
@@ -0,0 +1,28 @@
1
+ import type { PromptbookStorage } from '../_common/PromptbookStorage';
2
+ import type { FilesStorageOptions } from './FilesStorageOptions';
3
+ /**
4
+ * @@@
5
+ */
6
+ export declare class FilesStorage<TItem> implements PromptbookStorage<TItem> {
7
+ private readonly options;
8
+ constructor(options: FilesStorageOptions);
9
+ /**
10
+ * @@@
11
+ */
12
+ private getFilenameForKey;
13
+ /**
14
+ * @@@ Returns the current value associated with the given key, or null if the given key does not exist in the list associated with the object.
15
+ */
16
+ getItem(key: string): Promise<TItem | null>;
17
+ /**
18
+ * @@@ Sets the value of the pair identified by key to value, creating a new key/value pair if none existed for key previously.
19
+ */
20
+ setItem(key: string, value: TItem): Promise<void>;
21
+ /**
22
+ * @@@ Removes the key/value pair with the given key from the list associated with the object, if a key/value pair with the given key exists.
23
+ */
24
+ removeItem(key: string): Promise<void>;
25
+ }
26
+ /**
27
+ * TODO: [🌗] Maybe some checkers, not all valid JSONs are desired and valid values
28
+ */
@@ -0,0 +1,10 @@
1
+ import type { string_folder_path } from '../../types/typeAliases';
2
+ /**
3
+ * @@@
4
+ */
5
+ export type FilesStorageOptions = {
6
+ /**
7
+ * @@@
8
+ */
9
+ cacheFolderPath: string_folder_path;
10
+ };
@@ -0,0 +1,7 @@
1
+ import type { string_name } from '../../../types/typeAliases';
2
+ /**
3
+ * @@@
4
+ *
5
+ * @private for `FilesStorage`
6
+ */
7
+ export declare function nameToSubfolderPath(name: string_name): Array<string>;
@@ -0,0 +1,8 @@
1
+ import type { PromptbookStorage } from '../_common/PromptbookStorage';
2
+ /**
3
+ * Gets wrapper around `localStorage` object which can be used as `PromptbookStorage`
4
+ */
5
+ export declare function getLocalStorage<TItem>(): PromptbookStorage<TItem>;
6
+ /**
7
+ * Export through `@promptbook/browser`
8
+ */
@@ -0,0 +1,8 @@
1
+ import type { PromptbookStorage } from '../_common/PromptbookStorage';
2
+ /**
3
+ * Gets wrapper around `sessionStorage` object which can be used as `PromptbookStorage`
4
+ */
5
+ export declare function getSessionStorage<TItem>(): PromptbookStorage<TItem>;
6
+ /**
7
+ * Export through `@promptbook/browser`
8
+ */
@@ -0,0 +1,31 @@
1
+ import type { PromptbookStorage } from '../_common/PromptbookStorage';
2
+ /**
3
+ * Stores
4
+ */
5
+ export declare class MemoryStorage<TItem> implements PromptbookStorage<TItem> {
6
+ private storage;
7
+ /**
8
+ * Returns the number of key/value pairs currently present in the list associated with the object.
9
+ */
10
+ get length(): number;
11
+ /**
12
+ * Empties the list associated with the object of all key/value pairs, if there are any.
13
+ */
14
+ clear(): void;
15
+ /**
16
+ * Returns the current value associated with the given key, or null if the given key does not exist in the list associated with the object.
17
+ */
18
+ getItem(key: string): TItem | null;
19
+ /**
20
+ * Returns the name of the nth key in the list, or null if n is greater than or equal to the number of key/value pairs in the object.
21
+ */
22
+ key(index: number): string | null;
23
+ /**
24
+ * Sets the value of the pair identified by key to value, creating a new key/value pair if none existed for key previously.
25
+ */
26
+ setItem(key: string, value: TItem): void;
27
+ /**
28
+ * Removes the key/value pair with the given key from the list associated with the object, if a key/value pair with the given key exists.
29
+ */
30
+ removeItem(key: string): void;
31
+ }
@@ -0,0 +1,23 @@
1
+ import { Promisable } from 'type-fest';
2
+ import type { PromptbookStorage } from '../_common/PromptbookStorage';
3
+ /**
4
+ * This class behaves like LocalStorage but separates keys by prefix
5
+ */
6
+ export declare class PrefixStorage<TItem> implements PromptbookStorage<TItem> {
7
+ private baseStorage;
8
+ private keyPrefix;
9
+ private separator;
10
+ constructor(baseStorage: PromptbookStorage<TItem>, keyPrefix: string, separator?: string);
11
+ /**
12
+ * Returns the current value associated with the given key, or null if the given key does not exist in the list associated with the object.
13
+ */
14
+ getItem(key: string): Promisable<TItem | null>;
15
+ /**
16
+ * Sets the value of the pair identified by key to value, creating a new key/value pair if none existed for key previously.
17
+ */
18
+ setItem(key: string, value: TItem): Promisable<void>;
19
+ /**
20
+ * Removes the key/value pair with the given key from the list associated with the object, if a key/value pair with the given key exists.
21
+ */
22
+ removeItem(key: string): void;
23
+ }
@@ -0,0 +1,12 @@
1
+ import type { PromptbookStorage } from '../_common/PromptbookStorage';
2
+ /**
3
+ * @@@
4
+ *
5
+ * @private for `getLocalStorage` and `getSessionStorage`
6
+ */
7
+ export declare function makePromptbookStorageFromWebStorage<TValue>(webStorage: Storage): PromptbookStorage<TValue>;
8
+ /**
9
+ * TODO: !!!! Export through `@promptbook/browser`
10
+ * TODO: [🧠] Should this be named `makePromptbookStorageFromWebStorage` vs `createPromptbookStorageFromWebStorage`
11
+ * TODO: [🌗] Maybe some checkers, not all valid JSONs are desired and valid values
12
+ */
@@ -1,4 +1,7 @@
1
+ import type { number_model_temperature } from './typeAliases';
2
+ import type { number_seed } from './typeAliases';
1
3
  import type { string_model_name } from './typeAliases';
4
+ import type { string_system_message } from './typeAliases';
2
5
  export declare const MODEL_VARIANTS: readonly ["COMPLETION", "CHAT", "EMBEDDING"];
3
6
  /**
4
7
  * Model variant describes the very general type of the model
@@ -31,13 +34,31 @@ export type ModelRequirements = {
31
34
  * @example 'gpt-4', 'gpt-4-32k-0314', 'gpt-3.5-turbo-instruct',...
32
35
  */
33
36
  readonly modelName?: string_model_name;
37
+ /**
38
+ * System message to be used in the model
39
+ */
40
+ readonly systemMessage?: string_system_message;
41
+ /**
42
+ * The temperature of the model
43
+ *
44
+ * Note: [💱] Promptbook is using just `temperature` (not `top_k` and `top_p`)
45
+ */
46
+ readonly temperature?: number_model_temperature;
47
+ /**
48
+ * Seed for the model
49
+ */
50
+ readonly seed?: number_seed;
34
51
  /**
35
52
  * Maximum number of tokens that can be generated by the model
36
53
  */
37
54
  readonly maxTokens?: number;
38
55
  };
39
56
  /**
57
+ * TODO: [🈁] `seed` should maybe be somewhere else (not in `ModelRequirements`) (simmilar that `user` identification is not here)
58
+ * TODO: [🧠][💱] Add more model options: `stop_token`, `logit_bias`, `logprobs` (`top_logprobs`), `top_k`, `top_p`, `presence_penalty`, `frequency_penalty`, `bestOf`, `logitBias`, `logitBiasType`,...
59
+ * [💱] Probbably keep using just `temperature` in Promptbook (not `top_k` and `top_p`)
60
+ * TODO: [🛠] Actions, instruments (and maybe knowledge) => Functions and tools
40
61
  * TODO: Maybe figure out better word than "variant"
41
62
  * TODO: Add here more requirement options like max context size, max tokens, etc.
42
- * TODO: [👙][🧠] Just selecting gpt3 or gpt4 level of model
63
+ * TODO: [💕][🧠] Just selecting gpt3 or gpt4 level of model
43
64
  */
@@ -6,21 +6,25 @@ import type { number_positive } from '../typeAliases';
6
6
  * For example 5 words, 3 sentences, 2 paragraphs, ...
7
7
  *
8
8
  * Note: Expectations are performed after all postprocessing steps
9
+ * @see https://github.com/webgptorg/promptbook/discussions/30
9
10
  */
10
11
  export type Expectations = Partial<Record<Lowercase<ExpectationUnit>, {
11
- min?: ExpectationAmount;
12
- max?: ExpectationAmount;
12
+ readonly min?: ExpectationAmount;
13
+ readonly max?: ExpectationAmount;
13
14
  }>>;
14
15
  /**
15
16
  * Units of text measurement
17
+ * @see https://github.com/webgptorg/promptbook/discussions/30
16
18
  */
17
19
  export declare const EXPECTATION_UNITS: readonly ["CHARACTERS", "WORDS", "SENTENCES", "LINES", "PARAGRAPHS", "PAGES"];
18
20
  /**
19
21
  * Unit of text measurement
22
+ * @see https://github.com/webgptorg/promptbook/discussions/30
20
23
  */
21
24
  export type ExpectationUnit = typeof EXPECTATION_UNITS[number];
22
25
  /**
23
26
  * Amount of text measurement
27
+ * @see https://github.com/webgptorg/promptbook/discussions/30
24
28
  */
25
29
  export type ExpectationAmount = number_integer & (number_positive | 0);
26
30
  /**
@@ -0,0 +1,67 @@
1
+ import type { EmbeddingVector } from '../../execution/EmbeddingVector';
2
+ import type { string_keyword } from '../../utils/normalization/IKeywords';
3
+ import type { number_id } from '../typeAliases';
4
+ import type { number_linecol_number } from '../typeAliases';
5
+ import type { string_markdown } from '../typeAliases';
6
+ import type { string_markdown_text } from '../typeAliases';
7
+ import type { string_model_name } from '../typeAliases';
8
+ import type { string_name } from '../typeAliases';
9
+ /**
10
+ * Defines one piece of knowledge in the pipeline
11
+ *
12
+ * Note: Knowledge piece is by definition prepared
13
+ *
14
+ * @see https://github.com/webgptorg/promptbook/discussions/41
15
+ */
16
+ export type KnowledgePiecePreparedJson = {
17
+ /**
18
+ * Unique name of the knowledge piece based on the title
19
+ */
20
+ readonly name?: string_name;
21
+ /**
22
+ * Short title for the information
23
+ */
24
+ readonly title?: string_markdown_text;
25
+ /**
26
+ * The information in markdown format
27
+ */
28
+ readonly content?: string_markdown;
29
+ /**
30
+ * List of sources where the information comes from
31
+ */
32
+ readonly sources: Array<{
33
+ /**
34
+ * Identifier of the source
35
+ */
36
+ readonly name: string_name;
37
+ /**
38
+ * Line number
39
+ */
40
+ readonly line?: number_linecol_number;
41
+ /**
42
+ * Column number
43
+ */
44
+ readonly column?: number_linecol_number;
45
+ }>;
46
+ /**
47
+ * List of keywords that are associated with the knowledge piece
48
+ */
49
+ readonly keywords: Array<string_keyword>;
50
+ /**
51
+ * List of models embeddings that are associated with the knowledge piece
52
+ */
53
+ readonly index: Array<{
54
+ /**
55
+ * Model name which generated the embedding
56
+ */
57
+ readonly modelName: string_model_name;
58
+ /**
59
+ * Embedding vector of the knowledge piece
60
+ */
61
+ readonly position: EmbeddingVector;
62
+ }>;
63
+ /**
64
+ * List of preparation ids that were used to prepare this knowledge piece
65
+ */
66
+ readonly preparationIds: Array<number_id>;
67
+ };
@@ -0,0 +1,24 @@
1
+ import type { number_id } from '../typeAliases';
2
+ import type { string_knowledge_source } from '../typeAliases';
3
+ import type { string_name } from '../typeAliases';
4
+ /**
5
+ * Defines one source of knowledge in the pipeline
6
+ * For example, a source of information, a fact, a quote, a definition, website, etc.
7
+ *
8
+ * @see https://github.com/webgptorg/promptbook/discussions/41
9
+ */
10
+ export type KnowledgeSourceJson = {
11
+ readonly name: string_name;
12
+ readonly source: string_knowledge_source;
13
+ };
14
+ /**
15
+ * Defines one source of knowledge in the pipeline after it has been prepared
16
+ *
17
+ * @see https://github.com/webgptorg/promptbook/discussions/41
18
+ */
19
+ export type KnowledgeSourcePreparedJson = KnowledgeSourceJson & {
20
+ /**
21
+ * List of preparation ids that were used to prepare this knowledge source to knowledge pieces
22
+ */
23
+ readonly preparationIds: Array<number_id>;
24
+ };
@@ -1,10 +1,15 @@
1
1
  import type { ModelRequirements } from '../ModelRequirements';
2
+ import type { string_name } from '../typeAliases';
2
3
  import type { PromptTemplateJsonCommon } from './PromptTemplateJsonCommon';
3
4
  /**
4
5
  * Template for prompt to LLM
5
6
  */
6
7
  export type LlmTemplateJson = PromptTemplateJsonCommon & {
7
8
  readonly blockType: 'PROMPT_TEMPLATE';
9
+ /**
10
+ * Name of the persona who will be responding to this prompt
11
+ */
12
+ readonly personaName: string_name | null;
8
13
  /**
9
14
  * Requirements for the model
10
15
  * - This is required only for blockType PROMPT_TEMPLATE
@@ -12,5 +17,7 @@ export type LlmTemplateJson = PromptTemplateJsonCommon & {
12
17
  readonly modelRequirements: ModelRequirements;
13
18
  };
14
19
  /**
15
- * TODO: [👙][🧠] Just selecting gpt3 or gpt4 level of modelT
20
+ * TODO: [👙][🧠] Maybe add `knowledge`, `actions` and `instruments` to be available granularly for each template
21
+ * @see https://github.com/webgptorg/promptbook/discussions/79
22
+ * TODO: [💕][🧠] Just selecting gpt3 or gpt4 level of model
16
23
  */