@promptbook/azure-openai 0.92.0-9 → 0.93.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 (206) hide show
  1. package/README.md +140 -88
  2. package/esm/index.es.js +47 -33
  3. package/esm/index.es.js.map +1 -1
  4. package/esm/typings/src/_packages/browser.index.d.ts +2 -0
  5. package/esm/typings/src/_packages/core.index.d.ts +26 -14
  6. package/esm/typings/src/_packages/types.index.d.ts +6 -2
  7. package/esm/typings/src/collection/PipelineCollection.d.ts +0 -2
  8. package/esm/typings/src/collection/SimplePipelineCollection.d.ts +1 -1
  9. package/esm/typings/src/commands/FOREACH/ForeachJson.d.ts +6 -6
  10. package/esm/typings/src/commands/FOREACH/foreachCommandParser.d.ts +0 -2
  11. package/esm/typings/src/commands/FORMFACTOR/formfactorCommandParser.d.ts +1 -1
  12. package/esm/typings/src/commands/_BOILERPLATE/boilerplateCommandParser.d.ts +1 -1
  13. package/esm/typings/src/commands/_common/types/CommandParser.d.ts +36 -28
  14. package/esm/typings/src/config.d.ts +41 -11
  15. package/esm/typings/src/constants.d.ts +43 -2
  16. package/esm/typings/src/conversion/parsePipeline.d.ts +2 -2
  17. package/esm/typings/src/errors/0-BoilerplateError.d.ts +2 -2
  18. package/esm/typings/src/errors/CollectionError.d.ts +1 -1
  19. package/esm/typings/src/executables/$provideExecutablesForNode.d.ts +1 -1
  20. package/esm/typings/src/executables/apps/locateLibreoffice.d.ts +2 -1
  21. package/esm/typings/src/executables/apps/locatePandoc.d.ts +2 -1
  22. package/esm/typings/src/executables/locateApp.d.ts +2 -2
  23. package/esm/typings/src/executables/platforms/locateAppOnLinux.d.ts +2 -1
  24. package/esm/typings/src/executables/platforms/locateAppOnMacOs.d.ts +2 -1
  25. package/esm/typings/src/executables/platforms/locateAppOnWindows.d.ts +2 -1
  26. package/esm/typings/src/execution/AbstractTaskResult.d.ts +1 -1
  27. package/esm/typings/src/execution/CommonToolsOptions.d.ts +3 -3
  28. package/esm/typings/src/execution/ExecutionTask.d.ts +19 -1
  29. package/esm/typings/src/execution/LlmExecutionToolsConstructor.d.ts +2 -1
  30. package/esm/typings/src/execution/PipelineExecutorResult.d.ts +4 -2
  31. package/esm/typings/src/execution/PromptbookFetch.d.ts +1 -1
  32. package/esm/typings/src/execution/ScriptExecutionTools.d.ts +1 -1
  33. package/esm/typings/src/execution/createPipelineExecutor/$OngoingTaskResult.d.ts +12 -9
  34. package/esm/typings/src/execution/createPipelineExecutor/10-executePipeline.d.ts +13 -10
  35. package/esm/typings/src/execution/createPipelineExecutor/20-executeTask.d.ts +12 -9
  36. package/esm/typings/src/execution/createPipelineExecutor/30-executeFormatSubvalues.d.ts +15 -3
  37. package/esm/typings/src/execution/createPipelineExecutor/40-executeAttempts.d.ts +21 -15
  38. package/esm/typings/src/execution/createPipelineExecutor/computeCosineSimilarity.d.ts +13 -0
  39. package/esm/typings/src/execution/createPipelineExecutor/filterJustOutputParameters.d.ts +7 -6
  40. package/esm/typings/src/execution/createPipelineExecutor/getContextForTask.d.ts +5 -1
  41. package/esm/typings/src/execution/createPipelineExecutor/getExamplesForTask.d.ts +1 -1
  42. package/esm/typings/src/execution/createPipelineExecutor/getKnowledgeForTask.d.ts +12 -9
  43. package/esm/typings/src/execution/createPipelineExecutor/getReservedParametersForTask.d.ts +18 -5
  44. package/esm/typings/src/execution/createPipelineExecutor/knowledgePiecesToString.d.ts +9 -0
  45. package/esm/typings/src/execution/execution-report/ExecutionReportJson.d.ts +1 -1
  46. package/esm/typings/src/execution/execution-report/ExecutionReportString.d.ts +1 -1
  47. package/esm/typings/src/execution/translation/automatic-translate/automatic-translators/LindatAutomaticTranslator.d.ts +4 -4
  48. package/esm/typings/src/execution/utils/checkExpectations.d.ts +3 -3
  49. package/esm/typings/src/execution/utils/uncertainNumber.d.ts +3 -2
  50. package/esm/typings/src/execution/utils/usageToWorktime.d.ts +1 -1
  51. package/esm/typings/src/formats/_common/{FormatDefinition.d.ts → FormatParser.d.ts} +8 -6
  52. package/esm/typings/src/formats/_common/FormatSubvalueParser.d.ts +66 -0
  53. package/esm/typings/src/formats/csv/CsvFormatParser.d.ts +17 -0
  54. package/esm/typings/src/formats/csv/CsvSettings.d.ts +2 -2
  55. package/esm/typings/src/formats/csv/utils/csvParse.d.ts +12 -0
  56. package/esm/typings/src/formats/csv/utils/isValidCsvString.d.ts +1 -1
  57. package/esm/typings/src/formats/index.d.ts +2 -2
  58. package/esm/typings/src/formats/json/JsonFormatParser.d.ts +19 -0
  59. package/esm/typings/src/formats/json/utils/isValidJsonString.d.ts +1 -1
  60. package/esm/typings/src/formats/json/utils/jsonParse.d.ts +0 -3
  61. package/esm/typings/src/formats/text/{TextFormatDefinition.d.ts → TextFormatParser.d.ts} +7 -7
  62. package/esm/typings/src/formats/xml/XmlFormatParser.d.ts +19 -0
  63. package/esm/typings/src/formats/xml/utils/isValidXmlString.d.ts +1 -1
  64. package/esm/typings/src/formfactors/_boilerplate/BoilerplateFormfactorDefinition.d.ts +3 -2
  65. package/esm/typings/src/formfactors/_common/AbstractFormfactorDefinition.d.ts +16 -7
  66. package/esm/typings/src/formfactors/_common/FormfactorDefinition.d.ts +3 -1
  67. package/esm/typings/src/formfactors/_common/string_formfactor_name.d.ts +2 -1
  68. package/esm/typings/src/formfactors/chatbot/ChatbotFormfactorDefinition.d.ts +2 -2
  69. package/esm/typings/src/formfactors/completion/CompletionFormfactorDefinition.d.ts +29 -0
  70. package/esm/typings/src/formfactors/generator/GeneratorFormfactorDefinition.d.ts +2 -1
  71. package/esm/typings/src/formfactors/generic/GenericFormfactorDefinition.d.ts +2 -2
  72. package/esm/typings/src/formfactors/index.d.ts +33 -8
  73. package/esm/typings/src/formfactors/matcher/MatcherFormfactorDefinition.d.ts +4 -2
  74. package/esm/typings/src/formfactors/sheets/SheetsFormfactorDefinition.d.ts +3 -2
  75. package/esm/typings/src/formfactors/translator/TranslatorFormfactorDefinition.d.ts +3 -2
  76. package/esm/typings/src/high-level-abstractions/index.d.ts +2 -2
  77. package/esm/typings/src/llm-providers/_common/register/$llmToolsMetadataRegister.d.ts +3 -3
  78. package/esm/typings/src/llm-providers/_common/register/$llmToolsRegister.d.ts +3 -3
  79. package/esm/typings/src/llm-providers/_common/register/$provideLlmToolsConfigurationFromEnv.d.ts +4 -4
  80. package/esm/typings/src/llm-providers/_common/register/$provideLlmToolsForTestingAndScriptsAndPlayground.d.ts +4 -3
  81. package/esm/typings/src/llm-providers/_common/register/$provideLlmToolsFromEnv.d.ts +18 -5
  82. package/esm/typings/src/llm-providers/_common/register/LlmToolsConfiguration.d.ts +11 -4
  83. package/esm/typings/src/llm-providers/_common/register/LlmToolsMetadata.d.ts +21 -42
  84. package/esm/typings/src/llm-providers/_common/register/LlmToolsOptions.d.ts +9 -2
  85. package/esm/typings/src/llm-providers/_common/register/createLlmToolsFromConfiguration.d.ts +13 -4
  86. package/esm/typings/src/llm-providers/_common/utils/cache/CacheItem.d.ts +10 -5
  87. package/esm/typings/src/llm-providers/_common/utils/cache/CacheLlmToolsOptions.d.ts +11 -3
  88. package/esm/typings/src/llm-providers/_common/utils/cache/cacheLlmTools.d.ts +3 -3
  89. package/esm/typings/src/llm-providers/_common/utils/count-total-usage/limitTotalUsage.d.ts +5 -5
  90. package/esm/typings/src/llm-providers/anthropic-claude/AnthropicClaudeExecutionTools.d.ts +6 -0
  91. package/esm/typings/src/llm-providers/anthropic-claude/anthropic-claude-models.d.ts +1 -1
  92. package/esm/typings/src/llm-providers/azure-openai/AzureOpenAiExecutionTools.d.ts +1 -1
  93. package/esm/typings/src/llm-providers/azure-openai/AzureOpenAiExecutionToolsOptions.d.ts +4 -4
  94. package/esm/typings/src/llm-providers/deepseek/deepseek-models.d.ts +1 -1
  95. package/esm/typings/src/llm-providers/google/google-models.d.ts +1 -1
  96. package/esm/typings/src/llm-providers/openai/OpenAiAssistantExecutionTools.d.ts +1 -1
  97. package/esm/typings/src/llm-providers/openai/openai-models.d.ts +1 -1
  98. package/esm/typings/src/llm-providers/openai/register-configuration.d.ts +2 -2
  99. package/esm/typings/src/llm-providers/openai/register-constructor.d.ts +2 -2
  100. package/esm/typings/src/migrations/migratePipeline.d.ts +9 -0
  101. package/esm/typings/src/other/templates/getBookTemplates.d.ts +2 -2
  102. package/esm/typings/src/pipeline/PipelineInterface/PipelineInterface.d.ts +3 -3
  103. package/esm/typings/src/pipeline/PipelineInterface/constants.d.ts +1 -1
  104. package/esm/typings/src/pipeline/PipelineInterface/getPipelineInterface.d.ts +1 -1
  105. package/esm/typings/src/pipeline/PipelineInterface/isPipelineImplementingInterface.d.ts +5 -4
  106. package/esm/typings/src/pipeline/PipelineInterface/isPipelineInterfacesEqual.d.ts +1 -1
  107. package/esm/typings/src/pipeline/PipelineJson/CommonTaskJson.d.ts +10 -7
  108. package/esm/typings/src/pipeline/PipelineJson/ParameterJson.d.ts +1 -1
  109. package/esm/typings/src/pipeline/PipelineJson/PipelineJson.d.ts +3 -2
  110. package/esm/typings/src/pipeline/PipelineString.d.ts +3 -1
  111. package/esm/typings/src/pipeline/book-notation.d.ts +2 -2
  112. package/esm/typings/src/postprocessing/utils/extractBlock.d.ts +1 -1
  113. package/esm/typings/src/postprocessing/utils/extractJsonBlock.d.ts +2 -2
  114. package/esm/typings/src/prepare/prepareTasks.d.ts +8 -5
  115. package/esm/typings/src/remote-server/openapi.d.ts +1 -1
  116. package/esm/typings/src/remote-server/socket-types/listModels/PromptbookServer_ListModels_Response.d.ts +1 -1
  117. package/esm/typings/src/remote-server/startRemoteServer.d.ts +1 -1
  118. package/esm/typings/src/remote-server/types/RemoteServerOptions.d.ts +7 -6
  119. package/esm/typings/src/scrapers/_boilerplate/BoilerplateScraper.d.ts +3 -3
  120. package/esm/typings/src/scrapers/_boilerplate/createBoilerplateScraper.d.ts +1 -1
  121. package/esm/typings/src/scrapers/_boilerplate/register-metadata.d.ts +1 -1
  122. package/esm/typings/src/scrapers/_common/Converter.d.ts +3 -1
  123. package/esm/typings/src/scrapers/_common/Scraper.d.ts +4 -3
  124. package/esm/typings/src/scrapers/_common/ScraperIntermediateSource.d.ts +4 -2
  125. package/esm/typings/src/scrapers/_common/prepareKnowledgePieces.d.ts +2 -2
  126. package/esm/typings/src/scrapers/_common/register/$provideFilesystemForNode.d.ts +2 -1
  127. package/esm/typings/src/scrapers/_common/register/$provideScrapersForBrowser.d.ts +6 -3
  128. package/esm/typings/src/scrapers/_common/register/$provideScrapersForNode.d.ts +3 -5
  129. package/esm/typings/src/scrapers/_common/register/$scrapersMetadataRegister.d.ts +3 -3
  130. package/esm/typings/src/scrapers/_common/register/$scrapersRegister.d.ts +3 -2
  131. package/esm/typings/src/scrapers/_common/register/ScraperAndConverterMetadata.d.ts +8 -5
  132. package/esm/typings/src/scrapers/_common/register/ScraperConstructor.d.ts +2 -1
  133. package/esm/typings/src/scrapers/_common/utils/getScraperIntermediateSource.d.ts +6 -5
  134. package/esm/typings/src/scrapers/_common/utils/makeKnowledgeSourceHandler.d.ts +3 -1
  135. package/esm/typings/src/scrapers/document/createDocumentScraper.d.ts +1 -1
  136. package/esm/typings/src/scrapers/document-legacy/createLegacyDocumentScraper.d.ts +2 -1
  137. package/esm/typings/src/scrapers/markdown/createMarkdownScraper.d.ts +4 -1
  138. package/esm/typings/src/scrapers/markitdown/MarkitdownScraper.d.ts +1 -1
  139. package/esm/typings/src/scrapers/pdf/createPdfScraper.d.ts +2 -1
  140. package/esm/typings/src/scrapers/website/createWebsiteScraper.d.ts +3 -4
  141. package/esm/typings/src/scripting/javascript/JavascriptExecutionTools.d.ts +1 -1
  142. package/esm/typings/src/scripting/javascript/postprocessing-functions.d.ts +5 -1
  143. package/esm/typings/src/scripting/javascript/utils/preserve.d.ts +1 -1
  144. package/esm/typings/src/storage/_common/PromptbookStorage.d.ts +1 -1
  145. package/esm/typings/src/storage/file-cache-storage/FileCacheStorage.d.ts +12 -5
  146. package/esm/typings/src/storage/file-cache-storage/FileCacheStorageOptions.d.ts +4 -2
  147. package/esm/typings/src/storage/file-cache-storage/utils/nameToSubfolderPath.d.ts +2 -1
  148. package/esm/typings/src/storage/local-storage/getIndexedDbStorage.d.ts +11 -0
  149. package/esm/typings/src/storage/local-storage/utils/IndexedDbStorageOptions.d.ts +14 -0
  150. package/esm/typings/src/storage/local-storage/utils/makePromptbookStorageFromIndexedDb.d.ts +8 -0
  151. package/esm/typings/src/storage/local-storage/utils/makePromptbookStorageFromWebStorage.d.ts +2 -1
  152. package/esm/typings/src/types/IntermediateFilesStrategy.d.ts +2 -1
  153. package/esm/typings/src/types/ModelRequirements.d.ts +2 -2
  154. package/esm/typings/src/types/ModelVariant.d.ts +5 -5
  155. package/esm/typings/src/types/typeAliases.d.ts +22 -19
  156. package/esm/typings/src/utils/$Register.d.ts +8 -7
  157. package/esm/typings/src/utils/editable/edit-pipeline-string/addPipelineCommand.d.ts +2 -2
  158. package/esm/typings/src/utils/editable/edit-pipeline-string/deflatePipeline.d.ts +4 -1
  159. package/esm/typings/src/utils/editable/utils/isFlatPipeline.d.ts +2 -1
  160. package/esm/typings/src/utils/editable/utils/stringifyPipelineJson.d.ts +1 -1
  161. package/esm/typings/src/utils/environment/$getGlobalScope.d.ts +2 -1
  162. package/esm/typings/src/utils/expectation-counters/index.d.ts +1 -1
  163. package/esm/typings/src/utils/markdown/extractAllBlocksFromMarkdown.d.ts +2 -2
  164. package/esm/typings/src/utils/markdown/extractAllListItemsFromMarkdown.d.ts +1 -1
  165. package/esm/typings/src/utils/markdown/extractOneBlockFromMarkdown.d.ts +2 -2
  166. package/esm/typings/src/utils/normalization/nameToUriPart.d.ts +4 -4
  167. package/esm/typings/src/utils/normalization/nameToUriParts.d.ts +4 -4
  168. package/esm/typings/src/utils/normalization/normalize-to-kebab-case.d.ts +3 -3
  169. package/esm/typings/src/utils/normalization/normalizeTo_SCREAMING_CASE.d.ts +3 -3
  170. package/esm/typings/src/utils/normalization/normalizeTo_camelCase.d.ts +4 -4
  171. package/esm/typings/src/utils/normalization/normalizeTo_snake_case.d.ts +3 -3
  172. package/esm/typings/src/utils/normalization/removeDiacritics.d.ts +3 -3
  173. package/esm/typings/src/utils/normalization/searchKeywords.d.ts +4 -1
  174. package/esm/typings/src/utils/normalization/titleToName.d.ts +4 -4
  175. package/esm/typings/src/utils/organization/TODO_USE.d.ts +1 -1
  176. package/esm/typings/src/utils/organization/empty_object.d.ts +2 -2
  177. package/esm/typings/src/utils/organization/just.d.ts +1 -1
  178. package/esm/typings/src/utils/organization/just_empty_object.d.ts +4 -4
  179. package/esm/typings/src/utils/organization/keepUnused.d.ts +1 -1
  180. package/esm/typings/src/utils/parameters/mapAvailableToExpectedParameters.d.ts +7 -7
  181. package/esm/typings/src/utils/removeQuotes.d.ts +2 -2
  182. package/esm/typings/src/utils/serialization/clonePipeline.d.ts +4 -3
  183. package/esm/typings/src/utils/serialization/deepClone.d.ts +5 -1
  184. package/esm/typings/src/utils/trimCodeBlock.d.ts +1 -1
  185. package/esm/typings/src/utils/trimEndOfCodeBlock.d.ts +1 -1
  186. package/esm/typings/src/utils/unwrapResult.d.ts +2 -2
  187. package/esm/typings/src/utils/validators/javascriptName/isValidJavascriptName.d.ts +3 -3
  188. package/esm/typings/src/utils/validators/parameterName/validateParameterName.d.ts +5 -4
  189. package/esm/typings/src/utils/validators/semanticVersion/isValidPromptbookVersion.d.ts +1 -1
  190. package/esm/typings/src/utils/validators/semanticVersion/isValidSemanticVersion.d.ts +1 -1
  191. package/esm/typings/src/utils/validators/url/isHostnameOnPrivateNetwork.d.ts +1 -1
  192. package/esm/typings/src/utils/validators/url/isUrlOnPrivateNetwork.d.ts +1 -1
  193. package/esm/typings/src/utils/validators/url/isValidPipelineUrl.d.ts +1 -1
  194. package/esm/typings/src/utils/validators/url/isValidUrl.d.ts +1 -1
  195. package/esm/typings/src/version.d.ts +2 -1
  196. package/esm/typings/src/wizzard/wizzard.d.ts +1 -1
  197. package/package.json +15 -3
  198. package/umd/index.umd.js +47 -33
  199. package/umd/index.umd.js.map +1 -1
  200. package/esm/typings/src/formats/_common/FormatSubvalueDefinition.d.ts +0 -31
  201. package/esm/typings/src/formats/csv/CsvFormatDefinition.d.ts +0 -17
  202. package/esm/typings/src/formats/json/JsonFormatDefinition.d.ts +0 -19
  203. package/esm/typings/src/formats/xml/XmlFormatDefinition.d.ts +0 -19
  204. /package/esm/typings/src/llm-providers/{multiple → _multiple}/MultipleLlmExecutionTools.d.ts +0 -0
  205. /package/esm/typings/src/llm-providers/{multiple → _multiple}/joinLlmExecutionTools.d.ts +0 -0
  206. /package/esm/typings/src/llm-providers/{multiple → _multiple}/playground/playground.d.ts +0 -0
