@promptbook/types 0.46.0-0 → 0.46.0-1

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 +18 -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,11 @@ npm i ptbk
324
321
 
325
322
  Or you can install them separately:
326
323
 
327
- <!--[🔠]-->
328
324
 
329
- <!-- Add all new -->
330
325
 
326
+
327
+ - ⭐ **[ptbk](https://www.npmjs.com/package/@promptbook/core)** - Bundle of all packages, when you want to install everything and you don't care about the size
328
+ - **[promptbook](https://www.npmjs.com/package/@promptbook/core)** - Just alias for `ptbk`
331
329
  - **[@promptbook/core](https://www.npmjs.com/package/@promptbook/core)** - Core of the library, it contains the main logic for promptbooks
332
330
  - ⭐ **[@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
331
  - _(Not finished)_ **[@promptbook/wizzard](https://www.npmjs.com/package/@promptbook/wizzard)** - Wizard for creating+running promptbooks in single line
@@ -506,7 +504,7 @@ There are [postprocessing functions](#postprocessing-functions) that can be used
506
504
 
507
505
  - _(Not implemented yet)_ `ConsoleInterfaceTools` is a wrapper around `readline` module that interacts with the user via console.
508
506
  - `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 -->
507
+ - `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
508
 
511
509
  ### Executor
512
510
 
@@ -576,10 +574,7 @@ There are two types of expectations which are not strictly symmetrical:
576
574
 
577
575
  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
576
 
579
- <!--
580
- ### New
581
- [🥻] Insert here when making new command
582
- -->
577
+
583
578
 
584
579
  ### Execution report
585
580
 
@@ -587,7 +582,7 @@ Execution report is a simple object or markdown that contains information about
587
582
 
588
583
  [See the example of such a report](/samples/templates/50-advanced.report.md)
589
584
 
590
- <!-- TODO: Write more -->
585
+
591
586
 
592
587
  ### Remote server
593
588
 
@@ -598,23 +593,7 @@ This is useful to make all logic on browser side but not expose your API keys or
598
593
 
599
594
  ## 👨‍💻 Usage and integration _(for developers)_
600
595
 
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
596
 
617
- -->
618
597
 
619
598
  ### 🔌 Usage in Typescript / Javascript
620
599
 
@@ -639,11 +618,11 @@ npm install --save @promptbook/wizzard
639
618
 
640
619
  ## 🐜 Known issues
641
620
 
642
- <!-- TODO: -->
621
+
643
622
 
644
623
  ## 🧼 Intentionally not implemented features
645
624
 
646
- <!-- TODO: -->
625
+
647
626
 
648
627
  ## ❔ FAQ
649
628
 
@@ -659,42 +638,17 @@ Langchain is primarily aimed at ML developers working in Python. This library is
659
638
 
660
639
  We are considering creating a bridge/converter between these two libraries.
661
640
 
662
- <!--
663
641
 
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
642
 
673
643
  ### Promptbooks vs. OpenAI`s GPTs
674
644
 
675
645
  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
646
 
677
- <!--
678
- TODO:
679
- ### Promptbooks vs. Semantic Kernel
680
-
681
-
682
- -->
683
-
684
- <!--
685
- TODO: !
686
- ### Promptbooks vs. Langtail
687
647
 
688
648
 
689
- -->
690
649
 
691
- <!--
692
- TODO:
693
- ### Promptbooks vs. Evidentally AI
694
650
 
695
- Logging and monitoring
696
651
 
697
- -->
698
652
 
699
653
  ### Where should I store my promptbooks?
700
654
 
@@ -716,33 +670,9 @@ In large language models, you will get better results if you have prompts in the
716
670
 
717
671
  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
672
 
719
- <!--
720
- TODO: (Maybe)
721
- ### Why you need to explicitly specify input and output parameters?
722
- -->
723
-
724
- <!--
725
-
726
-
727
-
728
- !
729
673
 
730
674
 
731
675
 
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
676
 
747
677
  ## ⌚ Changelog
748
678
 
@@ -752,13 +682,11 @@ See [CHANGELOG.md](./CHANGELOG.md)
752
682
 
753
683
  <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
684
 
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.-->
685
+
686
+
757
687
 
758
688
  ## 🖋️ Contributing
759
689
 
760
690
  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
691
 
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-->
692
+ 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-1",
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-1"
39
39
  },
40
40
  "main": "./umd/index.umd.js",
41
41
  "module": "./esm/index.es.js",