@promptbook/cli 0.75.0-2 → 0.75.0-4
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 +30 -20
- package/esm/index.es.js +206 -125
- package/esm/index.es.js.map +1 -1
- package/esm/typings/src/_packages/core.index.d.ts +10 -4
- package/esm/typings/src/_packages/types.index.d.ts +8 -6
- package/esm/typings/src/commands/EXPECT/ExpectCommand.d.ts +1 -1
- package/esm/typings/src/commands/SECTION/SectionCommand.d.ts +1 -1
- package/esm/typings/src/commands/_common/types/CommandParser.d.ts +0 -2
- package/esm/typings/src/config.d.ts +9 -2
- package/esm/typings/src/conversion/pipelineJsonToString.d.ts +1 -1
- package/esm/typings/src/conversion/prettify/renderPipelineMermaidOptions.d.ts +2 -2
- package/esm/typings/src/conversion/utils/extractParameterNamesFromTask.d.ts +3 -3
- package/esm/typings/src/conversion/utils/renameParameter.d.ts +2 -2
- package/esm/typings/src/dialogs/simple-prompt/SimplePromptInterfaceTools.d.ts +1 -1
- package/esm/typings/src/execution/ScriptExecutionTools.d.ts +1 -1
- package/esm/typings/src/formfactors/_boilerplate/BoilerplateFormfactorDefinition.d.ts +2 -2
- package/esm/typings/src/formfactors/_common/AbstractFormfactorDefinition.d.ts +3 -0
- package/esm/typings/src/formfactors/chatbot/ChatbotFormfactorDefinition.d.ts +32 -2
- package/esm/typings/src/formfactors/generator/GeneratorFormfactorDefinition.d.ts +14 -0
- package/esm/typings/src/formfactors/generic/GenericFormfactorDefinition.d.ts +2 -2
- package/esm/typings/src/formfactors/index.d.ts +72 -10
- package/esm/typings/src/formfactors/matcher/MatcherFormfactorDefinition.d.ts +2 -2
- package/esm/typings/src/formfactors/sheets/SheetsFormfactorDefinition.d.ts +12 -2
- package/esm/typings/src/formfactors/translator/TranslatorFormfactorDefinition.d.ts +12 -2
- package/esm/typings/src/pipeline/PipelineInterface/PipelineInterface.d.ts +5 -4
- package/esm/typings/src/pipeline/PipelineInterface/constants.d.ts +2 -2
- package/esm/typings/src/pipeline/PipelineJson/{TaskJsonCommon.d.ts → CommonTaskJson.d.ts} +13 -13
- package/esm/typings/src/pipeline/PipelineJson/DialogTaskJson.d.ts +2 -2
- package/esm/typings/src/pipeline/PipelineJson/ParameterJson.d.ts +2 -0
- package/esm/typings/src/pipeline/PipelineJson/PersonaJson.d.ts +1 -1
- package/esm/typings/src/pipeline/PipelineJson/PipelineJson.d.ts +2 -2
- package/esm/typings/src/pipeline/PipelineJson/PromptTaskJson.d.ts +2 -2
- package/esm/typings/src/pipeline/PipelineJson/ScriptTaskJson.d.ts +2 -2
- package/esm/typings/src/pipeline/PipelineJson/SimpleTaskJson.d.ts +2 -2
- package/esm/typings/src/pipeline/PipelineJson/TaskJson.d.ts +1 -1
- package/esm/typings/src/pipeline/PipelineString.d.ts +1 -1
- package/esm/typings/src/prepare/isPipelinePrepared.d.ts +1 -1
- package/esm/typings/src/prepare/prepareTasks.d.ts +5 -5
- package/esm/typings/src/types/Prompt.d.ts +3 -3
- package/esm/typings/src/types/SectionType.d.ts +21 -0
- package/esm/typings/src/types/TaskProgress.d.ts +1 -1
- package/esm/typings/src/types/TaskType.d.ts +15 -0
- package/esm/typings/src/types/typeAliases.d.ts +1 -1
- package/esm/typings/src/utils/organization/TODO_remove_as.d.ts +6 -0
- package/esm/typings/src/utils/parameters/extractParameterNames.d.ts +1 -1
- package/package.json +1 -1
- package/umd/index.umd.js +206 -125
- package/umd/index.umd.js.map +1 -1
- package/esm/typings/src/commands/SECTION/SectionType.d.ts +0 -13
- /package/esm/typings/{promptbook-collection → books}/index.d.ts +0 -0
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
#  Promptbook
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
It's time for a paradigm shift! The future of software is in plain English, French or Latin.
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
@@ -54,10 +54,10 @@ CLI utils for Promptbook. After install you can use `promptbook` command in term
|
|
|
54
54
|
You can prebuild your own Promptbook library with `ptbk make` command:
|
|
55
55
|
|
|
56
56
|
```bash
|
|
57
|
-
npx ptbk make ./
|
|
57
|
+
npx ptbk make ./books --format typescript --verbose
|
|
58
58
|
```
|
|
59
59
|
|
|
60
|
-
This will emit `index.ts` with `getPipelineCollection` function file in `
|
|
60
|
+
This will emit `index.ts` with `getPipelineCollection` function file in `books` directory.
|
|
61
61
|
|
|
62
62
|
Then just use it:
|
|
63
63
|
|
|
@@ -65,7 +65,7 @@ Then just use it:
|
|
|
65
65
|
import { createPipelineExecutor, assertsExecutionSuccessful } from '@promptbook/core';
|
|
66
66
|
import { $provideExecutionToolsForNode } from '@promptbook/node';
|
|
67
67
|
import { $provideFilesystemForNode } from '@promptbook/node';
|
|
68
|
-
import { getPipelineCollection } from './
|
|
68
|
+
import { getPipelineCollection } from './books'; // <- Importing from pre-built library
|
|
69
69
|
import { JavascriptExecutionTools } from '@promptbook/execute-javascript';
|
|
70
70
|
import { OpenAiExecutionTools } from '@promptbook/openai';
|
|
71
71
|
|
|
@@ -108,25 +108,24 @@ This will prettify all promptbooks in `promptbook` directory and adds Mermaid gr
|
|
|
108
108
|
|
|
109
109
|
Rest of the documentation is common for **entire promptbook ecosystem**:
|
|
110
110
|
|
|
111
|
-
## 🤍 The Promptbook Whitepaper
|
|
112
111
|
|
|
113
|
-
If you have a simple, single prompt for ChatGPT, GPT-4, Anthropic Claude, Google Gemini, Llama 3, or whatever, it doesn't matter how you integrate it. Whether it's calling a REST API directly, using the SDK, hardcoding the prompt into the source code, or importing a text file, the process remains the same.
|
|
114
112
|
|
|
115
|
-
But often you will struggle with the **limitations of LLMs**, such as **hallucinations, off-topic responses, poor quality output, language and prompt drift, word repetition repetition repetition repetition or misuse, lack of context, or just plain w𝒆𝐢rd resp0nses**. When this happens, you generally have three options:
|
|
116
113
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
114
|
+
## 🤍 The Book Abstract
|
|
115
|
+
|
|
116
|
+
> It's time for a paradigm shift! **The future of software is in plain English**, French or Latin.
|
|
117
|
+
|
|
118
|
+
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**!
|
|
119
|
+
|
|
120
|
+
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!
|
|
121
|
+
|
|
122
|
+
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.
|
|
123
|
+
|
|
124
|
+
This shift is going to happen, whether we are ready for it or not. Our mission is to make it excellently, not just good.
|
|
125
|
+
|
|
126
|
+
> **Join us in this journey!**
|
|
120
127
|
|
|
121
|
-
In all of these situations, but especially in 3., the **✨ Promptbook can make your life waaaaaaaaaay easier**.
|
|
122
128
|
|
|
123
|
-
- [**Separates concerns**](https://github.com/webgptorg/promptbook/discussions/32) between prompt-engineer and programmer, between code files and prompt files, and between prompts and their execution logic. For this purpose, it introduces a new language called [the **💙 Book**](https://github.com/webgptorg/book).
|
|
124
|
-
- Book allows you to **focus on the business** logic without having to write code or deal with the technicalities of LLMs.
|
|
125
|
-
- **Forget** about **low-level details** like choosing the right model, tokens, context size, `temperature`, `top-k`, `top-p`, or kernel sampling. **Just write your intent** and [**persona**](https://github.com/webgptorg/promptbook/discussions/22) who should be responsible for the task and let the library do the rest.
|
|
126
|
-
- We have built-in **orchestration** of [pipeline](https://github.com/webgptorg/promptbook/discussions/64) execution and many tools to make the process easier, more reliable, and more efficient, such as caching, [compilation+preparation](https://github.com/webgptorg/promptbook/discussions/78), [just-in-time fine-tuning](https://github.com/webgptorg/promptbook/discussions/33), [expectation-aware generation](https://github.com/webgptorg/promptbook/discussions/37), [agent adversary expectations](https://github.com/webgptorg/promptbook/discussions/39), and more.
|
|
127
|
-
- Sometimes even the best prompts with the best framework like Promptbook `:)` can't avoid the problems. In this case, the library has built-in **[anomaly detection](https://github.com/webgptorg/promptbook/discussions/40) and logging** to help you find and fix the problems.
|
|
128
|
-
- Versioning is build in. You can test multiple **A/B versions** of pipelines and see which one works best.
|
|
129
|
-
- Promptbook is designed to use [**RAG** (Retrieval-Augmented Generation)](https://github.com/webgptorg/promptbook/discussions/41) and other advanced techniques to bring the context of your business to generic LLM. You can use **knowledge** to improve the quality of the output.
|
|
130
129
|
|
|
131
130
|
|
|
132
131
|
|
|
@@ -238,7 +237,9 @@ Reserved words:
|
|
|
238
237
|
|
|
239
238
|
#### Parameter notation
|
|
240
239
|
|
|
241
|
-
###
|
|
240
|
+
### Task
|
|
241
|
+
|
|
242
|
+
### Task type
|
|
242
243
|
|
|
243
244
|
Todo todo
|
|
244
245
|
|
|
@@ -299,6 +300,11 @@ Or you can install them separately:
|
|
|
299
300
|
|
|
300
301
|
## 📚 Dictionary
|
|
301
302
|
|
|
303
|
+
|
|
304
|
+
|
|
305
|
+
|
|
306
|
+
|
|
307
|
+
|
|
302
308
|
### 📚 Dictionary
|
|
303
309
|
|
|
304
310
|
The following glossary is used to clarify certain concepts:
|
|
@@ -314,6 +320,8 @@ The following glossary is used to clarify certain concepts:
|
|
|
314
320
|
- **Retrieval-augmented generation** is a machine learning paradigm where a model generates text by retrieving relevant information from a large database of text. This approach combines the benefits of generative models and retrieval models.
|
|
315
321
|
- **Longtail** refers to non-common or rare events, items, or entities that are not well-represented in the training data of machine learning models. Longtail items are often challenging for models to predict accurately.
|
|
316
322
|
|
|
323
|
+
|
|
324
|
+
|
|
317
325
|
_Note: Thos section is not complete dictionary, more list of general AI / LLM terms that has connection with Promptbook_
|
|
318
326
|
|
|
319
327
|
#### Promptbook core
|
|
@@ -350,7 +358,7 @@ _Note: Thos section is not complete dictionary, more list of general AI / LLM te
|
|
|
350
358
|
|
|
351
359
|
- [📚 Collection of pipelines](https://github.com/webgptorg/promptbook/discussions/65)
|
|
352
360
|
- [📯 Pipeline](https://github.com/webgptorg/promptbook/discussions/64)
|
|
353
|
-
- [
|
|
361
|
+
- [🙇♂️ Tasks and pipeline sections](https://github.com/webgptorg/promptbook/discussions/88)
|
|
354
362
|
- [🤼 Personas](https://github.com/webgptorg/promptbook/discussions/22)
|
|
355
363
|
- [⭕ Parameters](https://github.com/webgptorg/promptbook/discussions/83)
|
|
356
364
|
- [🚀 Pipeline execution](https://github.com/webgptorg/promptbook/discussions/84)
|
|
@@ -374,6 +382,8 @@ _Note: Thos section is not complete dictionary, more list of general AI / LLM te
|
|
|
374
382
|
- [👮 Agent adversary expectations](https://github.com/webgptorg/promptbook/discussions/39)
|
|
375
383
|
- [view more](https://github.com/webgptorg/promptbook/discussions/categories/concepts)
|
|
376
384
|
|
|
385
|
+
|
|
386
|
+
|
|
377
387
|
### Terms specific to Promptbook TypeScript implementation
|
|
378
388
|
|
|
379
389
|
- Anonymous mode
|