package/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  <!-- ⚠️ WARNING: This code has been generated so that any manual changes will be overwritten -->
2
2
 
3
- # ✨ Promptbook
3
+ # ✨ Promptbook: AI apps in plain Language
4
+
5
+ Write AI applications using plain human language across multiple models and platforms.
4
6
 
5
7
 
6
8
 
@@ -8,24 +10,20 @@
8
10
  [![NPM Version of ![Promptbook logo - cube with letters P and B](./design/logo-h1.png) Promptbook](https://badge.fury.io/js/promptbook.svg)](https://www.npmjs.com/package/promptbook)
9
11
  [![Quality of package ![Promptbook logo - cube with letters P and B](./design/logo-h1.png) Promptbook](https://packagequality.com/shield/promptbook.svg)](https://packagequality.com/#?package=promptbook)
10
12
  [![Known Vulnerabilities](https://snyk.io/test/github/webgptorg/promptbook/badge.svg)](https://snyk.io/test/github/webgptorg/promptbook)
13
+ [![Build Status](https://github.com/webgptorg/promptbook/actions/workflows/ci.yml/badge.svg)](https://github.com/webgptorg/promptbook/actions)
14
+ [![Coverage Status](https://coveralls.io/repos/github/webgptorg/promptbook/badge.svg?branch=main)](https://coveralls.io/github/webgptorg/promptbook?branch=main)
11
15
  [![Issues](https://img.shields.io/github/issues/webgptorg/promptbook.svg?style=flat)](https://github.com/webgptorg/promptbook/issues)
12
16
 
13
17
 
14
18
 
15
-
16
-
17
19
  ## 🌟 New Features
18
20
 
19
- - 📂 We have plugin for [VSCode](https://github.com/webgptorg/book-extension) to support `.book` file extension
20
- - 🐳 Available [Docker image](https://hub.docker.com/r/hejny/promptbook/)
21
- - 💫 Support of [`o3-mini` model by OpenAI](https://openai.com/index/openai-o3-mini/)
22
- - 🐋 **Support of [DeepSeek models](https://www.npmjs.com/package/@promptbook/deepseek)**
23
-
21
+ - 💡 VS Code support for `.book` files with syntax highlighting and IntelliSense
22
+ - 🐳 Official Docker image (`hejny/promptbook`) for seamless containerized usage
23
+ - 🔥 Native support for OpenAI `o3-mini`, GPT-4 and other leading LLMs
24
+ - 🔍 DeepSeek integration for advanced knowledge search
24
25
 
25
26
 
26
- <blockquote style="color: #ff8811">
27
- <b>⚠ Warning:</b> This is a pre-release version of the library. It is not yet ready for production use. Please look at <a href="https://www.npmjs.com/package/@promptbook/core?activeTab=versions">latest stable release</a>.
28
- </blockquote>
29
27
 
30
28
  ## 📦 Package `@promptbook/azure-openai`
31
29
 
@@ -328,65 +326,92 @@ Hello world examples:
328
326
  - [Hello world in Node.js](https://github.com/webgptorg/hello-world-node-js)
329
327
  - [Hello world in Next.js](https://github.com/webgptorg/hello-world-next-js)
330
328
 
329
+ ### 🌐 Community & Social Media
331
330
 
331
+ Join our growing community of developers and users:
332
332
 
333
- We also have a community of developers and users of **Promptbook**:
334
-
335
- - [Discord community](https://discord.gg/x3QWNaa89N)
336
- - [Landing page `ptbk.io`](https://ptbk.io)
337
- - [Github discussions](https://github.com/webgptorg/promptbook/discussions)
338
- - [LinkedIn `Promptbook`](https://linkedin.com/company/promptbook)
339
- - [Facebook `Promptbook`](https://www.facebook.com/61560776453536)
340
-
341
- And **Promptbook.studio** branded socials:
342
-
343
-
344
-
345
- - [Instagram `@promptbook.studio`](https://www.instagram.com/promptbook.studio/)
346
-
347
- And **Promptujeme** sub-brand:
348
-
349
- _/Subbrand for Czech clients/_
350
-
351
-
333
+ <table>
334
+ <thead>
335
+ <tr>
336
+ <th>Platform</th>
337
+ <th>Description</th>
338
+ </tr>
339
+ </thead>
340
+ <tbody>
341
+ <tr>
342
+ <td><a href="https://discord.gg/x3QWNaa89N">💬 Discord</a></td>
343
+ <td>Join our active developer community for discussions and support</td>
344
+ </tr>
345
+ <tr>
346
+ <td><a href="https://github.com/webgptorg/promptbook/discussions">🗣️ GitHub Discussions</a></td>
347
+ <td>Technical discussions, feature requests, and community Q&A</td>
348
+ </tr>
349
+ <tr>
350
+ <td><a href="https://linkedin.com/company/promptbook">👔 LinkedIn</a></td>
351
+ <td>Professional updates and industry insights</td>
352
+ </tr>
353
+ <tr>
354
+ <td><a href="https://www.facebook.com/61560776453536">📱 Facebook</a></td>
355
+ <td>General announcements and community engagement</td>
356
+ </tr>
357
+ <tr>
358
+ <td><a href="https://ptbk.io">🔗 ptbk.io</a></td>
359
+ <td>Official landing page with project information</td>
360
+ </tr>
361
+ </tbody>
362
+ </table>
352
363
 
364
+ ### 🖼️ Product & Brand Channels
353
365
 
354
- - [Promptujeme.cz](https://www.promptujeme.cz/)
355
- - [Facebook `Promptujeme`](https://www.facebook.com/promptujeme/)
366
+ #### Promptbook.studio
356
367
 
357
- And **Promptbook.city** branded socials:
368
+ <table>
369
+ <tbody>
370
+ <tr>
371
+ <td><a href="https://www.instagram.com/promptbook.studio/">📸 Instagram @promptbook.studio</a></td>
372
+ <td>Visual updates, UI showcases, and design inspiration</td>
373
+ </tr>
374
+
375
+ </tbody>
376
+ </table>
358
377
 
359
- _/Sub-brand for images and graphics generated via Promptbook prompting/_
360
378
 
361
- - [Instagram `@promptbook.city`](https://www.instagram.com/promptbook.city/)
362
- - [Facebook `Promptbook City`](https://www.facebook.com/61565718625569)
363
379
 
364
380
 
365
381
 
366
382
 
383
+ ## 📘 Book Language Blueprint
367
384
 
385
+ _A concise, Markdown-based DSL for crafting AI workflows and automations._
368
386
 
369
- ## 💙 The Book language
387
+ ---
370
388
 
389
+ ### 📑 Table of Contents
371
390
 
391
+ - [Introduction](#introduction)
392
+ - [Example](#example)
393
+ - [1. What: Workflows, Tasks & Parameters](#1-what-workflows-tasks--parameters)
394
+ - [2. Who: Personas](#2-who-personas)
395
+ - [3. How: Knowledge, Instruments & Actions](#3-how-knowledge-instruments-and-actions)
396
+ - [General Principles](#general-principles)
372
397
 
373
- Following is the documentation and blueprint of the [Book language](https://github.com/webgptorg/book).
398
+ ### Introduction
374
399
 
375
- Book is a language that can be used to write AI applications, agents, workflows, automations, knowledgebases, translators, sheet processors, email automations and more. It allows you to harness the power of AI models in human-like terms, without the need to know the specifics and technicalities of the models.
400
+ Book is a Markdown-based language that simplifies the creation of AI applications, workflows, and automations. With human-readable commands, you can define inputs, outputs, personas, knowledge sources, and actions—without needing model-specific details.
376
401
 
377
402
  ### Example
378
403
 
379
- ```markdown
380
- # 🌟 My first Book
404
+ ```book
405
+ # 🌟 My First Book
381
406
 
382
407
  - BOOK VERSION 1.0.0
383
408
  - URL https://promptbook.studio/hello.book
384
409
  - INPUT PARAMETER {topic}
385
410
  - OUTPUT PARAMETER {article}
386
411
 
387
- # Write an article
412
+ # Write an Article
388
413
 
389
- - PERSONA Jane, marketing specialist with prior experience in writing articles about technology and artificial intelligence
414
+ - PERSONA Jane, marketing specialist with prior experience in tech and AI writing
390
415
  - KNOWLEDGE https://wikipedia.org/
391
416
  - KNOWLEDGE ./journalist-ethics.pdf
392
417
  - EXPECT MIN 1 Sentence
@@ -394,20 +419,20 @@ Book is a language that can be used to write AI applications, agents, workflows,
394
419
 
395
420
  > Write an article about {topic}
396
421
 
397
- -> {article}
422
+ {article}
398
423
  ```
399
424
 
400
425
  Each part of the book defines one of 3 circles:
401
426
 
402
- ### **What:** Workflows, Tasks and Parameters
427
+ ### **1. What:** Workflows, Tasks and Parameters
403
428
 
404
- What work needs to be done. Each book defines a [workflow *(scenario or pipeline)*](https://github.com/webgptorg/promptbook/discussions/88), which is one or more tasks. Each workflow has a fixed input and output. For example, you have a book that generates an article from a topic. Once it generates an article about AI, once about marketing, once about cooking. The workflow (= your AI program) is the same, only the input and output change.
429
+ What work needs to be done. Each book defines a [workflow _(scenario or pipeline)_](https://github.com/webgptorg/promptbook/discussions/88), which is one or more tasks. Each workflow has a fixed input and output. For example, you have a book that generates an article from a topic. Once it generates an article about AI, once about marketing, once about cooking. The workflow (= your AI program) is the same, only the input and output change.
405
430
 
406
431
  **Related commands:**
407
432
 
408
433
  - [PARAMETER](https://github.com/webgptorg/promptbook/blob/main/documents/commands/PARAMETER.md)
409
434
 
410
- ### **Who:** Personas
435
+ ### **2. Who:** Personas
411
436
 
412
437
  Who does the work. Each task is performed by a persona. A persona is a description of your virtual employee. It is a higher abstraction than the model, tokens, temperature, top-k, top-p and other model parameters.
413
438
 
@@ -421,7 +446,7 @@ Personas can have access to different knowledge, tools and actions. They can als
421
446
 
422
447
 
423
448
 
424
- ### **How:** Knowledge, Instruments and Actions
449
+ ### **3. How:** Knowledge, Instruments and Actions
425
450
 
426
451
  The resources used by the personas are used to do the work.
427
452
 
@@ -431,7 +456,7 @@ The resources used by the personas are used to do the work.
431
456
  - [INSTRUMENT](https://github.com/webgptorg/promptbook/blob/main/documents/commands/INSTRUMENT.md) for real-time data like time, location, weather, stock prices, searching the internet, calculations, etc.
432
457
  - [ACTION](https://github.com/webgptorg/promptbook/blob/main/documents/commands/ACTION.md) for actions like sending emails, creating files, ending a workflow, etc.
433
458
 
434
- ### General principles of book language
459
+ ### General Principles
435
460
 
436
461
  Book language is based on markdown. It is subset of markdown. It is designed to be easy to read and write. It is designed to be understandable by both humans and machines and without specific knowledge of the language.
437
462
 
@@ -445,6 +470,10 @@ But unlike programming languages, it is designed to be understandable by non-pro
445
470
 
446
471
 
447
472
 
473
+ ## 📚 Documentation
474
+
475
+ See detailed guides and API reference in the [docs](https://github.com/webgptorg/promptbook/discussions/categories/concepts) or [online](https://discord.gg/x3QWNaa89N).
476
+
448
477
  ## 🔒 Security
449
478
 
450
479
  For information on reporting security vulnerabilities, see our [Security Policy](./SECURITY.md).
@@ -488,7 +517,7 @@ Or you can install them separately:
488
517
  - **[@promptbook/legacy-documents](https://www.npmjs.com/package/@promptbook/legacy-documents)** - Read knowledge from legacy documents like `.doc`, `.rtf`,…
489
518
  - **[@promptbook/website-crawler](https://www.npmjs.com/package/@promptbook/website-crawler)** - Crawl knowledge from the web
490
519
  - **[@promptbook/editable](https://www.npmjs.com/package/@promptbook/editable)** - Editable book as native javascript object with imperative object API
491
- - **[@promptbook/templates](https://www.npmjs.com/package/@promptbook/templates)** - Usefull templates and examples of books which can be used as a starting point
520
+ - **[@promptbook/templates](https://www.npmjs.com/package/@promptbook/templates)** - Useful templates and examples of books which can be used as a starting point
492
521
  - **[@promptbook/types](https://www.npmjs.com/package/@promptbook/types)** - Just typescript types used in the library
493
522
  - ⭐ **[@promptbook/cli](https://www.npmjs.com/package/@promptbook/cli)** - Command line interface utilities for promptbooks
494
523
  - 🐋 **[Docker image](https://hub.docker.com/r/hejny/promptbook/)** - Promptbook server
@@ -525,25 +554,56 @@ _Note: This section is not complete dictionary, more list of general AI / LLM te
525
554
  - [🤼 Personas](https://github.com/webgptorg/promptbook/discussions/22)
526
555
  - [⭕ Parameters](https://github.com/webgptorg/promptbook/discussions/83)
527
556
  - [🚀 Pipeline execution](https://github.com/webgptorg/promptbook/discussions/84)
528
- - [🧪 Expectations](https://github.com/webgptorg/promptbook/discussions/30)
529
- - [✂️ Postprocessing](https://github.com/webgptorg/promptbook/discussions/31)
530
- - [🔣 Words not tokens](https://github.com/webgptorg/promptbook/discussions/29)
531
- - [☯ Separation of concerns](https://github.com/webgptorg/promptbook/discussions/32)
557
+ - [🧪 Expectations](https://github.com/webgptorg/promptbook/discussions/30) - Define what outputs should look like and how they're validated
558
+ - [✂️ Postprocessing](https://github.com/webgptorg/promptbook/discussions/31) - How outputs are refined after generation
559
+ - [🔣 Words not tokens](https://github.com/webgptorg/promptbook/discussions/29) - The human-friendly way to think about text generation
560
+ - [☯ Separation of concerns](https://github.com/webgptorg/promptbook/discussions/32) - How Book language organizes different aspects of AI workflows
532
561
 
533
- #### Advanced concepts
562
+ ### Advanced concepts
563
+
564
+ <table>
565
+ <tr>
566
+ <th>Data & Knowledge Management</th>
567
+ <th>Pipeline Control</th>
568
+ </tr>
569
+ <tr>
570
+ <td>
571
+ <ul>
572
+ <li><a href="https://github.com/webgptorg/promptbook/discussions/41">📚 Knowledge (RAG)</a> - Retrieve and use external information</li>
573
+ <li><a href="https://github.com/webgptorg/promptbook/discussions/54">📽 Media handling</a> - Working with images, audio, video, spreadsheets</li>
574
+ <li><a href="https://github.com/webgptorg/promptbook/discussions/40">🔴 Anomaly detection</a> - Identifying unusual patterns or outputs</li>
575
+ </ul>
576
+ </td>
577
+ <td>
578
+ <ul>
579
+ <li><a href="https://github.com/webgptorg/promptbook/discussions/89">🌏 Remote server</a> - Executing workflows on remote infrastructure</li>
580
+ <li><a href="https://github.com/webgptorg/promptbook/discussions/66">🃏 Jokers (conditions)</a> - Adding conditional logic to workflows</li>
581
+ <li><a href="https://github.com/webgptorg/promptbook/discussions/35">🔳 Metaprompting</a> - Creating prompts that generate other prompts</li>
582
+ </ul>
583
+ </td>
584
+ </tr>
585
+ <tr>
586
+ <th>Language & Output Control</th>
587
+ <th>Advanced Generation</th>
588
+ </tr>
589
+ <tr>
590
+ <td>
591
+ <ul>
592
+ <li><a href="https://github.com/webgptorg/promptbook/discussions/53">🌏 Linguistically typed languages</a> - Type systems for natural language</li>
593
+ <li><a href="https://github.com/webgptorg/promptbook/discussions/42">🌍 Auto-Translations</a> - Automatic multilingual support</li>
594
+ <li><a href="https://github.com/webgptorg/promptbook/discussions/39">👮 Agent adversary expectations</a> - Safety and control mechanisms</li>
595
+ </ul>
596
+ </td>
597
+ <td>
598
+ <ul>
599
+ <li><a href="https://github.com/webgptorg/promptbook/discussions/37">🔙 Expectation-aware generation</a> - Outputs that meet defined criteria</li>
600
+ <li><a href="https://github.com/webgptorg/promptbook/discussions/33">⏳ Just-in-time fine-tuning</a> - Dynamic model adaptation</li>
601
+ </ul>
602
+ </td>
603
+ </tr>
604
+ </table>
534
605
 
535
- - [📚 Knowledge (Retrieval-augmented generation)](https://github.com/webgptorg/promptbook/discussions/41)
536
- - [🌏 Remote server](https://github.com/webgptorg/promptbook/discussions/89)
537
- - [🃏 Jokers (conditions)](https://github.com/webgptorg/promptbook/discussions/66)
538
- - [🔳 Metaprompting](https://github.com/webgptorg/promptbook/discussions/35)
539
- - [🌏 Linguistically typed languages](https://github.com/webgptorg/promptbook/discussions/53)
540
- - [🌍 Auto-Translations](https://github.com/webgptorg/promptbook/discussions/42)
541
- - [📽 Images, audio, video, spreadsheets](https://github.com/webgptorg/promptbook/discussions/54)
542
- - [🔙 Expectation-aware generation](https://github.com/webgptorg/promptbook/discussions/37)
543
- - [⏳ Just-in-time fine-tuning](https://github.com/webgptorg/promptbook/discussions/33)
544
- - [🔴 Anomaly detection](https://github.com/webgptorg/promptbook/discussions/40)
545
- - [👮 Agent adversary expectations](https://github.com/webgptorg/promptbook/discussions/39)
546
- - [view more](https://github.com/webgptorg/promptbook/discussions/categories/concepts)
606
+ <p align="center"><a href="https://github.com/webgptorg/promptbook/discussions/categories/concepts">🔍 View more concepts</a></p>
547
607
 
548
608
 
549
609
 
@@ -598,36 +658,28 @@ If you have a question [start a discussion](https://github.com/webgptorg/promptb
598
658
  - [❔ Is Promptbook using RAG _(Retrieval-Augmented Generation)_?](https://github.com/webgptorg/promptbook/discussions/123)
599
659
  - [❔ Is Promptbook using function calling?](https://github.com/webgptorg/promptbook/discussions/124)
600
660
 
601
- ## Changelog
661
+ ## 📅 Changelog
602
662
 
603
663
  See [CHANGELOG.md](./CHANGELOG.md)
604
664
 
605
665
  ## 📜 License
606
666
 
607
- Promptbook project is under [BUSL 1.1 is an SPDX license](https://spdx.org/licenses/BUSL-1.1.html)
667
+ This project is licensed under [BUSL 1.1](./LICENSE.md).
608
668
 
609
- ## 🎯 Todos
669
+ ## 🤝 Contributing
610
670
 
611
- See [TODO.md](./TODO.md)
671
+ We welcome contributions! See [CONTRIBUTING.md](./CONTRIBUTING.md) for guidelines.
612
672
 
613
- ## 🤝 Partners
614
-
615
- <div style="display: flex; align-items: center; gap: 20px;">
616
-
617
- <a href="https://promptbook.studio/">
618
- <img src="./design/promptbook-studio-logo.png" alt="Partner 3" height="70">
619
- </a>
620
-
621
- <a href="https://technologickainkubace.org/en/about-technology-incubation/about-the-project/">
622
- <img src="./other/partners/CI-Technology-Incubation.png" alt="Technology Incubation" height="70">
623
- </a>
624
-
625
- </div>
673
+ You can also ⭐ star the project, [follow us on GitHub](https://github.com/hejny) or [various other social networks](https://www.pavolhejny.com/contact/).We are open to [pull requests, feedback, and suggestions](./CONTRIBUTING.md).
626
674
 
627
- ## 🖋️ Contributing
675
+ ## 🆘 Support & Community
628
676
 
629
- You can also star the project, [follow us on GitHub](https://github.com/hejny) or [various other social networks](https://www.pavolhejny.com/contact/).We are open to [pull requests, feedback, and suggestions](./CONTRIBUTING.md).
677
+ Need help with Book language? We're here for you!
630
678
 
631
- ## 📞 Support
679
+ - 💬 [Join our Discord community](https://discord.gg/x3QWNaa89N) for real-time support
680
+ - 📝 [Browse our GitHub discussions](https://github.com/webgptorg/promptbook/discussions) for FAQs and community knowledge
681
+ - 🐛 [Report issues](https://github.com/webgptorg/book/issues) for bugs or feature requests
682
+ - 📚 Visit [ptbk.io](https://ptbk.io) for more resources and documentation
683
+ - 📧 Contact us directly through the channels listed in our [signpost](./SIGNPOST.md)
632
684
 
633
- If you need help or have questions, please check our [Support Resources](./SUPPORT.md).
685
+ We welcome contributions and feedback to make Book language better for everyone!
package/esm/index.es.js CHANGED
@@ -18,7 +18,7 @@ const BOOK_LANGUAGE_VERSION = '1.0.0';
18
18
  * @generated
19
19
  * @see https://github.com/webgptorg/promptbook
20
20
  */
21
- const PROMPTBOOK_ENGINE_VERSION = '0.92.0-9';
21
+ const PROMPTBOOK_ENGINE_VERSION = '0.93.0';
22
22
  /**
23
23
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
24
24
  * Note: [💞] Ignore a discrepancy between file name and entity name
@@ -80,7 +80,7 @@ const SMALL_NUMBER = 0.001;
80
80
  const CONNECTION_TIMEOUT_MS = 7 * 1000;
81
81
  // <- TODO: [🧜‍♂️]
82
82
  /**
83
- * @@@
83
+ * Default settings for parsing and generating CSV files in Promptbook.
84
84
  *
85
85
  * @public exported from `@promptbook/core`
86
86
  */
@@ -90,6 +90,14 @@ Object.freeze({
90
90
  newline: '\n',
91
91
  skipEmptyLines: true,
92
92
  });
93
+ /**
94
+ * Default rate limits (requests per minute)
95
+ *
96
+ * Note: Adjust based on the provider tier you are have
97
+ *
98
+ * @public exported from `@promptbook/core`
99
+ */
100
+ const DEFAULT_MAX_REQUESTS_PER_MINUTE = 60;
93
101
  /**
94
102
  * Note: [💞] Ignore a discrepancy between file name and entity name
95
103
  * TODO: [🧠][🧜‍♂️] Maybe join remoteServerUrl and path into single value
@@ -121,7 +129,7 @@ class PipelineExecutionError extends Error {
121
129
  super(message);
122
130
  this.name = 'PipelineExecutionError';
123
131
  // TODO: [🐙] DRY - Maybe $randomId
124
- this.id = `error-${$randomToken(8 /* <- TODO: To global config + Use Base58 to avoid simmilar char conflicts */)}`;
132
+ this.id = `error-${$randomToken(8 /* <- TODO: To global config + Use Base58 to avoid similar char conflicts */)}`;
125
133
  Object.setPrototypeOf(this, PipelineExecutionError.prototype);
126
134
  }
127
135
  }
@@ -184,7 +192,7 @@ class UnexpectedError extends Error {
184
192
  ${block(message)}
185
193
 
186
194
  Note: This error should not happen.
187
- It's probbably a bug in the pipeline collection
195
+ It's probably a bug in the pipeline collection
188
196
 
189
197
  Please report issue:
190
198
  ${block(getErrorReportUrl(new Error(message)).href)}
@@ -540,10 +548,10 @@ for (let i = 0; i < defaultDiacriticsRemovalMap.length; i++) {
540
548
  */
541
549
 
542
550
  /**
543
- * @@@
551
+ * Removes diacritic marks (accents) from characters in a string.
544
552
  *
545
- * @param input @@@
546
- * @returns @@@
553
+ * @param input The string containing diacritics to be normalized.
554
+ * @returns The string with diacritics removed or normalized.
547
555
  * @public exported from `@promptbook/utils`
548
556
  */
549
557
  function removeDiacritics(input) {
@@ -689,14 +697,18 @@ $deepFreeze({
689
697
  /**
690
698
  * Make UncertainNumber
691
699
  *
692
- * @param value
700
+ * @param value value of the uncertain number, if `NaN` or `undefined`, it will be set to 0 and `isUncertain=true`
701
+ * @param isUncertain if `true`, the value is uncertain, otherwise depends on the value
693
702
  *
694
703
  * @private utility for initializating UncertainNumber
695
704
  */
696
- function uncertainNumber(value) {
705
+ function uncertainNumber(value, isUncertain) {
697
706
  if (value === null || value === undefined || Number.isNaN(value)) {
698
707
  return UNCERTAIN_ZERO_VALUE;
699
708
  }
709
+ if (isUncertain === true) {
710
+ return { value, isUncertain };
711
+ }
700
712
  return { value };
701
713
  }
702
714
 
@@ -914,8 +926,12 @@ function checkSerializableAsJson(options) {
914
926
  */
915
927
 
916
928
  /**
917
- * @@@
929
+ * Creates a deep clone of the given object
918
930
  *
931
+ * Note: This method only works for objects that are fully serializable to JSON and do not contain functions, Dates, or special types.
932
+ *
933
+ * @param objectValue The object to clone.
934
+ * @returns A deep, writable clone of the input object.
919
935
  * @public exported from `@promptbook/utils`
920
936
  */
921
937
  function deepClone(objectValue) {
@@ -977,13 +993,13 @@ function exportJson(options) {
977
993
  */
978
994
  const REPLACING_NONCE = 'ptbkauk42kV2dzao34faw7FudQUHYPtW';
979
995
  /**
980
- * @@@
996
+ * Placeholder value indicating a parameter is missing its value.
981
997
  *
982
998
  * @private within the repository
983
999
  */
984
1000
  const RESERVED_PARAMETER_MISSING_VALUE = 'MISSING-' + REPLACING_NONCE;
985
1001
  /**
986
- * @@@
1002
+ * Placeholder value indicating a parameter is restricted and cannot be used directly.
987
1003
  *
988
1004
  * @private within the repository
989
1005
  */
@@ -1190,7 +1206,7 @@ function computeUsage(value) {
1190
1206
  /**
1191
1207
  * List of available OpenAI models with pricing
1192
1208
  *
1193
- * Note: Done at 2024-05-20
1209
+ * Note: Done at 2025-05-06
1194
1210
  *
1195
1211
  * @see https://platform.openai.com/docs/models/
1196
1212
  * @see https://openai.com/api/pricing/
@@ -1451,7 +1467,7 @@ const OPENAI_MODELS = exportJson({
1451
1467
  modelName: 'text-embedding-3-large',
1452
1468
  modelDescription: "OpenAI's most capable text embedding model designed for high-quality embeddings for complex similarity tasks and information retrieval.",
1453
1469
  pricing: {
1454
- prompt: computeUsage(`$0.13 / 1M tokens`),
1470
+ prompt: computeUsage(`$0.13 / 1M tokens`),
1455
1471
  // TODO: [🏏] Leverage the batch API @see https://platform.openai.com/docs/guides/batch
1456
1472
  output: 0, // <- Note: [🆖] In Embedding models you dont pay for output
1457
1473
  },
@@ -1544,8 +1560,8 @@ const OPENAI_MODELS = exportJson({
1544
1560
  modelName: 'gpt-4o-mini',
1545
1561
  modelDescription: 'Smaller, more cost-effective version of GPT-4o with good performance across text, vision, and audio tasks at reduced complexity.',
1546
1562
  pricing: {
1547
- prompt: computeUsage(`$3.00 / 1M tokens`),
1548
- output: computeUsage(`$9.00 / 1M tokens`),
1563
+ prompt: computeUsage(`$0.15 / 1M tokens`),
1564
+ output: computeUsage(`$0.60 / 1M tokens`),
1549
1565
  },
1550
1566
  },
1551
1567
  /**/
@@ -1567,7 +1583,7 @@ const OPENAI_MODELS = exportJson({
1567
1583
  modelTitle: 'o1-preview-2024-09-12',
1568
1584
  modelName: 'o1-preview-2024-09-12',
1569
1585
  modelDescription: 'September 2024 version of O1 preview with specialized reasoning capabilities for complex tasks requiring precise analytical thinking.',
1570
- // <- TODO: [💩] Some better system to organize theese date suffixes and versions
1586
+ // <- TODO: [💩] Some better system to organize these date suffixes and versions
1571
1587
  pricing: {
1572
1588
  prompt: computeUsage(`$15.00 / 1M tokens`),
1573
1589
  output: computeUsage(`$60.00 / 1M tokens`),
@@ -1653,9 +1669,6 @@ const OPENAI_MODELS = exportJson({
1653
1669
  * Note: [💞] Ignore a discrepancy between file name and entity name
1654
1670
  */
1655
1671
 
1656
- // Default rate limits (requests per minute) - adjust as needed based on Azure OpenAI tier
1657
- const DEFAULT_RPM = 60;
1658
- // <- TODO: !!! Put in some better place
1659
1672
  /**
1660
1673
  * Execution Tools for calling Azure OpenAI API.
1661
1674
  *
@@ -1675,7 +1688,7 @@ class AzureOpenAiExecutionTools {
1675
1688
  this.client = null;
1676
1689
  // TODO: Allow configuring rate limits via options
1677
1690
  this.limiter = new Bottleneck({
1678
- minTime: 60000 / (this.options.maxRequestsPerMinute || DEFAULT_RPM),
1691
+ minTime: 60000 / (this.options.maxRequestsPerMinute || DEFAULT_MAX_REQUESTS_PER_MINUTE),
1679
1692
  });
1680
1693
  }
1681
1694
  get title() {
@@ -1929,7 +1942,7 @@ class AzureOpenAiExecutionTools {
1929
1942
  });
1930
1943
  }
1931
1944
  /**
1932
- * Changes Azure error (which is not propper Error but object) to propper Error
1945
+ * Changes Azure error (which is not proper Error but object) to proper Error
1933
1946
  */
1934
1947
  transformAzureError(azureError) {
1935
1948
  if (azureError instanceof UnexpectedError) {
@@ -1989,7 +2002,8 @@ class NotYetImplementedError extends Error {
1989
2002
  }
1990
2003
 
1991
2004
  /**
1992
- * @@@
2005
+ * Safely retrieves the global scope object (window in browser, global in Node.js)
2006
+ * regardless of the JavaScript environment in which the code is running
1993
2007
  *
1994
2008
  * Note: `$` is used to indicate that this function is not a pure function - it access global scope
1995
2009
  *
@@ -2000,10 +2014,10 @@ function $getGlobalScope() {
2000
2014
  }
2001
2015
 
2002
2016
  /**
2003
- * @@@
2017
+ * Normalizes a text string to SCREAMING_CASE (all uppercase with underscores).
2004
2018
  *
2005
- * @param text @@@
2006
- * @returns @@@
2019
+ * @param text The text string to be converted to SCREAMING_CASE format.
2020
+ * @returns The normalized text in SCREAMING_CASE format.
2007
2021
  * @example 'HELLO_WORLD'
2008
2022
  * @example 'I_LOVE_PROMPTBOOK'
2009
2023
  * @public exported from `@promptbook/utils`
@@ -2055,10 +2069,10 @@ function normalizeTo_SCREAMING_CASE(text) {
2055
2069
  */
2056
2070
 
2057
2071
  /**
2058
- * @@@
2072
+ * Normalizes a text string to snake_case format.
2059
2073
  *
2060
- * @param text @@@
2061
- * @returns @@@
2074
+ * @param text The text string to be converted to snake_case format.
2075
+ * @returns The normalized text in snake_case format.
2062
2076
  * @example 'hello_world'
2063
2077
  * @example 'i_love_promptbook'
2064
2078
  * @public exported from `@promptbook/utils`
@@ -2068,11 +2082,11 @@ function normalizeTo_snake_case(text) {
2068
2082
  }
2069
2083
 
2070
2084
  /**
2071
- * Register is @@@
2085
+ * Global registry for storing and managing registered entities of a given type.
2072
2086
  *
2073
2087
  * Note: `$` is used to indicate that this function is not a pure function - it accesses and adds variables in global scope.
2074
2088
  *
2075
- * @private internal utility, exported are only signleton instances of this class
2089
+ * @private internal utility, exported are only singleton instances of this class
2076
2090
  */
2077
2091
  class $Register {
2078
2092
  constructor(registerName) {
@@ -2116,10 +2130,10 @@ class $Register {
2116
2130
  }
2117
2131
 
2118
2132
  /**
2119
- * @@@
2133
+ * Register for LLM tools.
2120
2134
  *
2121
2135
  * Note: `$` is used to indicate that this interacts with the global scope
2122
- * @singleton Only one instance of each register is created per build, but thare can be more @@@
2136
+ * @singleton Only one instance of each register is created per build, but there can be more instances across different builds or environments.
2123
2137
  * @public exported from `@promptbook/core`
2124
2138
  */
2125
2139
  const $llmToolsRegister = new $Register('llm_execution_tools_constructors');