@promptbook/types 0.44.0-21 → 0.44.0-23

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.
package/README.md CHANGED
@@ -35,7 +35,7 @@ const promptbook: PromptbookJson = promptbookStringToJson(...);
35
35
 
36
36
  ---
37
37
 
38
- Rest of the documentation is common for entire promptbook ecosystem:
38
+ Rest of the documentation is common for **entire promptbook ecosystem**:
39
39
 
40
40
  <!--
41
41
  TODO: Probbably remove this section only in packages
@@ -431,8 +431,7 @@ Internally it can have multiple formats:
431
431
  ### Promptbook **Library**
432
432
 
433
433
  Library of all promptbooks used in your application.
434
-
435
- <!-- TODO: !!! Write more -->
434
+ Each promptbook is a separate `.ptbk.md` file with unique `PROMPTBOOK URL`. Theese urls are used to reference promptbooks in other promptbooks or in the application code.
436
435
 
437
436
  ### Prompt Result
438
437
 
@@ -609,6 +608,30 @@ npm install --save @promptbook/wizzard
609
608
  - [Simple usage](./samples/usage/simple-script)
610
609
  - [Usage with client and remote server](./samples/usage/remote)
611
610
 
611
+ ## ➕➖ When to use Promptbook?
612
+
613
+ ### ➕ When to use
614
+
615
+ - When you are writing app that generates complex things via LLM - like **websites, articles, presentations, code, stories, songs**,...
616
+ - When you want to **separate code from text prompts**
617
+ - When you want to describe **complex prompt pipelines** and don't want to do it in the code
618
+ - When you want to **orchestrate multiple prompts** together
619
+ - When you want to **reuse** parts of prompts in multiple places
620
+ - When you want to **version** your prompts and **test multiple versions**
621
+ - When you want to **log** the execution of prompts and backtrace the issues
622
+
623
+ ### ➖ When not to use
624
+
625
+ - When you are writing just a simple chatbot without any extra logic, just system messages
626
+
627
+ ## 🐜 Known issues
628
+
629
+ <!-- TODO: -->
630
+
631
+ ## 🧼 Intentionally not implemented features
632
+
633
+ <!-- TODO: -->
634
+
612
635
  ## ❔ FAQ
613
636
 
614
637
  If you have a question [start a discussion](https://github.com/webgptorg/promptbook/discussions/), [open an issue](https://github.com/webgptorg/promptbook/issues) or [write me an email](https://www.pavolhejny.com/contact).
@@ -639,14 +662,14 @@ Include:
639
662
  GPTs are chat assistants that can be assigned to specific tasks and materials. But they are still chat assistants. Promptbooks are a way to orchestrate many more predefined tasks to have much tighter control over the process. Promptbooks are not a good technology for creating human-like chatbots, GPTs are not a good technology for creating outputs with specific requirements.
640
663
 
641
664
  <!--
642
- TODO:!!!
665
+ TODO:
643
666
  ### Promptbooks vs. Semantic Kernel
644
667
 
645
668
 
646
669
  -->
647
670
 
648
671
  <!--
649
- TODO:
672
+ TODO: !
650
673
  ### Promptbooks vs. Langtail
651
674
 
652
675
 
@@ -689,7 +712,7 @@ TODO: (Maybe)
689
712
 
690
713
 
691
714
 
692
- !!!!
715
+ !
693
716
 
694
717
 
695
718
 
@@ -712,6 +735,10 @@ iterations
712
735
 
713
736
  See [CHANGELOG.md](./CHANGELOG.md)
714
737
 
738
+ ## 📜 License
739
+
740
+ <p xmlns:cc="http://creativecommons.org/ns#" xmlns:dct="http://purl.org/dc/terms/"><a property="dct:title" rel="cc:attributionURL" href="https://github.com/webgptorg/promptbook">Promptbook</a> by <a rel="cc:attributionURL dct:creator" property="cc:attributionName" href="https://github.com/hejny/">Pavol Hejný</a> is licensed under <a href="https://creativecommons.org/licenses/by/4.0/?ref=chooser-v1" target="_blank" rel="license noopener noreferrer" style="display:inline-block;">CC BY 4.0</a></p>
741
+
715
742
  <!--Contributing-->
716
743
  <!--⚠️WARNING: This section was generated by https://github.com/hejny/batch-project-editor/blob/main/src/workflows/810-contributing/contributing.ts so every manual change will be overwritten.-->
717
744
 
@@ -1,3 +1,4 @@
1
+ import { spaceTrim } from 'spacetrim';
1
2
  import { prettifyPromptbookString } from '../conversion/prettify/prettifyPromptbookString';
2
3
  import { parseNumber } from '../conversion/utils/parseNumber';
3
4
  import { assertsExecutionSuccessful } from '../execution/assertsExecutionSuccessful';
@@ -44,7 +45,7 @@ import { unwrapResult } from '../utils/unwrapResult';
44
45
  export { assertsExecutionSuccessful, checkExpectations, executionReportJsonToString, ExecutionReportStringOptions, ExecutionReportStringOptionsDefaults, extractAllBlocksFromMarkdown, // <- [🌻]
45
46
  extractAllListItemsFromMarkdown, extractBlock, // <- [🌻]
46
47
  extractOneBlockFromMarkdown, isPassingExpectations, isValidJsonString, parseNumber, // <- [🌻]
47
- prettifyPromptbookString, removeContentComments, removeEmojis, removeMarkdownFormatting, removeQuotes, replaceParameters, trimCodeBlock, trimEndOfCodeBlock, unwrapResult, };
48
+ prettifyPromptbookString, removeContentComments, removeEmojis, removeMarkdownFormatting, removeQuotes, replaceParameters, spaceTrim, trimCodeBlock, trimEndOfCodeBlock, unwrapResult, };
48
49
  export { countCharacters, countLines, countPages, countParagraphs, countSentences, CountUtils, countWords };
