@promptbook/types 0.46.0-0 → 0.46.0-2

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 (2) hide show
  1. package/README.md +19 -90
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -2,15 +2,15 @@
2
2
 
3
3
  Library to supercharge your use of large language models
4
4
 
5
- <!--Badges-->
6
- <!--⚠️WARNING: This section was generated by https://github.com/hejny/batch-project-editor/blob/main/src/workflows/800-badges/badges.ts so every manual change will be overwritten.-->
5
+
6
+
7
7
 
8
8
  [![License of 📖 Prompt book](https://img.shields.io/github/license/webgptorg/promptbook.svg?style=flat)](https://github.com/webgptorg/promptbook/blob/main/LICENSE)
9
9
  [![Known Vulnerabilities](https://snyk.io/test/github/webgptorg/promptbook/badge.svg)](https://snyk.io/test/github/webgptorg/promptbook)
10
10
  [![Issues](https://img.shields.io/github/issues/webgptorg/promptbook.svg?style=flat)](https://github.com/webgptorg/promptbook/issues)
11
11
  [![Socket Badge](https://socket.dev/api/badge/npm/package/@promptbook/types)](https://socket.dev/npm/package/@promptbook/types)
12
12
 
13
- <!--/Badges-->
13
+
14
14
 
15
15
  ## 📦 Package `@promptbook/types`
16
16
 
@@ -39,10 +39,7 @@ _Note: `@promptbook/types` does not export brand-specific types like `OpenAiExec
39
39
 
40
40
  Rest of the documentation is common for **entire promptbook ecosystem**:
41
41
 
42
- <!--
43
- TODO: Probbably remove this section only in packages
44
- > ⚠ Warning: This library is still in early development.
45
- -->
42
+
46
43
 
47
44
  ## 🤍 Whitepaper
48
45
 
@@ -85,13 +82,13 @@ In any of these situations, but especially in (3), the Promptbook library can ma
85
82
  - Multiple promptbooks forms a library which will become a **part of your application codebase**.
86
83
  - Theese promptbooks are designed such as they **can be written by non-programmers**.
87
84
 
88
- <!-- TODO: [🧠] Make some more clear escaping -->
85
+
89
86
 
90
87
  ### Sample:
91
88
 
92
89
  File `write-website-content.ptbk.md`:
93
90
 
94
- <!------------------------[ Sample: ]------------------------>
91
+
95
92
 
96
93
  > # 🌍 Create website content
97
94
  >
@@ -262,7 +259,7 @@ File `write-website-content.ptbk.md`:
262
259
  >
263
260
  > `-> {content}`
264
261
 
265
- <!------------------------[ /Sample ]------------------------>
262
+
266
263
 
267
264
  Following is the scheme how the promptbook above is executed:
268
265
 
@@ -324,10 +321,12 @@ npm i ptbk
324
321
 
325
322
  Or you can install them separately:
326
323
 
327
- <!--[🔠]-->
324
+ > ⭐ Marked packages are worth to try first
328
325
 
329
- <!-- Add all new -->
330
326
 
327
+
328
+ - ⭐ **[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
329
+ - **[promptbook](https://www.npmjs.com/package/promptbook)** - Same as `ptbk`
331
330
  - **[@promptbook/core](https://www.npmjs.com/package/@promptbook/core)** - Core of the library, it contains the main logic for promptbooks
332
331
  - ⭐ **[@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
333
332
  - _(Not finished)_ **[@promptbook/wizzard](https://www.npmjs.com/package/@promptbook/wizzard)** - Wizard for creating+running promptbooks in single line
@@ -506,7 +505,7 @@ There are [postprocessing functions](#postprocessing-functions) that can be used
506
505
 
507
506
  - _(Not implemented yet)_ `ConsoleInterfaceTools` is a wrapper around `readline` module that interacts with the user via console.
508
507
  - `SimplePromptInterfaceTools` is a wrapper around `window.prompt` synchronous function that interacts with the user via browser prompt. It is used for testing and mocking **NOT intended to use in the production** due to its synchronous nature.
509
- - `CallbackInterfaceTools` delagates the user interaction to a async callback function. You need to provide your own implementation of this callback function and its bind to UI. <!-- <- TODO: Provide here a way how to do it with some our plugin -->
508
+ - `CallbackInterfaceTools` delagates the user interaction to a async callback function. You need to provide your own implementation of this callback function and its bind to UI.
510
509
 
511
510
  ### Executor
512
511
 
@@ -576,10 +575,7 @@ There are two types of expectations which are not strictly symmetrical:
576
575
 
577
576
  Look at [expectations.ptbk.md](samples/templates/45-expectations.ptbk.md) and [expect-json.ptbk.md](samples/templates/45-expect-json.ptbk.md) samples for more.
578
577
 
579
- <!--
580
- ### New
581
- [🥻] Insert here when making new command
582
- -->
578
+
583
579
 
584
580
  ### Execution report
585
581
 
@@ -587,7 +583,7 @@ Execution report is a simple object or markdown that contains information about
587
583
 
588
584
  [See the example of such a report](/samples/templates/50-advanced.report.md)
589
585
 
590
- <!-- TODO: Write more -->
586
+
591
587
 
592
588
  ### Remote server
593
589
 
@@ -598,23 +594,7 @@ This is useful to make all logic on browser side but not expose your API keys or
598
594
 
599
595
  ## 👨‍💻 Usage and integration _(for developers)_
600
596
 
601
- <!--
602
-
603
- TODO: [🧙‍♂️]
604
-
605
- ### 🧙‍♂️ Using wizzard
606
-
607
- First you need to install this library:
608
-
609
- ```bash
610
- npm install --save @promptbook/wizzard
611
- ```
612
-
613
- > TODO: !! Write the Wizzard sample
614
-
615
- [Usage samples](./samples/usage/)
616
597
 
617
- -->
618
598
 
619
599
  ### 🔌 Usage in Typescript / Javascript
620
600
 
@@ -639,11 +619,11 @@ npm install --save @promptbook/wizzard
639
619
 
640
620
  ## 🐜 Known issues
641
621
 
642
- <!-- TODO: -->
622
+
643
623
 
644
624
  ## 🧼 Intentionally not implemented features
645
625
 
646
- <!-- TODO: -->
626
+
647
627
 
648
628
  ## ❔ FAQ
649
629
 
@@ -659,42 +639,17 @@ Langchain is primarily aimed at ML developers working in Python. This library is
659
639
 
660
640
  We are considering creating a bridge/converter between these two libraries.
661
641
 
662
- <!--
663
642
 
664
- ==========
665
- Include:
666
- - Langchain is the python library and JavaScript is on second place
667
- - Langchain primarily focused on making templates, not on combining templates into larger structures
668
- - at the language level it distinguishes between chat and completion, I need to mix the two into one template pipeline
669
- - for a non-programmer it's quite hard to work with such a thing and write templates - I would much prefer a system that allows non-technical people to write templates (of which there are many more on the market than free pythonists)
670
- - The focus of promptbooks is primarily on building user applications, not the data processing, training or autogpt.
671
- -->
672
643
 
673
644
  ### Promptbooks vs. OpenAI`s GPTs
674
645
 
675
646
  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.
676
647
 
677
- <!--
678
- TODO:
679
- ### Promptbooks vs. Semantic Kernel
680
-
681
-
682
- -->
683
-
684
- <!--
685
- TODO: !
686
- ### Promptbooks vs. Langtail
687
648
 
688
649
 
689
- -->
690
650
 
691
- <!--
692
- TODO:
693
- ### Promptbooks vs. Evidentally AI
694
651
 
695
- Logging and monitoring
696
652
 
697
- -->
698
653
 
699
654
  ### Where should I store my promptbooks?
700
655
 
@@ -716,33 +671,9 @@ In large language models, you will get better results if you have prompts in the
716
671
 
717
672
  The best way to manage this is to have suffixed promptbooks like `write-website-content.en.ptbk.md` and `write-website-content.cs.ptbk.md` for each supported language.
718
673
 
719
- <!--
720
- TODO: (Maybe)
721
- ### Why you need to explicitly specify input and output parameters?
722
- -->
723
-
724
- <!--
725
-
726
-
727
-
728
- !
729
674
 
730
675
 
731
676
 
732
- unit testing
733
-
734
- escaping
735
-
736
- how i get block into prompt
737
-
738
-
739
- ## 🚷 Limitations
740
-
741
- function calling
742
- system message
743
- iterations
744
-
745
- -->
746
677
 
747
678
  ## ⌚ Changelog
748
679
 
@@ -752,13 +683,11 @@ See [CHANGELOG.md](./CHANGELOG.md)
752
683
 
753
684
  <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>
754
685
 
755
- <!--Contributing-->
756
- <!--⚠️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.-->
686
+
687
+
757
688
 
758
689
  ## 🖋️ Contributing
759
690
 
760
691
  I am open to pull requests, feedback, and suggestions. Or if you like this utility, you can [☕ buy me a coffee](https://www.buymeacoffee.com/hejny) or [donate via cryptocurrencies](https://github.com/hejny/hejny/blob/main/documents/crypto.md).
761
692
 
762
- You can also ⭐ star the promptbook package, [follow me on GitHub](https://github.com/hejny) or [various other social networks](https://www.pavolhejny.com/contact/).
763
-
764
- <!--/Contributing-->
693
+ You can also ⭐ star the promptbook package, [follow me on GitHub](https://github.com/hejny) or [various other social networks](https://www.pavolhejny.com/contact/).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@promptbook/types",
3
- "version": "0.46.0-0",
3
+ "version": "0.46.0-2",
4
4
  "description": "Library to supercharge your use of large language models",
5
5
  "private": false,
6
6
  "sideEffects": false,
@@ -35,7 +35,7 @@
35
35
  "homepage": "https://www.npmjs.com/package/@promptbook/core",
36
36
  "dependencies": {},
37
37
  "peerDependencies": {
38
- "@promptbook/core": "0.46.0-0"
38
+ "@promptbook/core": "0.46.0-2"
39
39
  },
40
40
  "main": "./umd/index.umd.js",
41
41
  "module": "./esm/index.es.js",