@promptbook/core 0.94.0 → 0.95.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 (61) hide show
  1. package/README.md +2 -10
  2. package/esm/index.es.js +63 -63
  3. package/esm/index.es.js.map +1 -1
  4. package/esm/typings/src/_packages/types.index.d.ts +2 -2
  5. package/esm/typings/src/_packages/{wizzard.index.d.ts → wizard.index.d.ts} +2 -2
  6. package/esm/typings/src/cli/cli-commands/prettify.d.ts +1 -1
  7. package/esm/typings/src/cli/cli-commands/test-command.d.ts +1 -1
  8. package/esm/typings/src/conversion/archive/loadArchive.d.ts +1 -1
  9. package/esm/typings/src/conversion/archive/saveArchive.d.ts +2 -2
  10. package/esm/typings/src/conversion/prettify/renderPipelineMermaidOptions.d.ts +1 -1
  11. package/esm/typings/src/dialogs/callback/CallbackInterfaceTools.d.ts +1 -1
  12. package/esm/typings/src/execution/AbstractTaskResult.d.ts +2 -2
  13. package/esm/typings/src/execution/createPipelineExecutor/00-CreatePipelineExecutorOptions.d.ts +1 -1
  14. package/esm/typings/src/execution/execution-report/ExecutionPromptReportJson.d.ts +2 -2
  15. package/esm/typings/src/execution/translation/automatic-translate/translateMessages.d.ts +1 -1
  16. package/esm/typings/src/llm-providers/_common/register/{$provideLlmToolsForWizzardOrCli.d.ts → $provideLlmToolsForWizardOrCli.d.ts} +2 -2
  17. package/esm/typings/src/llm-providers/anthropic-claude/register-configuration.d.ts +1 -1
  18. package/esm/typings/src/llm-providers/anthropic-claude/register-constructor.d.ts +1 -1
  19. package/esm/typings/src/llm-providers/azure-openai/register-configuration.d.ts +1 -1
  20. package/esm/typings/src/llm-providers/azure-openai/register-constructor.d.ts +1 -1
  21. package/esm/typings/src/llm-providers/deepseek/register-configuration.d.ts +1 -1
  22. package/esm/typings/src/llm-providers/deepseek/register-constructor.d.ts +1 -1
  23. package/esm/typings/src/llm-providers/google/register-configuration.d.ts +1 -1
  24. package/esm/typings/src/llm-providers/google/register-constructor.d.ts +1 -1
  25. package/esm/typings/src/llm-providers/ollama/register-configuration.d.ts +1 -1
  26. package/esm/typings/src/llm-providers/ollama/register-constructor.d.ts +1 -1
  27. package/esm/typings/src/llm-providers/openai/OpenAiAssistantExecutionTools.d.ts +1 -1
  28. package/esm/typings/src/llm-providers/openai/register-configuration.d.ts +2 -2
  29. package/esm/typings/src/llm-providers/openai/register-constructor.d.ts +2 -2
  30. package/esm/typings/src/remote-server/socket-types/listModels/PromptbookServer_ListModels_Request.d.ts +1 -1
  31. package/esm/typings/src/scrapers/_boilerplate/createBoilerplateScraper.d.ts +1 -1
  32. package/esm/typings/src/scrapers/_boilerplate/register-constructor.d.ts +1 -1
  33. package/esm/typings/src/scrapers/_boilerplate/register-metadata.d.ts +2 -2
  34. package/esm/typings/src/scrapers/_common/prepareKnowledgePieces.d.ts +1 -1
  35. package/esm/typings/src/scrapers/_common/register/ScraperAndConverterMetadata.d.ts +1 -1
  36. package/esm/typings/src/scrapers/document/createDocumentScraper.d.ts +1 -1
  37. package/esm/typings/src/scrapers/document/register-constructor.d.ts +1 -1
  38. package/esm/typings/src/scrapers/document/register-metadata.d.ts +2 -2
  39. package/esm/typings/src/scrapers/document-legacy/createLegacyDocumentScraper.d.ts +1 -1
  40. package/esm/typings/src/scrapers/document-legacy/register-constructor.d.ts +1 -1
  41. package/esm/typings/src/scrapers/document-legacy/register-metadata.d.ts +2 -2
  42. package/esm/typings/src/scrapers/markdown/createMarkdownScraper.d.ts +1 -4
  43. package/esm/typings/src/scrapers/markdown/register-constructor.d.ts +1 -1
  44. package/esm/typings/src/scrapers/markdown/register-metadata.d.ts +2 -2
  45. package/esm/typings/src/scrapers/markitdown/createMarkitdownScraper.d.ts +1 -1
  46. package/esm/typings/src/scrapers/markitdown/register-constructor.d.ts +1 -1
  47. package/esm/typings/src/scrapers/markitdown/register-metadata.d.ts +2 -2
  48. package/esm/typings/src/scrapers/pdf/createPdfScraper.d.ts +1 -1
  49. package/esm/typings/src/scrapers/pdf/register-constructor.d.ts +1 -1
  50. package/esm/typings/src/scrapers/pdf/register-metadata.d.ts +2 -2
  51. package/esm/typings/src/scrapers/website/createWebsiteScraper.d.ts +1 -1
  52. package/esm/typings/src/scrapers/website/register-constructor.d.ts +1 -1
  53. package/esm/typings/src/scrapers/website/register-metadata.d.ts +2 -2
  54. package/esm/typings/src/types/typeAliases.d.ts +1 -1
  55. package/esm/typings/src/utils/files/listAllFiles.d.ts +1 -1
  56. package/esm/typings/src/version.d.ts +1 -1
  57. package/esm/typings/src/{wizzard → wizard}/$getCompiledBook.d.ts +2 -2
  58. package/esm/typings/src/{wizzard/wizzard.d.ts → wizard/wizard.d.ts} +6 -6
  59. package/package.json +1 -13
  60. package/umd/index.umd.js +63 -63
  61. package/umd/index.umd.js.map +1 -1
package/README.md CHANGED
@@ -60,8 +60,6 @@ Rest of the documentation is common for **entire promptbook ecosystem**:
60
60
 