49
50
  export { splitIntoSentences };
50
51
  export declare const normalizeTo: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@promptbook/types",
3
- "version": "0.44.0-21",
3
+ "version": "0.44.0-23",
4
4
  "description": "Library to supercharge your use of large language models",
5
5
  "private": false,
6
6
  "sideEffects": false,
@@ -28,14 +28,14 @@
28
28
  "text-generation",
29
29
  "language-model"
30
30
  ],
31
- "license": "SEE LICENSE IN LICENSE",
31
+ "license": "CC-BY-4.0",
32
32
  "bugs": {
33
33
  "url": "https://github.com/webgptorg/promptbook/issues"
34
34
  },
35
35
  "homepage": "https://www.npmjs.com/package/@promptbook/core",
36
36
  "dependencies": {},
37
37
  "peerDependencies": {
38
- "@promptbook/core": "0.44.0-21"
38
+ "@promptbook/core": "0.44.0-23"
39
39
  },
40
40
  "main": "./umd/index.umd.js",
41
41
  "module": "./esm/index.es.js",
@@ -1,3 +1,4 @@
1
+ import { spaceTrim } from 'spacetrim';
1
2
  import { prettifyPromptbookString } from '../conversion/prettify/prettifyPromptbookString';
2
3
  import { parseNumber } from '../conversion/utils/parseNumber';
3
4
  import { assertsExecutionSuccessful } from '../execution/assertsExecutionSuccessful';
@@ -44,7 +45,7 @@ import { unwrapResult } from '../utils/unwrapResult';
44
45
  export { assertsExecutionSuccessful, checkExpectations, executionReportJsonToString, ExecutionReportStringOptions, ExecutionReportStringOptionsDefaults, extractAllBlocksFromMarkdown, // <- [🌻]
45
46
  extractAllListItemsFromMarkdown, extractBlock, // <- [🌻]
46
47
  extractOneBlockFromMarkdown, isPassingExpectations, isValidJsonString, parseNumber, // <- [🌻]
47
- prettifyPromptbookString, removeContentComments, removeEmojis, removeMarkdownFormatting, removeQuotes, replaceParameters, trimCodeBlock, trimEndOfCodeBlock, unwrapResult, };
48
+ prettifyPromptbookString, removeContentComments, removeEmojis, removeMarkdownFormatting, removeQuotes, replaceParameters, spaceTrim, trimCodeBlock, trimEndOfCodeBlock, unwrapResult, };
48
49
  export { countCharacters, countLines, countPages, countParagraphs, countSentences, CountUtils, countWords };
49
50
  export { splitIntoSentences };
50
51
  export declare const normalizeTo: {