@promptbook/cli 0.73.0 → 0.74.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.
- package/README.md +130 -3
- package/esm/index.es.js +346 -359
- package/esm/index.es.js.map +1 -1
- package/esm/typings/src/_packages/anthropic-claude.index.d.ts +2 -2
- package/esm/typings/src/_packages/azure-openai.index.d.ts +2 -2
- package/esm/typings/src/_packages/browser.index.d.ts +2 -2
- package/esm/typings/src/_packages/cli.index.d.ts +2 -2
- package/esm/typings/src/_packages/core.index.d.ts +2 -2
- package/esm/typings/src/_packages/documents.index.d.ts +2 -2
- package/esm/typings/src/_packages/execute-javascript.index.d.ts +2 -2
- package/esm/typings/src/_packages/fake-llm.index.d.ts +2 -2
- package/esm/typings/src/_packages/langtail.index.d.ts +2 -2
- package/esm/typings/src/_packages/legacy-documents.index.d.ts +2 -2
- package/esm/typings/src/_packages/markdown-utils.index.d.ts +2 -2
- package/esm/typings/src/_packages/node.index.d.ts +2 -2
- package/esm/typings/src/_packages/openai.index.d.ts +2 -2
- package/esm/typings/src/_packages/pdf.index.d.ts +2 -2
- package/esm/typings/src/_packages/remote-client.index.d.ts +2 -2
- package/esm/typings/src/_packages/remote-server.index.d.ts +2 -2
- package/esm/typings/src/_packages/utils.index.d.ts +2 -2
- package/esm/typings/src/_packages/website-crawler.index.d.ts +2 -2
- package/esm/typings/src/cli/cli-commands/make.d.ts +0 -1
- package/esm/typings/src/cli/cli-commands/run.d.ts +13 -0
- package/esm/typings/src/cli/promptbookCli.d.ts +1 -0
- package/esm/typings/src/cli/test/ptbk.d.ts +4 -1
- package/esm/typings/src/commands/{PROMPTBOOK_VERSION/PromptbookVersionCommand.d.ts → BOOK_VERSION/BookVersionCommand.d.ts} +4 -4
- package/esm/typings/src/commands/BOOK_VERSION/bookVersionCommandParser.d.ts +9 -0
- package/esm/typings/src/commands/_common/types/CommandParser.d.ts +1 -1
- package/esm/typings/src/commands/index.d.ts +1 -1
- package/esm/typings/src/version.d.ts +13 -2
- package/package.json +4 -4
- package/umd/index.umd.js +347 -359
- package/umd/index.umd.js.map +1 -1
- package/esm/typings/src/commands/PROMPTBOOK_VERSION/promptbookVersionCommandParser.d.ts +0 -9
- /package/esm/typings/src/commands/{PROMPTBOOK_VERSION/promptbookVersionCommand.test.d.ts → BOOK_VERSION/bookVersionCommand.test.d.ts} +0 -0
package/README.md
CHANGED
|
@@ -24,6 +24,10 @@ Build responsible, controlled and transparent applications on top of LLM models!
|
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
|
|
27
|
+
<blockquote style="color: #ff8811">
|
|
28
|
+
<b>⚠ Warning:</b> This is a pre-release version of the library. It is not yet ready for production use. Please look at <a href="https://www.npmjs.com/package/@promptbook/core?activeTab=versions">latest stable release</a>.
|
|
29
|
+
</blockquote>
|
|
30
|
+
|
|
27
31
|
## 📦 Package `@promptbook/cli`
|
|
28
32
|
|
|
29
33
|
- Promptbooks are [divided into several](#-packages) packages, all are published from [single monorepo](https://github.com/webgptorg/promptbook).
|
|
@@ -105,6 +109,8 @@ Rest of the documentation is common for **entire promptbook ecosystem**:
|
|
|
105
109
|
|
|
106
110
|
## 🤍 The Promptbook Whitepaper
|
|
107
111
|
|
|
112
|
+
|
|
113
|
+
|
|
108
114
|
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.
|
|
109
115
|
|
|
110
116
|
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:
|
|
@@ -125,6 +131,52 @@ In all of these situations, but especially in 3., the **✨ Promptbook can make
|
|
|
125
131
|
|
|
126
132
|
|
|
127
133
|
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
## 💜 The Promptbook Project
|
|
138
|
+
|
|
139
|
+
Promptbook project is ecosystem of multiple projects and tools, following is a list of most important pieces of the project:
|
|
140
|
+
|
|
141
|
+
<table>
|
|
142
|
+
<thead>
|
|
143
|
+
<tr>
|
|
144
|
+
<th>Project</th>
|
|
145
|
+
<th>Description</th>
|
|
146
|
+
<th>Link</th>
|
|
147
|
+
</tr>
|
|
148
|
+
</thead>
|
|
149
|
+
<tbody>
|
|
150
|
+
<tr>
|
|
151
|
+
<td>Core</td>
|
|
152
|
+
<td>Promptbook core is a description and documentation of basic innerworkings how should be Promptbook implemented and defines which fetures must be descriable by book language</td>
|
|
153
|
+
<td rowspan=2>https://ptbk.io<br/>https://github.com/webgptorg/book</td>
|
|
154
|
+
</tr>
|
|
155
|
+
<tr>
|
|
156
|
+
<td>Book language</td>
|
|
157
|
+
<td>
|
|
158
|
+
Book is a markdown-like language to define core entities like projects, pipelines, knowledge,.... It is designed to be understandable by non-programmers and non-technical people
|
|
159
|
+
</td>
|
|
160
|
+
</tr>
|
|
161
|
+
<tr>
|
|
162
|
+
<td>Promptbook typescript project</td>
|
|
163
|
+
<td>Implementation of Promptbook in TypeScript published into multiple packages to NPM</td>
|
|
164
|
+
<td>https://github.com/webgptorg/promptbook + Multiple packages on NPM</td>
|
|
165
|
+
</tr>
|
|
166
|
+
<tr>
|
|
167
|
+
<td>Promptbook studio</td>
|
|
168
|
+
<td>No-code studio to write book without need to write even the markdown</td>
|
|
169
|
+
<td rowspan=2>https://promptbook.studio<br/>https://github.com/hejny/promptbook-studio</td>
|
|
170
|
+
</tr>
|
|
171
|
+
<tr>
|
|
172
|
+
<td>Promptbook miniapps</td>
|
|
173
|
+
<td>Builder of LLM miniapps from book notation</td>
|
|
174
|
+
</tr>
|
|
175
|
+
</tbody>
|
|
176
|
+
</table>
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
|
|
128
180
|
## 💙 Book language _(for prompt-engineer)_
|
|
129
181
|
|
|
130
182
|
Promptbook [pipelines](https://github.com/webgptorg/promptbook/discussions/64) are written in markdown-like language called [Book](https://github.com/webgptorg/book). It is designed to be understandable by non-programmers and non-technical people.
|
|
@@ -134,6 +186,17 @@ Promptbook [pipelines](https://github.com/webgptorg/promptbook/discussions/64) a
|
|
|
134
186
|
```markdown
|
|
135
187
|
# 🌟 My first Book
|
|
136
188
|
|
|
189
|
+
- INPUT PARAMETER {subject}
|
|
190
|
+
- OUTPUT PARAMETER {article}
|
|
191
|
+
|
|
192
|
+
## Sample subject
|
|
193
|
+
|
|
194
|
+
> Promptbook
|
|
195
|
+
|
|
196
|
+
-> {subject}
|
|
197
|
+
|
|
198
|
+
## Write an article
|
|
199
|
+
|
|
137
200
|
- PERSONA Jane, marketing specialist with prior experience in writing articles about technology and artificial intelligence
|
|
138
201
|
- KNOWLEDGE https://ptbk.io
|
|
139
202
|
- KNOWLEDGE ./promptbook.pdf
|
|
@@ -141,7 +204,7 @@ Promptbook [pipelines](https://github.com/webgptorg/promptbook/discussions/64) a
|
|
|
141
204
|
- EXPECT MAX 1 Paragraph
|
|
142
205
|
|
|
143
206
|
> Write an article about the future of artificial intelligence in the next 10 years and how metalanguages will change the way AI is used in the world.
|
|
144
|
-
> Look specifically at the impact of
|
|
207
|
+
> Look specifically at the impact of {subject} on the AI industry.
|
|
145
208
|
|
|
146
209
|
-> {article}
|
|
147
210
|
```
|
|
@@ -184,11 +247,66 @@ Or you can install them separately:
|
|
|
184
247
|
|
|
185
248
|
|
|
186
249
|
|
|
250
|
+
|
|
251
|
+
|
|
252
|
+
|
|
187
253
|
## 📚 Dictionary
|
|
188
254
|
|
|
255
|
+
|
|
256
|
+
|
|
257
|
+
|
|
258
|
+
|
|
259
|
+
|
|
260
|
+
### 📚 Dictionary
|
|
261
|
+
|
|
189
262
|
The following glossary is used to clarify certain concepts:
|
|
190
263
|
|
|
191
|
-
|
|
264
|
+
#### General LLM / AI terms
|
|
265
|
+
|
|
266
|
+
- **Prompt drift** is a phenomenon where the AI model starts to generate outputs that are not aligned with the original prompt. This can happen due to the model's training data, the prompt's wording, or the model's architecture.
|
|
267
|
+
- **Pipeline, workflow or chain** is a sequence of tasks that are executed in a specific order. In the context of AI, a pipeline can refer to a sequence of AI models that are used to process data.
|
|
268
|
+
- **Fine-tuning** is a process where a pre-trained AI model is further trained on a specific dataset to improve its performance on a specific task.
|
|
269
|
+
- **Zero-shot learning** is a machine learning paradigm where a model is trained to perform a task without any labeled examples. Instead, the model is provided with a description of the task and is expected to generate the correct output.
|
|
270
|
+
- **Few-shot learning** is a machine learning paradigm where a model is trained to perform a task with only a few labeled examples. This is in contrast to traditional machine learning, where models are trained on large datasets.
|
|
271
|
+
- **Meta-learning** is a machine learning paradigm where a model is trained on a variety of tasks and is able to learn new tasks with minimal additional training. This is achieved by learning a set of meta-parameters that can be quickly adapted to new tasks.
|
|
272
|
+
- **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.
|
|
273
|
+
- **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.
|
|
274
|
+
|
|
275
|
+
|
|
276
|
+
|
|
277
|
+
_Note: Thos section is not complete dictionary, more list of general AI / LLM terms that has connection with Promptbook_
|
|
278
|
+
|
|
279
|
+
#### Promptbook core
|
|
280
|
+
|
|
281
|
+
- **Organization** _(legacy name collection)_ group jobs, workforce, knowledge, instruments, and actions into one package. Entities in one organization can share resources (= import resources from each other).
|
|
282
|
+
- **Jobs**
|
|
283
|
+
- **Task**
|
|
284
|
+
- **Subtask**
|
|
285
|
+
- **Workforce**
|
|
286
|
+
- **Persona**
|
|
287
|
+
- **Team**
|
|
288
|
+
- **Role**
|
|
289
|
+
- **Knowledge**
|
|
290
|
+
- **Public**
|
|
291
|
+
- **Private**
|
|
292
|
+
- **Protected**
|
|
293
|
+
- **Instruments**
|
|
294
|
+
- **Actions**
|
|
295
|
+
|
|
296
|
+
#### Book language
|
|
297
|
+
|
|
298
|
+
- **Book file**
|
|
299
|
+
- **Section**
|
|
300
|
+
- **Heading**
|
|
301
|
+
- **Description**
|
|
302
|
+
- **Command**
|
|
303
|
+
- **Block**
|
|
304
|
+
- **Return statement**
|
|
305
|
+
- **Comment**
|
|
306
|
+
- **Import**
|
|
307
|
+
- **Scope**
|
|
308
|
+
|
|
309
|
+
#### 💯 Core concepts
|
|
192
310
|
|
|
193
311
|
- [📚 Collection of pipelines](https://github.com/webgptorg/promptbook/discussions/65)
|
|
194
312
|
- [📯 Pipeline](https://github.com/webgptorg/promptbook/discussions/64)
|
|
@@ -201,7 +319,7 @@ The following glossary is used to clarify certain concepts:
|
|
|
201
319
|
- [🔣 Words not tokens](https://github.com/webgptorg/promptbook/discussions/29)
|
|
202
320
|
- [☯ Separation of concerns](https://github.com/webgptorg/promptbook/discussions/32)
|
|
203
321
|
|
|
204
|
-
|
|
322
|
+
##### Advanced concepts
|
|
205
323
|
|
|
206
324
|
- [📚 Knowledge (Retrieval-augmented generation)](https://github.com/webgptorg/promptbook/discussions/41)
|
|
207
325
|
- [🌏 Remote server](https://github.com/webgptorg/promptbook/discussions/89)
|
|
@@ -216,6 +334,15 @@ The following glossary is used to clarify certain concepts:
|
|
|
216
334
|
- [👮 Agent adversary expectations](https://github.com/webgptorg/promptbook/discussions/39)
|
|
217
335
|
- [view more](https://github.com/webgptorg/promptbook/discussions/categories/concepts)
|
|
218
336
|
|
|
337
|
+
|
|
338
|
+
|
|
339
|
+
### Terms specific to Promptbook TypeScript implementation
|
|
340
|
+
|
|
341
|
+
- Anonymous mode
|
|
342
|
+
- Application mode
|
|
343
|
+
|
|
344
|
+
|
|
345
|
+
|
|
219
346
|
## 🔌 Usage in Typescript / Javascript
|
|
220
347
|
|
|
221
348
|
- [Simple usage](./examples/usage/simple-script)
|