61
61
  During the computer revolution, we have seen [multiple generations of computer languages](https://github.com/webgptorg/promptbook/discussions/180), from the physical rewiring of the vacuum tubes through low-level machine code to the high-level languages like Python or JavaScript. And now, we're on the edge of the **next revolution**!
62
62
 
63
-
64
-
65
63
  It's a revolution of writing software in **plain human language** that is understandable and executable by both humans and machines – and it's going to change everything!
66
64
 
67
65
  The incredible growth in power of microprocessors and the Moore's Law have been the driving force behind the ever-more powerful languages, and it's been an amazing journey! Similarly, the large language models (like GPT or Claude) are the next big thing in language technology, and they're set to transform the way we interact with computers.
@@ -187,8 +185,6 @@ Join our growing community of developers and users:
187
185
 
188
186
  _A concise, Markdown-based DSL for crafting AI workflows and automations._
189
187
 
190
-
191
-
192
188
  ### Introduction
193
189
 
194
190
  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.
@@ -238,8 +234,6 @@ Personas can have access to different knowledge, tools and actions. They can als
238
234
 
239
235
  - [PERSONA](https://github.com/webgptorg/promptbook/blob/main/documents/commands/PERSONA.md)
240
236
 
241
-
242
-
243
237
  ### **3. How:** Knowledge, Instruments and Actions
244
238
 
245
239
  The resources used by the personas are used to do the work.
@@ -287,13 +281,13 @@ Or you can install them separately:
287
281
 
288
282
  - ⭐ **[ptbk](https://www.npmjs.com/package/ptbk)** - Bundle of all packages, when you want to install everything and you don't care about the size
289
283
  - **[promptbook](https://www.npmjs.com/package/promptbook)** - Same as `ptbk`
290
- - ⭐🧙‍♂️ **[@promptbook/wizzard](https://www.npmjs.com/package/@promptbook/wizzard)** - Wizzard to just run the books in node without any struggle
284
+ - ⭐🧙‍♂️ **[@promptbook/wizard](https://www.npmjs.com/package/@promptbook/wizard)** - Wizard to just run the books in node without any struggle
291
285
  - **[@promptbook/core](https://www.npmjs.com/package/@promptbook/core)** - Core of the library, it contains the main logic for promptbooks
292
286
  - **[@promptbook/node](https://www.npmjs.com/package/@promptbook/node)** - Core of the library for Node.js environment
293
287
  - **[@promptbook/browser](https://www.npmjs.com/package/@promptbook/browser)** - Core of the library for browser environment
294
288
  - ⭐ **[@promptbook/utils](https://www.npmjs.com/package/@promptbook/utils)** - Utility functions used in the library but also useful for individual use in preprocessing and postprocessing LLM inputs and outputs
295
289
  - **[@promptbook/markdown-utils](https://www.npmjs.com/package/@promptbook/markdown-utils)** - Utility functions used for processing markdown
296
- - _(Not finished)_ **[@promptbook/wizzard](https://www.npmjs.com/package/@promptbook/wizzard)** - Wizard for creating+running promptbooks in single line
290
+ - _(Not finished)_ **[@promptbook/wizard](https://www.npmjs.com/package/@promptbook/wizard)** - Wizard for creating+running promptbooks in single line
297
291
  - **[@promptbook/javascript](https://www.npmjs.com/package/@promptbook/javascript)** - Execution tools for javascript inside promptbooks
298
292
  - **[@promptbook/openai](https://www.npmjs.com/package/@promptbook/openai)** - Execution tools for OpenAI API, wrapper around OpenAI SDK
299
293
  - **[@promptbook/anthropic-claude](https://www.npmjs.com/package/@promptbook/anthropic-claude)** - Execution tools for Anthropic Claude API, wrapper around Anthropic Claude SDK
@@ -339,8 +333,6 @@ The following glossary is used to clarify certain concepts:
339
333
 
340
334
  _Note: This section is not a complete dictionary, more list of general AI / LLM terms that has connection with Promptbook_
341
335
 
342
-
343
-
344
336
  ### 💯 Core concepts
345
337
 
346
338
  - [📚 Collection of pipelines](https://github.com/webgptorg/promptbook/discussions/65)
package/esm/index.es.js CHANGED
@@ -27,7 +27,7 @@ const BOOK_LANGUAGE_VERSION = '1.0.0';
27
27
  * @generated
28
28
  * @see https://github.com/webgptorg/promptbook
29
29
  */
30
- const PROMPTBOOK_ENGINE_VERSION = '0.94.0';
30
+ const PROMPTBOOK_ENGINE_VERSION = '0.95.0';
31
31
  /**
32
32
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
33
33
  * Note: [💞] Ignore a discrepancy between file name and entity name
@@ -419,11 +419,11 @@ const PLAYGROUND_APP_ID = 'playground';
419
419
  /*
420
420
  TODO: [🌃]
421
421
  /**
422
- * Id of application for the wizzard when using remote server
422
+ * Id of application for the wizard when using remote server
423
423
  *
424
424
  * @public exported from `@promptbook/core`
425
425
  * /
426
- ex-port const WIZZARD_APP_ID: string_app_id = 'wizzard';
426
+ ex-port const WIZARD_APP_ID: string_app_id = 'wizard';
427
427
  */
428
428
  /**
429
429
  * The name of the builded pipeline collection made by CLI `ptbk make` and for lookup in `createCollectionFromDirectory`
@@ -700,7 +700,7 @@ function prettifyMarkdown(content) {
700
700
  });
701
701
  }
702
702
  catch (error) {
703
- // TODO: [🟥] Detect browser / node and make it colorfull
703
+ // TODO: [🟥] Detect browser / node and make it colorful
704
704
  console.error('There was an error with prettifying the markdown, using the original as the fallback', {
705
705
  error,
706
706
  html: content,
@@ -982,7 +982,7 @@ function checkSerializableAsJson(options) {
982
982
  else {
983
983
  for (const [subName, subValue] of Object.entries(value)) {
984
984
  if (subValue === undefined) {
985
- // Note: undefined in object is serializable - it is just omited
985
+ // Note: undefined in object is serializable - it is just omitted
986
986
  continue;
987
987
  }
988
988
  checkSerializableAsJson({ name: `${name}.${subName}`, value: subValue, message });
@@ -1708,7 +1708,7 @@ class SimplePipelineCollection {
1708
1708
 
1709
1709
  Note: You have probably forgotten to run "ptbk make" to update the collection
1710
1710
  Note: Pipelines with the same URL are not allowed
1711
- Only exepction is when the pipelines are identical
1711
+ Only exception is when the pipelines are identical
1712
1712
 
1713
1713
  `));
1714
1714
  }
@@ -1893,7 +1893,7 @@ function createSubcollection(collection, predicate) {
1893
1893
  };
1894
1894
  }
1895
1895
 
1896
- var PipelineCollection = [{title:"Prepare Knowledge from Markdown",pipelineUrl:"https://promptbook.studio/promptbook/prepare-knowledge-from-markdown.book",formfactorName:"GENERIC",parameters:[{name:"knowledgeContent",description:"Markdown document content",isInput:true,isOutput:false},{name:"knowledgePieces",description:"The knowledge JSON object",isInput:false,isOutput:true}],tasks:[{taskType:"PROMPT_TASK",name:"knowledge",title:"Knowledge",content:"You are experienced data researcher, extract the important knowledge from the document.\n\n# Rules\n\n- Make pieces of information concise, clear, and easy to understand\n- One piece of information should be approximately 1 paragraph\n- Divide the paragraphs by markdown horizontal lines ---\n- Omit irrelevant information\n- Group redundant information\n- Write just extracted information, nothing else\n\n# The document\n\nTake information from this document:\n\n> {knowledgeContent}",resultingParameterName:"knowledgePieces",dependentParameterNames:["knowledgeContent"]}],personas:[],preparations:[],knowledgeSources:[],knowledgePieces:[],sources:[{type:"BOOK",path:null,content:"# Prepare Knowledge from Markdown\n\n- PIPELINE URL `https://promptbook.studio/promptbook/prepare-knowledge-from-markdown.book`\n- INPUT PARAMETER `{knowledgeContent}` Markdown document content\n- OUTPUT PARAMETER `{knowledgePieces}` The knowledge JSON object\n\n## Knowledge\n\n<!-- TODO: [🍆] -FORMAT JSON -->\n\n```markdown\nYou are experienced data researcher, extract the important knowledge from the document.\n\n# Rules\n\n- Make pieces of information concise, clear, and easy to understand\n- One piece of information should be approximately 1 paragraph\n- Divide the paragraphs by markdown horizontal lines ---\n- Omit irrelevant information\n- Group redundant information\n- Write just extracted information, nothing else\n\n# The document\n\nTake information from this document:\n\n> {knowledgeContent}\n```\n\n`-> {knowledgePieces}`\n"}],sourceFile:"./books/prepare-knowledge-from-markdown.book"},{title:"Prepare Keywords",pipelineUrl:"https://promptbook.studio/promptbook/prepare-knowledge-keywords.book",formfactorName:"GENERIC",parameters:[{name:"knowledgePieceContent",description:"The content",isInput:true,isOutput:false},{name:"keywords",description:"Keywords separated by comma",isInput:false,isOutput:true}],tasks:[{taskType:"PROMPT_TASK",name:"knowledge",title:"Knowledge",content:"You are experienced data researcher, detect the important keywords in the document.\n\n# Rules\n\n- Write just keywords separated by comma\n\n# The document\n\nTake information from this document:\n\n> {knowledgePieceContent}",resultingParameterName:"keywords",dependentParameterNames:["knowledgePieceContent"]}],personas:[],preparations:[],knowledgeSources:[],knowledgePieces:[],sources:[{type:"BOOK",path:null,content:"# Prepare Keywords\n\n- PIPELINE URL `https://promptbook.studio/promptbook/prepare-knowledge-keywords.book`\n- INPUT PARAMETER `{knowledgePieceContent}` The content\n- OUTPUT PARAMETER `{keywords}` Keywords separated by comma\n\n## Knowledge\n\n<!-- TODO: [🍆] -FORMAT JSON -->\n\n```markdown\nYou are experienced data researcher, detect the important keywords in the document.\n\n# Rules\n\n- Write just keywords separated by comma\n\n# The document\n\nTake information from this document:\n\n> {knowledgePieceContent}\n```\n\n`-> {keywords}`\n"}],sourceFile:"./books/prepare-knowledge-keywords.book"},{title:"Prepare Knowledge-piece Title",pipelineUrl:"https://promptbook.studio/promptbook/prepare-knowledge-title.book",formfactorName:"GENERIC",parameters:[{name:"knowledgePieceContent",description:"The content",isInput:true,isOutput:false},{name:"title",description:"The title of the document",isInput:false,isOutput:true}],tasks:[{taskType:"PROMPT_TASK",name:"knowledge",title:"Knowledge",content:"You are experienced content creator, write best title for the document.\n\n# Rules\n\n- Write just title, nothing else\n- Write maximum 5 words for the title\n\n# The document\n\n> {knowledgePieceContent}",resultingParameterName:"title",expectations:{words:{min:1,max:8}},dependentParameterNames:["knowledgePieceContent"]}],personas:[],preparations:[],knowledgeSources:[],knowledgePieces:[],sources:[{type:"BOOK",path:null,content:"# Prepare Knowledge-piece Title\n\n- PIPELINE URL `https://promptbook.studio/promptbook/prepare-knowledge-title.book`\n- INPUT PARAMETER `{knowledgePieceContent}` The content\n- OUTPUT PARAMETER `{title}` The title of the document\n\n## Knowledge\n\n- EXPECT MIN 1 WORD\n- EXPECT MAX 8 WORDS\n\n```markdown\nYou are experienced content creator, write best title for the document.\n\n# Rules\n\n- Write just title, nothing else\n- Write maximum 5 words for the title\n\n# The document\n\n> {knowledgePieceContent}\n```\n\n`-> {title}`\n"}],sourceFile:"./books/prepare-knowledge-title.book"},{title:"Prepare Persona",pipelineUrl:"https://promptbook.studio/promptbook/prepare-persona.book",formfactorName:"GENERIC",parameters:[{name:"availableModels",description:"List of available model names together with their descriptions as JSON",isInput:true,isOutput:false},{name:"personaDescription",description:"Description of the persona",isInput:true,isOutput:false},{name:"modelsRequirements",description:"Specific requirements for the model",isInput:false,isOutput:true}],tasks:[{taskType:"PROMPT_TASK",name:"make-model-requirements",title:"Make modelRequirements",content:"You are an experienced AI engineer, you need to find the best models for virtual assistants:\n\n## Example\n\n```json\n[\n {\n \"modelName\": \"gpt-4o\",\n \"systemMessage\": \"You are experienced AI engineer and helpfull assistant.\",\n \"temperature\": 0.7\n },\n {\n \"modelName\": \"claude-3-5-sonnet\",\n \"systemMessage\": \"You are a friendly and knowledgeable chatbot.\",\n \"temperature\": 0.5\n }\n]\n```\n\n## Instructions\n\n- Your output format is JSON array\n- Sort best-fitting models first\n- Omit any models that are not suitable\n- Write just the JSON, no other text should be present\n- Array contain items with following keys:\n - `modelName`: The name of the model to use\n - `systemMessage`: The system message to provide context to the model\n - `temperature`: The sampling temperature to use\n\n### Key `modelName`\n\nHere are the available models:\n\n```json\n{availableModels}\n```\n\n### Key `systemMessage`\n\nThe system message is used to communicate instructions or provide context to the model at the beginning of a conversation. It is displayed in a different format compared to user messages, helping the model understand its role in the conversation. The system message typically guides the model's behavior, sets the tone, or specifies desired output from the model. By utilizing the system message effectively, users can steer the model towards generating more accurate and relevant responses.\n\nFor example:\n\n> You are an experienced AI engineer and helpful assistant.\n\n> You are a friendly and knowledgeable chatbot.\n\n### Key `temperature`\n\nThe sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. If set to 0, the model will use log probability to automatically increase the temperature until certain thresholds are hit.\n\nYou can pick a value between 0 and 2. For example:\n\n- `0.1`: Low temperature, extremely conservative and deterministic\n- `0.5`: Medium temperature, balanced between conservative and creative\n- `1.0`: High temperature, creative and bit random\n- `1.5`: Very high temperature, extremely creative and often chaotic and unpredictable\n- `2.0`: Maximum temperature, completely random and unpredictable, for some extreme creative use cases\n\n# The assistant\n\nTake this description of the persona:\n\n> {personaDescription}",resultingParameterName:"modelsRequirements",format:"JSON",dependentParameterNames:["availableModels","personaDescription"]}],personas:[],preparations:[],knowledgeSources:[],knowledgePieces:[],sources:[{type:"BOOK",path:null,content:"# Prepare Persona\n\n- PIPELINE URL `https://promptbook.studio/promptbook/prepare-persona.book`\n- INPUT PARAMETER `{availableModels}` List of available model names together with their descriptions as JSON\n- INPUT PARAMETER `{personaDescription}` Description of the persona\n- OUTPUT PARAMETER `{modelsRequirements}` Specific requirements for the model\n\n## Make modelRequirements\n\n- FORMAT JSON\n\n```markdown\nYou are an experienced AI engineer, you need to find the best models for virtual assistants:\n\n## Example\n\n\\`\\`\\`json\n[\n {\n \"modelName\": \"gpt-4o\",\n \"systemMessage\": \"You are experienced AI engineer and helpfull assistant.\",\n \"temperature\": 0.7\n },\n {\n \"modelName\": \"claude-3-5-sonnet\",\n \"systemMessage\": \"You are a friendly and knowledgeable chatbot.\",\n \"temperature\": 0.5\n }\n]\n\\`\\`\\`\n\n## Instructions\n\n- Your output format is JSON array\n- Sort best-fitting models first\n- Omit any models that are not suitable\n- Write just the JSON, no other text should be present\n- Array contain items with following keys:\n - `modelName`: The name of the model to use\n - `systemMessage`: The system message to provide context to the model\n - `temperature`: The sampling temperature to use\n\n### Key `modelName`\n\nHere are the available models:\n\n\\`\\`\\`json\n{availableModels}\n\\`\\`\\`\n\n### Key `systemMessage`\n\nThe system message is used to communicate instructions or provide context to the model at the beginning of a conversation. It is displayed in a different format compared to user messages, helping the model understand its role in the conversation. The system message typically guides the model's behavior, sets the tone, or specifies desired output from the model. By utilizing the system message effectively, users can steer the model towards generating more accurate and relevant responses.\n\nFor example:\n\n> You are an experienced AI engineer and helpful assistant.\n\n> You are a friendly and knowledgeable chatbot.\n\n### Key `temperature`\n\nThe sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. If set to 0, the model will use log probability to automatically increase the temperature until certain thresholds are hit.\n\nYou can pick a value between 0 and 2. For example:\n\n- `0.1`: Low temperature, extremely conservative and deterministic\n- `0.5`: Medium temperature, balanced between conservative and creative\n- `1.0`: High temperature, creative and bit random\n- `1.5`: Very high temperature, extremely creative and often chaotic and unpredictable\n- `2.0`: Maximum temperature, completely random and unpredictable, for some extreme creative use cases\n\n# The assistant\n\nTake this description of the persona:\n\n> {personaDescription}\n```\n\n`-> {modelsRequirements}`\n"}],sourceFile:"./books/prepare-persona.book"},{title:"Prepare Title",pipelineUrl:"https://promptbook.studio/promptbook/prepare-title.book",formfactorName:"GENERIC",parameters:[{name:"book",description:"The book to prepare the title for",isInput:true,isOutput:false},{name:"title",description:"Best title for the book",isInput:false,isOutput:true}],tasks:[{taskType:"PROMPT_TASK",name:"make-title",title:"Make title",content:"Make best title for given text which describes the workflow:\n\n## Rules\n\n- Write just title, nothing else\n- Title should be concise and clear - Write maximum ideally 2 words, maximum 5 words\n- Title starts with emoticon\n- Title should not mention the input and output of the workflow but the main purpose of the workflow\n _For example, not \"✍ Convert Knowledge-piece to title\" but \"✍ Title\"_\n\n## The workflow\n\n> {book}",resultingParameterName:"title",expectations:{words:{min:1,max:8},lines:{min:1,max:1}},dependentParameterNames:["book"]}],personas:[],preparations:[],knowledgeSources:[],knowledgePieces:[],sources:[{type:"BOOK",path:null,content:"# Prepare Title\n\n- PIPELINE URL `https://promptbook.studio/promptbook/prepare-title.book`\n- INPUT PARAMETER `{book}` The book to prepare the title for\n- OUTPUT PARAMETER `{title}` Best title for the book\n\n## Make title\n\n- EXPECT MIN 1 Word\n- EXPECT MAX 8 Words\n- EXPECT EXACTLY 1 Line\n\n```markdown\nMake best title for given text which describes the workflow:\n\n## Rules\n\n- Write just title, nothing else\n- Title should be concise and clear - Write maximum ideally 2 words, maximum 5 words\n- Title starts with emoticon\n- Title should not mention the input and output of the workflow but the main purpose of the workflow\n _For example, not \"✍ Convert Knowledge-piece to title\" but \"✍ Title\"_\n\n## The workflow\n\n> {book}\n```\n\n`-> {title}`\n"}],sourceFile:"./books/prepare-title.book"}];
1896
+ var PipelineCollection = [{title:"Prepare Knowledge from Markdown",pipelineUrl:"https://promptbook.studio/promptbook/prepare-knowledge-from-markdown.book",formfactorName:"GENERIC",parameters:[{name:"knowledgeContent",description:"Markdown document content",isInput:true,isOutput:false},{name:"knowledgePieces",description:"The knowledge JSON object",isInput:false,isOutput:true}],tasks:[{taskType:"PROMPT_TASK",name:"knowledge",title:"Knowledge",content:"You are experienced data researcher, extract the important knowledge from the document.\n\n# Rules\n\n- Make pieces of information concise, clear, and easy to understand\n- One piece of information should be approximately 1 paragraph\n- Divide the paragraphs by markdown horizontal lines ---\n- Omit irrelevant information\n- Group redundant information\n- Write just extracted information, nothing else\n\n# The document\n\nTake information from this document:\n\n> {knowledgeContent}",resultingParameterName:"knowledgePieces",dependentParameterNames:["knowledgeContent"]}],personas:[],preparations:[],knowledgeSources:[],knowledgePieces:[],sources:[{type:"BOOK",path:null,content:"# Prepare Knowledge from Markdown\n\n- PIPELINE URL `https://promptbook.studio/promptbook/prepare-knowledge-from-markdown.book`\n- INPUT PARAMETER `{knowledgeContent}` Markdown document content\n- OUTPUT PARAMETER `{knowledgePieces}` The knowledge JSON object\n\n## Knowledge\n\n<!-- TODO: [🍆] -FORMAT JSON -->\n\n```markdown\nYou are experienced data researcher, extract the important knowledge from the document.\n\n# Rules\n\n- Make pieces of information concise, clear, and easy to understand\n- One piece of information should be approximately 1 paragraph\n- Divide the paragraphs by markdown horizontal lines ---\n- Omit irrelevant information\n- Group redundant information\n- Write just extracted information, nothing else\n\n# The document\n\nTake information from this document:\n\n> {knowledgeContent}\n```\n\n`-> {knowledgePieces}`\n"}],sourceFile:"./books/prepare-knowledge-from-markdown.book"},{title:"Prepare Keywords",pipelineUrl:"https://promptbook.studio/promptbook/prepare-knowledge-keywords.book",formfactorName:"GENERIC",parameters:[{name:"knowledgePieceContent",description:"The content",isInput:true,isOutput:false},{name:"keywords",description:"Keywords separated by comma",isInput:false,isOutput:true}],tasks:[{taskType:"PROMPT_TASK",name:"knowledge",title:"Knowledge",content:"You are experienced data researcher, detect the important keywords in the document.\n\n# Rules\n\n- Write just keywords separated by comma\n\n# The document\n\nTake information from this document:\n\n> {knowledgePieceContent}",resultingParameterName:"keywords",dependentParameterNames:["knowledgePieceContent"]}],personas:[],preparations:[],knowledgeSources:[],knowledgePieces:[],sources:[{type:"BOOK",path:null,content:"# Prepare Keywords\n\n- PIPELINE URL `https://promptbook.studio/promptbook/prepare-knowledge-keywords.book`\n- INPUT PARAMETER `{knowledgePieceContent}` The content\n- OUTPUT PARAMETER `{keywords}` Keywords separated by comma\n\n## Knowledge\n\n<!-- TODO: [🍆] -FORMAT JSON -->\n\n```markdown\nYou are experienced data researcher, detect the important keywords in the document.\n\n# Rules\n\n- Write just keywords separated by comma\n\n# The document\n\nTake information from this document:\n\n> {knowledgePieceContent}\n```\n\n`-> {keywords}`\n"}],sourceFile:"./books/prepare-knowledge-keywords.book"},{title:"Prepare Knowledge-piece Title",pipelineUrl:"https://promptbook.studio/promptbook/prepare-knowledge-title.book",formfactorName:"GENERIC",parameters:[{name:"knowledgePieceContent",description:"The content",isInput:true,isOutput:false},{name:"title",description:"The title of the document",isInput:false,isOutput:true}],tasks:[{taskType:"PROMPT_TASK",name:"knowledge",title:"Knowledge",content:"You are experienced content creator, write best title for the document.\n\n# Rules\n\n- Write just title, nothing else\n- Write maximum 5 words for the title\n\n# The document\n\n> {knowledgePieceContent}",resultingParameterName:"title",expectations:{words:{min:1,max:8}},dependentParameterNames:["knowledgePieceContent"]}],personas:[],preparations:[],knowledgeSources:[],knowledgePieces:[],sources:[{type:"BOOK",path:null,content:"# Prepare Knowledge-piece Title\n\n- PIPELINE URL `https://promptbook.studio/promptbook/prepare-knowledge-title.book`\n- INPUT PARAMETER `{knowledgePieceContent}` The content\n- OUTPUT PARAMETER `{title}` The title of the document\n\n## Knowledge\n\n- EXPECT MIN 1 WORD\n- EXPECT MAX 8 WORDS\n\n```markdown\nYou are experienced content creator, write best title for the document.\n\n# Rules\n\n- Write just title, nothing else\n- Write maximum 5 words for the title\n\n# The document\n\n> {knowledgePieceContent}\n```\n\n`-> {title}`\n"}],sourceFile:"./books/prepare-knowledge-title.book"},{title:"Prepare Persona",pipelineUrl:"https://promptbook.studio/promptbook/prepare-persona.book",formfactorName:"GENERIC",parameters:[{name:"availableModels",description:"List of available model names together with their descriptions as JSON",isInput:true,isOutput:false},{name:"personaDescription",description:"Description of the persona",isInput:true,isOutput:false},{name:"modelsRequirements",description:"Specific requirements for the model",isInput:false,isOutput:true}],tasks:[{taskType:"PROMPT_TASK",name:"make-model-requirements",title:"Make modelRequirements",content:"You are an experienced AI engineer, you need to find the best models for virtual assistants:\n\n## Example\n\n```json\n[\n {\n \"modelName\": \"gpt-4o\",\n \"systemMessage\": \"You are experienced AI engineer and helpful assistant.\",\n \"temperature\": 0.7\n },\n {\n \"modelName\": \"claude-3-5-sonnet\",\n \"systemMessage\": \"You are a friendly and knowledgeable chatbot.\",\n \"temperature\": 0.5\n }\n]\n```\n\n## Instructions\n\n- Your output format is JSON array\n- Sort best-fitting models first\n- Omit any models that are not suitable\n- Write just the JSON, no other text should be present\n- Array contain items with following keys:\n - `modelName`: The name of the model to use\n - `systemMessage`: The system message to provide context to the model\n - `temperature`: The sampling temperature to use\n\n### Key `modelName`\n\nHere are the available models:\n\n```json\n{availableModels}\n```\n\n### Key `systemMessage`\n\nThe system message is used to communicate instructions or provide context to the model at the beginning of a conversation. It is displayed in a different format compared to user messages, helping the model understand its role in the conversation. The system message typically guides the model's behavior, sets the tone, or specifies desired output from the model. By utilizing the system message effectively, users can steer the model towards generating more accurate and relevant responses.\n\nFor example:\n\n> You are an experienced AI engineer and helpful assistant.\n\n> You are a friendly and knowledgeable chatbot.\n\n### Key `temperature`\n\nThe sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. If set to 0, the model will use log probability to automatically increase the temperature until certain thresholds are hit.\n\nYou can pick a value between 0 and 2. For example:\n\n- `0.1`: Low temperature, extremely conservative and deterministic\n- `0.5`: Medium temperature, balanced between conservative and creative\n- `1.0`: High temperature, creative and bit random\n- `1.5`: Very high temperature, extremely creative and often chaotic and unpredictable\n- `2.0`: Maximum temperature, completely random and unpredictable, for some extreme creative use cases\n\n# The assistant\n\nTake this description of the persona:\n\n> {personaDescription}",resultingParameterName:"modelsRequirements",format:"JSON",dependentParameterNames:["availableModels","personaDescription"]}],personas:[],preparations:[],knowledgeSources:[],knowledgePieces:[],sources:[{type:"BOOK",path:null,content:"# Prepare Persona\n\n- PIPELINE URL `https://promptbook.studio/promptbook/prepare-persona.book`\n- INPUT PARAMETER `{availableModels}` List of available model names together with their descriptions as JSON\n- INPUT PARAMETER `{personaDescription}` Description of the persona\n- OUTPUT PARAMETER `{modelsRequirements}` Specific requirements for the model\n\n## Make modelRequirements\n\n- FORMAT JSON\n\n```markdown\nYou are an experienced AI engineer, you need to find the best models for virtual assistants:\n\n## Example\n\n\\`\\`\\`json\n[\n {\n \"modelName\": \"gpt-4o\",\n \"systemMessage\": \"You are experienced AI engineer and helpful assistant.\",\n \"temperature\": 0.7\n },\n {\n \"modelName\": \"claude-3-5-sonnet\",\n \"systemMessage\": \"You are a friendly and knowledgeable chatbot.\",\n \"temperature\": 0.5\n }\n]\n\\`\\`\\`\n\n## Instructions\n\n- Your output format is JSON array\n- Sort best-fitting models first\n- Omit any models that are not suitable\n- Write just the JSON, no other text should be present\n- Array contain items with following keys:\n - `modelName`: The name of the model to use\n - `systemMessage`: The system message to provide context to the model\n - `temperature`: The sampling temperature to use\n\n### Key `modelName`\n\nHere are the available models:\n\n\\`\\`\\`json\n{availableModels}\n\\`\\`\\`\n\n### Key `systemMessage`\n\nThe system message is used to communicate instructions or provide context to the model at the beginning of a conversation. It is displayed in a different format compared to user messages, helping the model understand its role in the conversation. The system message typically guides the model's behavior, sets the tone, or specifies desired output from the model. By utilizing the system message effectively, users can steer the model towards generating more accurate and relevant responses.\n\nFor example:\n\n> You are an experienced AI engineer and helpful assistant.\n\n> You are a friendly and knowledgeable chatbot.\n\n### Key `temperature`\n\nThe sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. If set to 0, the model will use log probability to automatically increase the temperature until certain thresholds are hit.\n\nYou can pick a value between 0 and 2. For example:\n\n- `0.1`: Low temperature, extremely conservative and deterministic\n- `0.5`: Medium temperature, balanced between conservative and creative\n- `1.0`: High temperature, creative and bit random\n- `1.5`: Very high temperature, extremely creative and often chaotic and unpredictable\n- `2.0`: Maximum temperature, completely random and unpredictable, for some extreme creative use cases\n\n# The assistant\n\nTake this description of the persona:\n\n> {personaDescription}\n```\n\n`-> {modelsRequirements}`\n"}],sourceFile:"./books/prepare-persona.book"},{title:"Prepare Title",pipelineUrl:"https://promptbook.studio/promptbook/prepare-title.book",formfactorName:"GENERIC",parameters:[{name:"book",description:"The book to prepare the title for",isInput:true,isOutput:false},{name:"title",description:"Best title for the book",isInput:false,isOutput:true}],tasks:[{taskType:"PROMPT_TASK",name:"make-title",title:"Make title",content:"Make best title for given text which describes the workflow:\n\n## Rules\n\n- Write just title, nothing else\n- Title should be concise and clear - Write maximum ideally 2 words, maximum 5 words\n- Title starts with emoticon\n- Title should not mention the input and output of the workflow but the main purpose of the workflow\n _For example, not \"✍ Convert Knowledge-piece to title\" but \"✍ Title\"_\n\n## The workflow\n\n> {book}",resultingParameterName:"title",expectations:{words:{min:1,max:8},lines:{min:1,max:1}},dependentParameterNames:["book"]}],personas:[],preparations:[],knowledgeSources:[],knowledgePieces:[],sources:[{type:"BOOK",path:null,content:"# Prepare Title\n\n- PIPELINE URL `https://promptbook.studio/promptbook/prepare-title.book`\n- INPUT PARAMETER `{book}` The book to prepare the title for\n- OUTPUT PARAMETER `{title}` Best title for the book\n\n## Make title\n\n- EXPECT MIN 1 Word\n- EXPECT MAX 8 Words\n- EXPECT EXACTLY 1 Line\n\n```markdown\nMake best title for given text which describes the workflow:\n\n## Rules\n\n- Write just title, nothing else\n- Title should be concise and clear - Write maximum ideally 2 words, maximum 5 words\n- Title starts with emoticon\n- Title should not mention the input and output of the workflow but the main purpose of the workflow\n _For example, not \"✍ Convert Knowledge-piece to title\" but \"✍ Title\"_\n\n## The workflow\n\n> {book}\n```\n\n`-> {title}`\n"}],sourceFile:"./books/prepare-title.book"}];
1897
1897
 
1898
1898
  /**
1899
1899
  * This error type indicates that some tools are missing for pipeline execution or preparation
@@ -3357,13 +3357,13 @@ function joinLlmExecutionTools(...llmExecutionTools) {
3357
3357
 
3358
3358
  Technically, it's not an error, but it's probably not what you want because it does not make sense to use Promptbook without language models.
3359
3359
  `);
3360
- // TODO: [🟥] Detect browser / node and make it colorfull
3360
+ // TODO: [🟥] Detect browser / node and make it colorful
3361
3361
  console.warn(warningMessage);
3362
3362
  // <- TODO: [🏮] Some standard way how to transform errors into warnings and how to handle non-critical fails during the tasks
3363
3363
  /*
3364
3364
  return {
3365
3365
  async listModels() {
3366
- // TODO: [🟥] Detect browser / node and make it colorfull
3366
+ // TODO: [🟥] Detect browser / node and make it colorful
3367
3367
  console.warn(
3368
3368
  spaceTrim(
3369
3369
  (block) => `
@@ -4570,10 +4570,10 @@ function knowledgePiecesToString(knowledgePieces) {
4570
4570
  */
4571
4571
  async function getKnowledgeForTask(options) {
4572
4572
  const { tools, preparedPipeline, task, parameters } = options;
4573
- const firstKnowlegePiece = preparedPipeline.knowledgePieces[0];
4574
- const firstKnowlegeIndex = firstKnowlegePiece === null || firstKnowlegePiece === void 0 ? void 0 : firstKnowlegePiece.index[0];
4573
+ const firstKnowledgePiece = preparedPipeline.knowledgePieces[0];
4574
+ const firstKnowledgeIndex = firstKnowledgePiece === null || firstKnowledgePiece === void 0 ? void 0 : firstKnowledgePiece.index[0];
4575
4575
  // <- TODO: Do not use just first knowledge piece and first index to determine embedding model, use also keyword search
4576
- if (firstKnowlegePiece === undefined || firstKnowlegeIndex === undefined) {
4576
+ if (firstKnowledgePiece === undefined || firstKnowledgeIndex === undefined) {
4577
4577
  return ''; // <- Note: Np knowledge present, return empty string
4578
4578
  }
4579
4579
  try {
@@ -4584,7 +4584,7 @@ async function getKnowledgeForTask(options) {
4584
4584
  title: 'Knowledge Search',
4585
4585
  modelRequirements: {
4586
4586
  modelVariant: 'EMBEDDING',
4587
- modelName: firstKnowlegeIndex.modelName,
4587
+ modelName: firstKnowledgeIndex.modelName,
4588
4588
  },
4589
4589
  content: task.content,
4590
4590
  parameters,
@@ -4592,7 +4592,7 @@ async function getKnowledgeForTask(options) {
4592
4592
  const taskEmbeddingResult = await llmTools.callEmbeddingModel(taskEmbeddingPrompt);
4593
4593
  const knowledgePiecesWithRelevance = preparedPipeline.knowledgePieces.map((knowledgePiece) => {
4594
4594
  const { index } = knowledgePiece;
4595
- const knowledgePieceIndex = index.find((i) => i.modelName === firstKnowlegeIndex.modelName);
4595
+ const knowledgePieceIndex = index.find((i) => i.modelName === firstKnowledgeIndex.modelName);
4596
4596
  // <- TODO: Do not use just first knowledge piece and first index to determine embedding model
4597
4597
  if (knowledgePieceIndex === undefined) {
4598
4598
  return {
@@ -4613,8 +4613,8 @@ async function getKnowledgeForTask(options) {
4613
4613
  task,
4614
4614
  taskEmbeddingPrompt,
4615
4615
  taskEmbeddingResult,
4616
- firstKnowlegePiece,
4617
- firstKnowlegeIndex,
4616
+ firstKnowledgePiece,
4617
+ firstKnowledgeIndex,
4618
4618
  knowledgePiecesWithRelevance,
4619
4619
  knowledgePiecesSorted,
4620
4620
  knowledgePiecesLimited,
@@ -4683,7 +4683,7 @@ async function getReservedParametersForTask(options) {
4683
4683
  * @private internal utility of `createPipelineExecutor`
4684
4684
  */
4685
4685
  async function executeTask(options) {
4686
- const { currentTask, preparedPipeline, parametersToPass, tools, onProgress, $executionReport, pipelineIdentification, maxExecutionAttempts, maxParallelCount, csvSettings, isVerbose, rootDirname, cacheDirname, intermediateFilesStrategy, isAutoInstalled, isNotPreparedWarningSupressed, } = options;
4686
+ const { currentTask, preparedPipeline, parametersToPass, tools, onProgress, $executionReport, pipelineIdentification, maxExecutionAttempts, maxParallelCount, csvSettings, isVerbose, rootDirname, cacheDirname, intermediateFilesStrategy, isAutoInstalled, isNotPreparedWarningSuppressed, } = options;
4687
4687
  const priority = preparedPipeline.tasks.length - preparedPipeline.tasks.indexOf(currentTask);
4688
4688
  // Note: Check consistency of used and dependent parameters which was also done in `validatePipeline`, but it’s good to doublecheck
4689
4689
  const usedParameterNames = extractParameterNamesFromTask(currentTask);
@@ -4771,7 +4771,7 @@ async function executeTask(options) {
4771
4771
  cacheDirname,
4772
4772
  intermediateFilesStrategy,
4773
4773
  isAutoInstalled,
4774
- isNotPreparedWarningSupressed,
4774
+ isNotPreparedWarningSuppressed,
4775
4775
  });
4776
4776
  await onProgress({
4777
4777
  outputParameters: {
@@ -4866,7 +4866,7 @@ async function executePipeline(options) {
4866
4866
  }
4867
4867
  return exportJson({
4868
4868
  name: `executionReport`,
4869
- message: `Unuccessful PipelineExecutorResult (with missing parameter {${parameter.name}}) PipelineExecutorResult`,
4869
+ message: `Unsuccessful PipelineExecutorResult (with missing parameter {${parameter.name}}) PipelineExecutorResult`,
4870
4870
  order: [],
4871
4871
  value: {
4872
4872
  isSuccessful: false,
@@ -4903,7 +4903,7 @@ async function executePipeline(options) {
4903
4903
  return exportJson({
4904
4904
  name: 'pipelineExecutorResult',
4905
4905
  message: spaceTrim$1((block) => `
4906
- Unuccessful PipelineExecutorResult (with extra parameter {${parameter.name}}) PipelineExecutorResult
4906
+ Unsuccessful PipelineExecutorResult (with extra parameter {${parameter.name}}) PipelineExecutorResult
4907
4907
 
4908
4908
  ${block(pipelineIdentification)}
4909
4909
  `),
@@ -5044,7 +5044,7 @@ async function executePipeline(options) {
5044
5044
  }
5045
5045
  return exportJson({
5046
5046
  name: 'pipelineExecutorResult',
5047
- message: `Unuccessful PipelineExecutorResult (with misc errors) PipelineExecutorResult`,
5047
+ message: `Unsuccessful PipelineExecutorResult (with misc errors) PipelineExecutorResult`,
5048
5048
  order: [],
5049
5049
  value: {
5050
5050
  isSuccessful: false,
@@ -5095,7 +5095,7 @@ async function executePipeline(options) {
5095
5095
  * @public exported from `@promptbook/core`
5096
5096
  */
5097
5097
  function createPipelineExecutor(options) {
5098
- const { pipeline, tools, maxExecutionAttempts = DEFAULT_MAX_EXECUTION_ATTEMPTS, maxParallelCount = DEFAULT_MAX_PARALLEL_COUNT, csvSettings = DEFAULT_CSV_SETTINGS, isVerbose = DEFAULT_IS_VERBOSE, isNotPreparedWarningSupressed = false, cacheDirname = DEFAULT_SCRAPE_CACHE_DIRNAME, intermediateFilesStrategy = DEFAULT_INTERMEDIATE_FILES_STRATEGY, isAutoInstalled = DEFAULT_IS_AUTO_INSTALLED, rootDirname = null, } = options;
5098
+ const { pipeline, tools, maxExecutionAttempts = DEFAULT_MAX_EXECUTION_ATTEMPTS, maxParallelCount = DEFAULT_MAX_PARALLEL_COUNT, csvSettings = DEFAULT_CSV_SETTINGS, isVerbose = DEFAULT_IS_VERBOSE, isNotPreparedWarningSuppressed = false, cacheDirname = DEFAULT_SCRAPE_CACHE_DIRNAME, intermediateFilesStrategy = DEFAULT_INTERMEDIATE_FILES_STRATEGY, isAutoInstalled = DEFAULT_IS_AUTO_INSTALLED, rootDirname = null, } = options;
5099
5099
  validatePipeline(pipeline);
5100
5100
  const pipelineIdentification = (() => {
5101
5101
  // Note: This is a 😐 implementation of [🚞]
@@ -5112,7 +5112,7 @@ function createPipelineExecutor(options) {
5112
5112
  if (isPipelinePrepared(pipeline)) {
5113
5113
  preparedPipeline = pipeline;
5114
5114
  }
5115
- else if (isNotPreparedWarningSupressed !== true) {
5115
+ else if (isNotPreparedWarningSuppressed !== true) {
5116
5116
  console.warn(spaceTrim$1((block) => `
5117
5117
  Pipeline is not prepared
5118
5118
 
@@ -5145,7 +5145,7 @@ function createPipelineExecutor(options) {
5145
5145
  maxParallelCount,
5146
5146
  csvSettings,
5147
5147
  isVerbose,
5148
- isNotPreparedWarningSupressed,
5148
+ isNotPreparedWarningSuppressed,
5149
5149
  rootDirname,
5150
5150
  cacheDirname,
5151
5151
  intermediateFilesStrategy,
@@ -5154,7 +5154,7 @@ function createPipelineExecutor(options) {
5154
5154
  assertsError(error);
5155
5155
  return exportJson({
5156
5156
  name: 'pipelineExecutorResult',
5157
- message: `Unuccessful PipelineExecutorResult, last catch`,
5157
+ message: `Unsuccessful PipelineExecutorResult, last catch`,
5158
5158
  order: [],
5159
5159
  value: {
5160
5160
  isSuccessful: false,
@@ -5224,12 +5224,12 @@ function countUsage(llmTools) {
5224
5224
  get title() {
5225
5225
  return `${llmTools.title} (+usage)`;
5226
5226
  // <- TODO: [🧈] Maybe standartize the suffix when wrapping `LlmExecutionTools` up
5227
- // <- TODO: [🧈][🧠] Does it make sence to suffix "(+usage)"?
5227
+ // <- TODO: [🧈][🧠] Does it make sense to suffix "(+usage)"?
5228
5228
  },
5229
5229
  get description() {
5230
5230
  return `${llmTools.description} (+usage)`;
5231
5231
  // <- TODO: [🧈] Maybe standartize the suffix when wrapping `LlmExecutionTools` up
5232
- // <- TODO: [🧈][🧠] Does it make sence to suffix "(+usage)"?
5232
+ // <- TODO: [🧈][🧠] Does it make sense to suffix "(+usage)"?
5233
5233
  },
5234
5234
  checkConfiguration() {
5235
5235
  return /* not await */ llmTools.checkConfiguration();
@@ -5522,17 +5522,17 @@ function $registeredScrapersMessage(availableScrapers) {
5522
5522
  * Mixes registered scrapers from $scrapersMetadataRegister and $scrapersRegister
5523
5523
  */
5524
5524
  const all = [];
5525
- for (const { packageName, className, mimeTypes, documentationUrl, isAvilableInBrowser, } of $scrapersMetadataRegister.list()) {
5525
+ for (const { packageName, className, mimeTypes, documentationUrl, isAvailableInBrowser, } of $scrapersMetadataRegister.list()) {
5526
5526
  if (all.some((item) => item.packageName === packageName && item.className === className)) {
5527
5527
  continue;
5528
5528
  }
5529
- all.push({ packageName, className, mimeTypes, documentationUrl, isAvilableInBrowser });
5529
+ all.push({ packageName, className, mimeTypes, documentationUrl, isAvailableInBrowser });
5530
5530
  }
5531
- for (const { packageName, className, mimeTypes, documentationUrl, isAvilableInBrowser, } of $scrapersRegister.list()) {
5531
+ for (const { packageName, className, mimeTypes, documentationUrl, isAvailableInBrowser, } of $scrapersRegister.list()) {
5532
5532
  if (all.some((item) => item.packageName === packageName && item.className === className)) {
5533
5533
  continue;
5534
5534
  }
5535
- all.push({ packageName, className, mimeTypes, documentationUrl, isAvilableInBrowser });
5535
+ all.push({ packageName, className, mimeTypes, documentationUrl, isAvailableInBrowser });
5536
5536
  }
5537
5537
  for (const { metadata } of availableScrapers) {
5538
5538
  all.push(metadata);
@@ -5544,8 +5544,8 @@ function $registeredScrapersMessage(availableScrapers) {
5544
5544
  const isInstalled = $scrapersRegister
5545
5545
  .list()
5546
5546
  .find(({ packageName, className }) => metadata.packageName === packageName && metadata.className === className);
5547
- const isAvilableInTools = availableScrapers.some(({ metadata: { packageName, className } }) => metadata.packageName === packageName && metadata.className === className);
5548
- return { ...metadata, isMetadataAviailable, isInstalled, isAvilableInTools };
5547
+ const isAvailableInTools = availableScrapers.some(({ metadata: { packageName, className } }) => metadata.packageName === packageName && metadata.className === className);
5548
+ return { ...metadata, isMetadataAviailable, isInstalled, isAvailableInTools };
5549
5549
  });
5550
5550
  if (metadata.length === 0) {
5551
5551
  return spaceTrim(`
@@ -5558,7 +5558,7 @@ function $registeredScrapersMessage(availableScrapers) {
5558
5558
  return spaceTrim((block) => `
5559
5559
  Available scrapers are:
5560
5560
  ${block(metadata
5561
- .map(({ packageName, className, isMetadataAviailable, isInstalled, mimeTypes, isAvilableInBrowser, isAvilableInTools, }, i) => {
5561
+ .map(({ packageName, className, isMetadataAviailable, isInstalled, mimeTypes, isAvailableInBrowser, isAvailableInTools, }, i) => {
5562
5562
  const more = [];
5563
5563
  // TODO: [🧠] Maybe use `documentationUrl`
5564
5564
  if (isMetadataAviailable) {
@@ -5567,16 +5567,16 @@ function $registeredScrapersMessage(availableScrapers) {
5567
5567
  if (isInstalled) {
5568
5568
  more.push(`🟩 Installed`);
5569
5569
  } // not else
5570
- if (isAvilableInTools) {
5570
+ if (isAvailableInTools) {
5571
5571
  more.push(`🟦 Available in tools`);
5572
5572
  } // not else
5573
5573
  if (!isMetadataAviailable && isInstalled) {
5574
5574
  more.push(`When no metadata registered but scraper is installed, it is an unexpected behavior`);
5575
5575
  } // not else
5576
- if (!isInstalled && isAvilableInTools) {
5576
+ if (!isInstalled && isAvailableInTools) {
5577
5577
  more.push(`When the scraper is not installed but available in tools, it is an unexpected compatibility behavior`);
5578
5578
  } // not else
5579
- if (!isAvilableInBrowser) {
5579
+ if (!isAvailableInBrowser) {
5580
5580
  more.push(`Not usable in browser`);
5581
5581
  }
5582
5582
  const moreText = more.length === 0 ? '' : ` *(${more.join('; ')})*`;
@@ -6042,7 +6042,7 @@ TODO: [🧊] This is how it can look in future
6042
6042
  /**
6043
6043
  * TODO: [🧊] In future one preparation can take data from previous preparation and save tokens and time
6044
6044
  * Put `knowledgePieces` into `PrepareKnowledgeOptions`
6045
- * TODO: [🪂] More than max things can run in parallel by acident [1,[2a,2b,_],[3a,3b,_]]
6045
+ * TODO: [🪂] More than max things can run in parallel by accident [1,[2a,2b,_],[3a,3b,_]]
6046
6046
  * TODO: [🧠][❎] Do here proper M:N mapping
6047
6047
  * [x] One source can make multiple pieces
6048
6048
  * [ ] One piece can have multiple sources
@@ -6930,7 +6930,7 @@ const expectCommandParser = {
6930
6930
  $taskJson.expectations[unit] = $taskJson.expectations[unit] || {};
6931
6931
  if (command.sign === 'MINIMUM' || command.sign === 'EXACTLY') {
6932
6932
  if ($taskJson.expectations[unit].min !== undefined) {
6933
- throw new ParseError(`Already defined minumum ${$taskJson.expectations[unit].min} ${command.unit.toLowerCase()}, now trying to redefine it to ${command.amount}`);
6933
+ throw new ParseError(`Already defined minimum ${$taskJson.expectations[unit].min} ${command.unit.toLowerCase()}, now trying to redefine it to ${command.amount}`);
6934
6934
  }
6935
6935
  $taskJson.expectations[unit].min = command.amount;
6936
6936
  } /* not else */
@@ -9944,7 +9944,7 @@ async function prettifyPipelineString(pipelineString, options) {
9944
9944
  */
9945
9945
 
9946
9946
  /**
9947
- * Delagates the user interaction to a async callback function
9947
+ * Delegates the user interaction to a async callback function
9948
9948
  * You need to provide your own implementation of this callback function and its bind to UI.
9949
9949
  *
9950
9950
  * @public exported from `@promptbook/core`
@@ -10746,12 +10746,12 @@ function cacheLlmTools(llmTools, options = {}) {
10746
10746
  get title() {
10747
10747
  return `${llmTools.title} (cached)`;
10748
10748
  // <- TODO: [🧈] Maybe standartize the suffix when wrapping `LlmExecutionTools` up
10749
- // <- TODO: [🧈][🧠] Does it make sence to suffix "(cached)"?
10749
+ // <- TODO: [🧈][🧠] Does it make sense to suffix "(cached)"?
10750
10750
  },
10751
10751
  get description() {
10752
10752
  return `${llmTools.description} (cached)`;
10753
10753
  // <- TODO: [🧈] Maybe standartize the suffix when wrapping `LlmExecutionTools` up
10754
- // <- TODO: [🧈][🧠] Does it make sence to suffix "(cached)"?
10754
+ // <- TODO: [🧈][🧠] Does it make sense to suffix "(cached)"?
10755
10755
  },
10756
10756
  listModels() {
10757
10757
  // TODO: [🧠] Should be model listing also cached?
@@ -10896,7 +10896,7 @@ function limitTotalUsage(llmTools, options = {}) {
10896
10896
  * Warning: This is not useful for the end user, it is just a side effect of the mechanism that handles all available LLM tools
10897
10897
  *
10898
10898
  * @public exported from `@promptbook/core`
10899
- * @public exported from `@promptbook/wizzard`
10899
+ * @public exported from `@promptbook/wizard`
10900
10900
  * @public exported from `@promptbook/cli`
10901
10901
  */
10902
10902
  const _AnthropicClaudeMetadataRegistration = $llmToolsMetadataRegister.register({
@@ -10944,7 +10944,7 @@ const _AnthropicClaudeMetadataRegistration = $llmToolsMetadataRegister.register(
10944
10944
  * Warning: This is not useful for the end user, it is just a side effect of the mechanism that handles all available LLM tools
10945
10945
  *
10946
10946
  * @public exported from `@promptbook/core`
10947
- * @public exported from `@promptbook/wizzard`
10947
+ * @public exported from `@promptbook/wizard`
10948
10948
  * @public exported from `@promptbook/cli`
10949
10949
  */
10950
10950
  const _AzureOpenAiMetadataRegistration = $llmToolsMetadataRegister.register({
@@ -11035,7 +11035,7 @@ const $isRunningInJest = new Function(`
11035
11035
  * Warning: This is not useful for the end user, it is just a side effect of the mechanism that handles all available LLM tools
11036
11036
  *
11037
11037
  * @public exported from `@promptbook/core`
11038
- * @public exported from `@promptbook/wizzard`
11038
+ * @public exported from `@promptbook/wizard`
11039
11039
  * @public exported from `@promptbook/cli`
11040
11040
  */
11041
11041
  const _DeepseekMetadataRegistration = $llmToolsMetadataRegister.register({
@@ -11086,7 +11086,7 @@ const _DeepseekMetadataRegistration = $llmToolsMetadataRegister.register({
11086
11086
  * Warning: This is not useful for the end user, it is just a side effect of the mechanism that handles all available LLM tools
11087
11087
  *
11088
11088
  * @public exported from `@promptbook/core`
11089
- * @public exported from `@promptbook/wizzard`
11089
+ * @public exported from `@promptbook/wizard`
11090
11090
  * @public exported from `@promptbook/cli`
11091
11091
  */
11092
11092
  const _GoogleMetadataRegistration = $llmToolsMetadataRegister.register({
@@ -11144,7 +11144,7 @@ const DEFAULT_OLLAMA_BASE_URL = 'http://localhost:11434/v1';
11144
11144
  * Warning: This is not useful for the end user, it is just a side effect of the mechanism that handles all available LLM tools
11145
11145
  *
11146
11146
  * @public exported from `@promptbook/core`
11147
- * @public exported from `@promptbook/wizzard`
11147
+ * @public exported from `@promptbook/wizard`
11148
11148
  * @public exported from `@promptbook/cli`
11149
11149
  */
11150
11150
  const _OllamaMetadataRegistration = $llmToolsMetadataRegister.register({
@@ -11189,7 +11189,7 @@ const _OllamaMetadataRegistration = $llmToolsMetadataRegister.register({
11189
11189
  * Warning: This is not useful for the end user, it is just a side effect of the mechanism that handles all available LLM tools
11190
11190
  *
11191
11191
  * @public exported from `@promptbook/core`
11192
- * @public exported from `@promptbook/wizzard`
11192
+ * @public exported from `@promptbook/wizard`
11193
11193
  * @public exported from `@promptbook/cli`
11194
11194
  */
11195
11195
  const _OpenAiMetadataRegistration = $llmToolsMetadataRegister.register({
@@ -11231,7 +11231,7 @@ const _OpenAiMetadataRegistration = $llmToolsMetadataRegister.register({
11231
11231
  * Note: [🏐] Configurations registrations are done in the metadata registration section, but the constructor registration is handled separately.
11232
11232
  *
11233
11233
  * @public exported from `@promptbook/core`
11234
- * @public exported from `@promptbook/wizzard`
11234
+ * @public exported from `@promptbook/wizard`
11235
11235
  * @public exported from `@promptbook/cli`
11236
11236
  */
11237
11237
  const _OpenAiAssistantMetadataRegistration = $llmToolsMetadataRegister.register({
@@ -11480,7 +11480,7 @@ const boilerplateScraperMetadata = $deepFreeze({
11480
11480
  // <- TODO: @@ Add compatible mime types with Boilerplate scraper
11481
11481
  ],
11482
11482
  documentationUrl: 'https://github.com/webgptorg/promptbook/discussions/@@',
11483
- isAvilableInBrowser: false,
11483
+ isAvailableInBrowser: false,
11484
11484
  // <- Note: [🌏] Only `MarkdownScraper` makes sense to be available in the browser, for scraping non-markdown sources in the browser use a remote server
11485
11485
  requiredExecutables: [
11486
11486
  /* @@ 'Pandoc' */
@@ -11492,7 +11492,7 @@ const boilerplateScraperMetadata = $deepFreeze({
11492
11492
  * Warning: This is not useful for the end user, it is just a side effect of the mechanism that handles all available known scrapers
11493
11493
  *
11494
11494
  * @public exported from `@promptbook/core`
11495
- * @public exported from `@promptbook/wizzard`
11495
+ * @public exported from `@promptbook/wizard`
11496
11496
  * @public exported from `@promptbook/cli`
11497
11497
  */
11498
11498
  const _BoilerplateScraperMetadataRegistration = $scrapersMetadataRegister.register(boilerplateScraperMetadata);
@@ -11511,7 +11511,7 @@ const legacyDocumentScraperMetadata = $deepFreeze({
11511
11511
  className: 'LegacyDocumentScraper',
11512
11512
  mimeTypes: ['application/msword', 'text/rtf'],
11513
11513
  documentationUrl: 'https://github.com/webgptorg/promptbook/discussions/@@',
11514
- isAvilableInBrowser: false,
11514
+ isAvailableInBrowser: false,
11515
11515
  // <- Note: [🌏] Only `MarkdownScraper` makes sense to be available in the browser, for scraping non-markdown sources in the browser use a remote server
11516
11516
  requiredExecutables: [
11517
11517
  'Pandoc',
@@ -11525,7 +11525,7 @@ const legacyDocumentScraperMetadata = $deepFreeze({
11525
11525
  * Warning: This is not useful for the end user, it is just a side effect of the mechanism that handles all available known scrapers
11526
11526
  *
11527
11527
  * @public exported from `@promptbook/core`
11528
- * @public exported from `@promptbook/wizzard`
11528
+ * @public exported from `@promptbook/wizard`
11529
11529
  * @public exported from `@promptbook/cli`
11530
11530
  */
11531
11531
  const _LegacyDocumentScraperMetadataRegistration = $scrapersMetadataRegister.register(legacyDocumentScraperMetadata);
@@ -11544,7 +11544,7 @@ const documentScraperMetadata = $deepFreeze({
11544
11544
  className: 'DocumentScraper',
11545
11545
  mimeTypes: ['application/vnd.openxmlformats-officedocument.wordprocessingml.document'],
11546
11546
  documentationUrl: 'https://github.com/webgptorg/promptbook/discussions/@@',
11547
- isAvilableInBrowser: false,
11547
+ isAvailableInBrowser: false,
11548
11548
  // <- Note: [🌏] Only `MarkdownScraper` makes sense to be available in the browser, for scraping non-markdown sources in the browser use a remote server
11549
11549
  requiredExecutables: ['Pandoc'],
11550
11550
  }); /* <- Note: [🤛] */
@@ -11554,7 +11554,7 @@ const documentScraperMetadata = $deepFreeze({
11554
11554
  * Warning: This is not useful for the end user, it is just a side effect of the mechanism that handles all available known scrapers
11555
11555
  *
11556
11556
  * @public exported from `@promptbook/core`
11557
- * @public exported from `@promptbook/wizzard`
11557
+ * @public exported from `@promptbook/wizard`
11558
11558
  * @public exported from `@promptbook/cli`
11559
11559
  */
11560
11560
  const _DocumentScraperMetadataRegistration = $scrapersMetadataRegister.register(documentScraperMetadata);
@@ -11573,7 +11573,7 @@ const markdownScraperMetadata = $deepFreeze({
11573
11573
  className: 'MarkdownScraper',
11574
11574
  mimeTypes: ['text/markdown', 'text/plain'],
11575
11575
  documentationUrl: 'https://github.com/webgptorg/promptbook/discussions/@@',
11576
- isAvilableInBrowser: true,
11576
+ isAvailableInBrowser: true,
11577
11577
  // <- Note: [🌏] This is the only scraper which makes sense to be available in the browser, for scraping non-markdown sources in the browser use a remote server
11578
11578
  requiredExecutables: [],
11579
11579
  }); /* <- Note: [🤛] */
@@ -11583,7 +11583,7 @@ const markdownScraperMetadata = $deepFreeze({
11583
11583
  * Warning: This is not useful for the end user, it is just a side effect of the mechanism that handles all available known scrapers
11584
11584
  *
11585
11585
  * @public exported from `@promptbook/core`
11586
- * @public exported from `@promptbook/wizzard`
11586
+ * @public exported from `@promptbook/wizard`
11587
11587
  * @public exported from `@promptbook/cli`
11588
11588
  */
11589
11589
  const _MarkdownScraperMetadataRegistration = $scrapersMetadataRegister.register(markdownScraperMetadata);
@@ -11607,7 +11607,7 @@ const markitdownScraperMetadata = $deepFreeze({
11607
11607
  // 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
11608
11608
  ],
11609
11609
  documentationUrl: 'https://github.com/webgptorg/promptbook/discussions/@@',
11610
- isAvilableInBrowser: false,
11610
+ isAvailableInBrowser: false,
11611
11611
  // <- Note: [🌏] Only `MarkdownScraper` makes sense to be available in the browser, for scraping non-markdown sources in the browser use a remote server
11612
11612
  requiredExecutables: [],
11613
11613
  }); /* <- Note: [🤛] */
@@ -11617,7 +11617,7 @@ const markitdownScraperMetadata = $deepFreeze({
11617
11617
  * Warning: This is not useful for the end user, it is just a side effect of the mechanism that handles all available known scrapers
11618
11618
  *
11619
11619
  * @public exported from `@promptbook/core`
11620
- * @public exported from `@promptbook/wizzard`
11620
+ * @public exported from `@promptbook/wizard`
11621
11621
  * @public exported from `@promptbook/cli`
11622
11622
  */
11623
11623
  const _MarkitdownScraperMetadataRegistration = $scrapersMetadataRegister.register(markitdownScraperMetadata);
@@ -11636,7 +11636,7 @@ const pdfScraperMetadata = $deepFreeze({
11636
11636
  className: 'PdfScraper',
11637
11637
  mimeTypes: ['application/pdf-DISABLED'],
11638
11638
  documentationUrl: 'https://github.com/webgptorg/promptbook/discussions/@@',
11639
- isAvilableInBrowser: false,
11639
+ isAvailableInBrowser: false,
11640
11640
  // <- Note: [🌏] Only `MarkdownScraper` makes sense to be available in the browser, for scraping non-markdown sources in the browser use a remote server
11641
11641
  requiredExecutables: [],
11642
11642
  }); /* <- Note: [🤛] */
@@ -11646,7 +11646,7 @@ const pdfScraperMetadata = $deepFreeze({
11646
11646
  * Warning: This is not useful for the end user, it is just a side effect of the mechanism that handles all available known scrapers
11647
11647
  *
11648
11648
  * @public exported from `@promptbook/core`
11649
- * @public exported from `@promptbook/wizzard`
11649
+ * @public exported from `@promptbook/wizard`
11650
11650
  * @public exported from `@promptbook/cli`
11651
11651
  */
11652
11652
  const _PdfScraperMetadataRegistration = $scrapersMetadataRegister.register(pdfScraperMetadata);
@@ -11665,7 +11665,7 @@ const websiteScraperMetadata = $deepFreeze({
11665
11665
  className: 'WebsiteScraper',
11666
11666
  mimeTypes: ['text/html'],
11667
11667
  documentationUrl: 'https://github.com/webgptorg/promptbook/discussions/@@',
11668
- isAvilableInBrowser: false,
11668
+ isAvailableInBrowser: false,
11669
11669
  // <- Note: [🌏] Only `MarkdownScraper` makes sense to be available in the browser, for scraping non-markdown sources in the browser use a remote server
11670
11670
  requiredExecutables: [],
11671
11671
  }); /* <- Note: [🤛] */
@@ -11675,7 +11675,7 @@ const websiteScraperMetadata = $deepFreeze({
11675
11675
  * Warning: This is not useful for the end user, it is just a side effect of the mechanism that handles all available known scrapers
11676
11676
  *
11677
11677
  * @public exported from `@promptbook/core`
11678
- * @public exported from `@promptbook/wizzard`
11678
+ * @public exported from `@promptbook/wizard`
11679
11679
  * @public exported from `@promptbook/cli`
11680
11680
  */
11681
11681
  const _WebsiteScraperMetadataRegistration = $scrapersMetadataRegister.register(websiteScraperMetadata);