@promptbook/remote-server 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
@@ -23,11 +23,11 @@ To install this package, run:
23
23
  npm i @promptbook/remote-server
24
24
  ```
25
25
 
26
- <!-- TODO: !!! Sample of use + interlink server and client -->
26
+ <!-- TODO: Sample of use + interlink server and client -->
27
27
 
28
28
  ---
29
29
 
30
- Rest of the documentation is common for entire promptbook ecosystem:
30
+ Rest of the documentation is common for **entire promptbook ecosystem**:
31
31
 
32
32
  <!--
33
33
  TODO: Probbably remove this section only in packages
@@ -423,8 +423,7 @@ Internally it can have multiple formats:
423
423
  ### Promptbook **Library**
424
424
 
425
425
  Library of all promptbooks used in your application.
426
-
427
- <!-- TODO: !!! Write more -->
426
+ 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.
428
427
 
429
428
  ### Prompt Result
430
429
 
@@ -601,6 +600,30 @@ npm install --save @promptbook/wizzard
601
600
  - [Simple usage](./samples/usage/simple-script)
602
601
  - [Usage with client and remote server](./samples/usage/remote)
603
602
 
603
+ ## ➕➖ When to use Promptbook?
604
+
605
+ ### ➕ When to use
606
+
607
+ - When you are writing app that generates complex things via LLM - like **websites, articles, presentations, code, stories, songs**,...
608
+ - When you want to **separate code from text prompts**
609
+ - When you want to describe **complex prompt pipelines** and don't want to do it in the code
610
+ - When you want to **orchestrate multiple prompts** together
611
+ - When you want to **reuse** parts of prompts in multiple places
612
+ - When you want to **version** your prompts and **test multiple versions**
613
+ - When you want to **log** the execution of prompts and backtrace the issues
614
+
615
+ ### ➖ When not to use
616
+
617
+ - When you are writing just a simple chatbot without any extra logic, just system messages
618
+
619
+ ## 🐜 Known issues
620
+
621
+ <!-- TODO: -->
622
+
623
+ ## 🧼 Intentionally not implemented features
624
+
625
+ <!-- TODO: -->
626
+
604
627
  ## ❔ FAQ
605
628
 
606
629
  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).
@@ -631,14 +654,14 @@ Include:
631
654
  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.
632
655
 
633
656
  <!--
634
- TODO:!!!
657
+ TODO:
635
658
  ### Promptbooks vs. Semantic Kernel
636
659
 
637
660
 
638
661
  -->
639
662
 
640
663
  <!--
641
- TODO:
664
+ TODO: !
642
665
  ### Promptbooks vs. Langtail
643
666
 
644
667
 
@@ -681,7 +704,7 @@ TODO: (Maybe)
681
704
 
682
705
 
683
706
 
684
- !!!!
707
+ !
685
708
 
686
709
 
687
710
 
@@ -704,6 +727,10 @@ iterations
704
727
 
705
728
  See [CHANGELOG.md](./CHANGELOG.md)
706
729
 
730
+ ## 📜 License
731
+
732
+ <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>
733
+
707
734
  <!--Contributing-->
708
735
  <!--⚠️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.-->
709
736
 
package/esm/index.es.js CHANGED
@@ -89,7 +89,7 @@ var PromptbookExecutionError = /** @class */ (function (_super) {
89
89
  /**
90
90
  * The version of the Promptbook library
91
91
  */
92
- var PROMPTBOOK_VERSION = '0.44.0-20';
92
+ var PROMPTBOOK_VERSION = '0.44.0-22';
93
93
 
94
94
  /**
95
95
  * Remote server is a proxy server that uses its execution tools internally and exposes the executor interface externally.
@@ -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/remote-server",
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,7 +28,7 @@
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
  },
@@ -39,7 +39,7 @@
39
39
  "spacetrim": "0.11.20"
40
40
  },
41
41
  "peerDependencies": {
42
- "@promptbook/core": "0.44.0-21"
42
+ "@promptbook/core": "0.44.0-23"
43
43
  },
44
44
  "main": "./umd/index.umd.js",
45
45
  "module": "./esm/index.es.js",
package/umd/index.umd.js CHANGED
@@ -95,7 +95,7 @@
95
95
  /**
96
96
  * The version of the Promptbook library
97
97
  */
98
- var PROMPTBOOK_VERSION = '0.44.0-20';
98
+ var PROMPTBOOK_VERSION = '0.44.0-22';
99
99
 
100
100
  /**
101
101
  * Remote server is a proxy server that uses its execution tools internally and exposes the executor interface externally.
@@ -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: {