@promptbook/types 0.86.0-8 → 0.86.6
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 +54 -59
- package/esm/typings/src/cli/test/ptbk2.d.ts +5 -0
- package/esm/typings/src/conversion/compilePipeline.d.ts +1 -1
- package/esm/typings/src/conversion/compilePipelineOnRemoteServer.d.ts +1 -1
- package/esm/typings/src/conversion/parsePipeline.d.ts +1 -1
- package/esm/typings/src/conversion/pipelineJsonToString.d.ts +1 -1
- package/esm/typings/src/conversion/validation/_importPipeline.d.ts +6 -6
- package/esm/typings/src/pipeline/PipelineJson/PreparationJson.d.ts +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
[ Promptbook](https://badge.fury.io/js/promptbook.svg)](https://www.npmjs.com/package/promptbook)
|
|
9
|
+
[ Promptbook](https://packagequality.com/shield/promptbook.svg)](https://packagequality.com/#?package=promptbook)
|
|
10
10
|
[](https://snyk.io/test/github/webgptorg/promptbook)
|
|
11
11
|
[](https://github.com/webgptorg/promptbook/issues)
|
|
12
12
|
|
|
@@ -17,18 +17,12 @@
|
|
|
17
17
|
## 🌟 New Features
|
|
18
18
|
|
|
19
19
|
- 📂 We have plugin for [VSCode](https://github.com/webgptorg/book-extension) to support `.book` file extension
|
|
20
|
+
- 🐳 Available [Docker image](https://hub.docker.com/r/hejny/promptbook/)
|
|
20
21
|
- 💫 Support of [`o3-mini` model by OpenAI](https://openai.com/index/openai-o3-mini/)
|
|
21
22
|
- 🐋 **Support of [DeepSeek models](https://www.npmjs.com/package/@promptbook/deepseek)**
|
|
22
|
-
- 💙 Working [the **Book** language v1.0.0](https://github.com/webgptorg/book)
|
|
23
|
-
- 🖤 Run books from CLI - `npx ptbk run path/to/your/book`
|
|
24
|
-
- 📚 Support of `.docx`, `.doc` and `.pdf` documents as knowledge
|
|
25
23
|
|
|
26
24
|
|
|
27
25
|
|
|
28
|
-
<blockquote style="color: #ff8811">
|
|
29
|
-
<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>.
|
|
30
|
-
</blockquote>
|
|
31
|
-
|
|
32
26
|
## 📦 Package `@promptbook/types`
|
|
33
27
|
|
|
34
28
|
- Promptbooks are [divided into several](#-packages) packages, all are published from [single monorepo](https://github.com/webgptorg/promptbook).
|
|
@@ -85,6 +79,8 @@ Rest of the documentation is common for **entire promptbook ecosystem**:
|
|
|
85
79
|
|
|
86
80
|
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**!
|
|
87
81
|
|
|
82
|
+
|
|
83
|
+
|
|
88
84
|
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!
|
|
89
85
|
|
|
90
86
|
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.
|
|
@@ -121,17 +117,22 @@ Promptbook project is ecosystem of multiple projects and tools, following is a l
|
|
|
121
117
|
<tr>
|
|
122
118
|
<td><a href="https://github.com/webgptorg/book">Book language</a></td>
|
|
123
119
|
<td>
|
|
124
|
-
Book is a
|
|
120
|
+
Book is a human-understandable markup language for writing AI applications such as chatbots, knowledge bases, agents, avarars, translators, automations and more.
|
|
121
|
+
<hr>
|
|
125
122
|
There is also <a href="https://github.com/webgptorg/book-extension">a plugin for VSCode</a> to support <code>.book</code> file extension
|
|
126
123
|
</td>
|
|
127
124
|
</tr>
|
|
128
125
|
<tr>
|
|
129
126
|
<td><a href="https://github.com/webgptorg/promptbook">Promptbook Engine</a></td>
|
|
130
|
-
<td>
|
|
127
|
+
<td>
|
|
128
|
+
Promptbook engine can run applications written in Book language. It is released as <a href="https://www.npmjs.com/package/@promptbook/core#-packages-for-developers">multiple NPM packages</a> and <a href="https://hub.docker.com/r/hejny/promptbook">Docker HUB</a>
|
|
129
|
+
</td>
|
|
131
130
|
</tr>
|
|
132
131
|
<tr>
|
|
133
132
|
<td><a href="https://promptbook.studio">Promptbook Studio</a></td>
|
|
134
|
-
<td>
|
|
133
|
+
<td>
|
|
134
|
+
Promptbook.studio is a web-based editor and runner for book applications. It is still in the experimental MVP stage.
|
|
135
|
+
</td>
|
|
135
136
|
</tr>
|
|
136
137
|
</tbody>
|
|
137
138
|
</table>
|
|
@@ -142,16 +143,21 @@ We also have a community of developers and users of **Promptbook**:
|
|
|
142
143
|
- [Landing page `ptbk.io`](https://ptbk.io)
|
|
143
144
|
- [Github discussions](https://github.com/webgptorg/promptbook/discussions)
|
|
144
145
|
- [LinkedIn `Promptbook`](https://linkedin.com/company/promptbook)
|
|
145
|
-
- [Facebook `Promptbook`](https://www.facebook.com/61560776453536)
|
|
146
|
+
- [Facebook `Promptbook`](https://www.facebook.com/61560776453536)
|
|
146
147
|
|
|
147
148
|
And **Promptbook.studio** branded socials:
|
|
148
149
|
|
|
150
|
+
|
|
151
|
+
|
|
149
152
|
- [Instagram `@promptbook.studio`](https://www.instagram.com/promptbook.studio/)
|
|
150
153
|
|
|
151
154
|
And **Promptujeme** sub-brand:
|
|
152
155
|
|
|
153
156
|
_/Subbrand for Czech clients/_
|
|
154
157
|
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
|
|
155
161
|
- [Promptujeme.cz](https://www.promptujeme.cz/)
|
|
156
162
|
- [Facebook `Promptujeme`](https://www.facebook.com/promptujeme/)
|
|
157
163
|
|
|
@@ -160,16 +166,18 @@ And **Promptbook.city** branded socials:
|
|
|
160
166
|
_/Sub-brand for images and graphics generated via Promptbook prompting/_
|
|
161
167
|
|
|
162
168
|
- [Instagram `@promptbook.city`](https://www.instagram.com/promptbook.city/)
|
|
163
|
-
- [Facebook `Promptbook City`](https://www.facebook.com/61565718625569)
|
|
169
|
+
- [Facebook `Promptbook City`](https://www.facebook.com/61565718625569)
|
|
170
|
+
|
|
171
|
+
##
|
|
172
|
+
|
|
164
173
|
|
|
165
174
|
|
|
166
175
|
|
|
167
|
-
## 💙 Book language _(for prompt-engineer)_
|
|
168
176
|
|
|
169
177
|
|
|
178
|
+
## 💙 The Book language
|
|
170
179
|
|
|
171
180
|
|
|
172
|
-
## 💙 The blueprint of book language
|
|
173
181
|
|
|
174
182
|
Following is the documentation and blueprint of the Book language.
|
|
175
183
|
|
|
@@ -178,6 +186,11 @@ Following is the documentation and blueprint of the Book language.
|
|
|
178
186
|
```markdown
|
|
179
187
|
# 🌟 My first Book
|
|
180
188
|
|
|
189
|
+
- BOOK VERSION 1.0.0
|
|
190
|
+
- URL https://promptbook.studio/my-first-book/
|
|
191
|
+
|
|
192
|
+
# Write an article
|
|
193
|
+
|
|
181
194
|
- PERSONA Jane, marketing specialist with prior experience in writing articles about technology and artificial intelligence
|
|
182
195
|
- KNOWLEDGE https://ptbk.io
|
|
183
196
|
- KNOWLEDGE ./promptbook.pdf
|
|
@@ -190,59 +203,31 @@ Following is the documentation and blueprint of the Book language.
|
|
|
190
203
|
-> {article}
|
|
191
204
|
```
|
|
192
205
|
|
|
193
|
-
###
|
|
206
|
+
### **What:** Workflows, Tasks and Parameters
|
|
194
207
|
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
It has file with `.book.md` or `.book` extension with `UTF-8` non BOM encoding.
|
|
198
|
-
|
|
199
|
-
As it is source code, it can leverage all the features of version control systems like git and does not suffer from the problems of binary formats, proprietary formats, or no-code solutions.
|
|
200
|
-
|
|
201
|
-
But unlike programming languages, it is designed to be understandable by non-programmers and non-technical people.
|
|
208
|
+
- [PARAMETER](https://github.com/webgptorg/promptbook/blob/main/documents/commands/PARAMETER.md)
|
|
202
209
|
|
|
203
|
-
###
|
|
210
|
+
### **Who:** Personas
|
|
204
211
|
|
|
205
|
-
|
|
212
|
+
- [PERSONA](https://github.com/webgptorg/promptbook/blob/main/documents/commands/PERSONA.md)
|
|
206
213
|
|
|
207
|
-
###
|
|
214
|
+
### **How:** Knowledge, Instruments and Actions
|
|
208
215
|
|
|
209
|
-
|
|
216
|
+
- [KNOWLEDGE](https://github.com/webgptorg/promptbook/blob/main/documents/commands/KNOWLEDGE.md)
|
|
217
|
+
- [INSTRUMENT](https://github.com/webgptorg/promptbook/blob/main/documents/commands/INSTRUMENT.md)
|
|
218
|
+
- [ACTION](https://github.com/webgptorg/promptbook/blob/main/documents/commands/ACTION.md)
|
|
210
219
|
|
|
211
|
-
###
|
|
220
|
+
### General principles of book language
|
|
212
221
|
|
|
213
|
-
|
|
222
|
+
Book language is based on markdown. It is subset of markdown. It is designed to be easy to read and write. It is designed to be understandable by both humans and machines and without specific knowledge of the language.
|
|
214
223
|
|
|
215
|
-
|
|
224
|
+
The file has `.book` extension. It uses `UTF-8` non BOM encoding.
|
|
216
225
|
|
|
217
|
-
|
|
226
|
+
Book has two variants: flat - which is just a prompt with no structure, and full - which has a structure with tasks, commands and prompts.
|
|
218
227
|
|
|
219
|
-
|
|
220
|
-
- `content`
|
|
221
|
-
- `context`
|
|
222
|
-
- `knowledge`
|
|
223
|
-
- `examples`
|
|
224
|
-
- `modelName`
|
|
225
|
-
- `currentDate`
|
|
226
|
-
|
|
227
|
-
#### Parameter notation
|
|
228
|
-
|
|
229
|
-
### Task
|
|
230
|
-
|
|
231
|
-
### Task type
|
|
232
|
-
|
|
233
|
-
Todo todo
|
|
234
|
-
|
|
235
|
-
### Command
|
|
236
|
-
|
|
237
|
-
Todo todo
|
|
238
|
-
|
|
239
|
-
### Block
|
|
240
|
-
|
|
241
|
-
Todo todo
|
|
242
|
-
|
|
243
|
-
### Return parameter
|
|
228
|
+
As it is source code, it can leverage all the features of version control systems like git and does not suffer from the problems of binary formats, proprietary formats, or no-code solutions.
|
|
244
229
|
|
|
245
|
-
|
|
230
|
+
But unlike programming languages, it is designed to be understandable by non-programmers and non-technical people.
|
|
246
231
|
|
|
247
232
|
|
|
248
233
|
|
|
@@ -288,6 +273,7 @@ Or you can install them separately:
|
|
|
288
273
|
- **[@promptbook/templates](https://www.npmjs.com/package/@promptbook/templates)** - Usefull templates and examples of books which can be used as a starting point
|
|
289
274
|
- **[@promptbook/types](https://www.npmjs.com/package/@promptbook/types)** - Just typescript types used in the library
|
|
290
275
|
- ⭐ **[@promptbook/cli](https://www.npmjs.com/package/@promptbook/cli)** - Command line interface utilities for promptbooks
|
|
276
|
+
- 🐋 **[Docker image](https://hub.docker.com/r/hejny/promptbook/)** - Promptbook server
|
|
291
277
|
|
|
292
278
|
|
|
293
279
|
|
|
@@ -296,6 +282,11 @@ Or you can install them separately:
|
|
|
296
282
|
|
|
297
283
|
## 📚 Dictionary
|
|
298
284
|
|
|
285
|
+
|
|
286
|
+
|
|
287
|
+
|
|
288
|
+
|
|
289
|
+
|
|
299
290
|
### 📚 Dictionary
|
|
300
291
|
|
|
301
292
|
The following glossary is used to clarify certain concepts:
|
|
@@ -311,6 +302,8 @@ The following glossary is used to clarify certain concepts:
|
|
|
311
302
|
- **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.
|
|
312
303
|
- **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.
|
|
313
304
|
|
|
305
|
+
|
|
306
|
+
|
|
314
307
|
_Note: Thos section is not complete dictionary, more list of general AI / LLM terms that has connection with Promptbook_
|
|
315
308
|
|
|
316
309
|
#### Promptbook core
|
|
@@ -371,6 +364,8 @@ _Note: Thos section is not complete dictionary, more list of general AI / LLM te
|
|
|
371
364
|
- [👮 Agent adversary expectations](https://github.com/webgptorg/promptbook/discussions/39)
|
|
372
365
|
- [view more](https://github.com/webgptorg/promptbook/discussions/categories/concepts)
|
|
373
366
|
|
|
367
|
+
|
|
368
|
+
|
|
374
369
|
### Terms specific to Promptbook TypeScript implementation
|
|
375
370
|
|
|
376
371
|
- Anonymous mode
|
|
@@ -450,7 +445,7 @@ See [TODO.md](./TODO.md)
|
|
|
450
445
|
<div style="display: flex; align-items: center; gap: 20px;">
|
|
451
446
|
|
|
452
447
|
<a href="https://promptbook.studio/">
|
|
453
|
-
<img src="./
|
|
448
|
+
<img src="./design/promptbook-studio-logo.png" alt="Partner 3" height="100">
|
|
454
449
|
</a>
|
|
455
450
|
|
|
456
451
|
<a href="https://technologickainkubace.org/en/about-technology-incubation/about-the-project/">
|
|
@@ -13,7 +13,7 @@ import type { PrepareAndScrapeOptions } from '../prepare/PrepareAndScrapeOptions
|
|
|
13
13
|
* @param pipelineString {Promptbook} in string markdown format (.book.md)
|
|
14
14
|
* @param tools - Tools for the preparation and scraping - if not provided together with `llm`, the preparation will be skipped
|
|
15
15
|
* @param options - Options and tools for the compilation
|
|
16
|
-
* @returns {Promptbook} compiled in JSON format (.
|
|
16
|
+
* @returns {Promptbook} compiled in JSON format (.bookc)
|
|
17
17
|
* @throws {ParseError} if the promptbook string is not valid
|
|
18
18
|
* @public exported from `@promptbook/core`
|
|
19
19
|
*/
|
|
@@ -11,7 +11,7 @@ import type { RemoteClientOptions } from '../remote-server/types/RemoteClientOpt
|
|
|
11
11
|
*
|
|
12
12
|
* @param pipelineString {Promptbook} in string markdown format (.book.md)
|
|
13
13
|
* @param options - Configuration of the remote server
|
|
14
|
-
* @returns {Promptbook} compiled in JSON format (.
|
|
14
|
+
* @returns {Promptbook} compiled in JSON format (.bookc)
|
|
15
15
|
* @throws {ParseError} if the promptbook string is not valid
|
|
16
16
|
* @public exported from `@promptbook/remote-client`
|
|
17
17
|
*/
|
|
@@ -12,7 +12,7 @@ import type { PipelineString } from '../pipeline/PipelineString';
|
|
|
12
12
|
* Note: This function acts as compilation process
|
|
13
13
|
*
|
|
14
14
|
* @param pipelineString {Promptbook} in string markdown format (.book.md)
|
|
15
|
-
* @returns {Promptbook} compiled in JSON format (.
|
|
15
|
+
* @returns {Promptbook} compiled in JSON format (.bookc)
|
|
16
16
|
* @throws {ParseError} if the promptbook string is not valid
|
|
17
17
|
* @public exported from `@promptbook/core`
|
|
18
18
|
*/
|
|
@@ -4,7 +4,7 @@ import type { PipelineString } from '../pipeline/PipelineString';
|
|
|
4
4
|
* Converts promptbook in JSON format to string format
|
|
5
5
|
*
|
|
6
6
|
* @deprecated TODO: [🥍][🧠] Backup original files in `PipelineJson` same as in Promptbook.studio
|
|
7
|
-
* @param pipelineJson Promptbook in JSON format (.
|
|
7
|
+
* @param pipelineJson Promptbook in JSON format (.bookc)
|
|
8
8
|
* @returns Promptbook in string format (.book.md)
|
|
9
9
|
* @public exported from `@promptbook/core`
|
|
10
10
|
*/
|
|
@@ -2,7 +2,7 @@ import type { PipelineJson } from '../../pipeline/PipelineJson/PipelineJson';
|
|
|
2
2
|
import type { PipelineString } from '../../pipeline/PipelineString';
|
|
3
3
|
import type { string_json } from '../../types/typeAliases';
|
|
4
4
|
/**
|
|
5
|
-
* Import the pipeline.book or pipeline.
|
|
5
|
+
* Import the pipeline.book or pipeline.bookc file
|
|
6
6
|
*
|
|
7
7
|
* Note: Using here custom import to work in jest tests
|
|
8
8
|
* Note: Using sync version is 💩 in the production code, but it's ok here in tests
|
|
@@ -11,19 +11,19 @@ import type { string_json } from '../../types/typeAliases';
|
|
|
11
11
|
* @private internal function of tests
|
|
12
12
|
*/
|
|
13
13
|
export declare function importPipelineWithoutPreparation(path: `${string}.book`): PipelineString;
|
|
14
|
-
export declare function importPipelineWithoutPreparation(path: `${string}.
|
|
14
|
+
export declare function importPipelineWithoutPreparation(path: `${string}.bookc`): PipelineJson;
|
|
15
15
|
/**
|
|
16
|
-
* Import the pipeline.
|
|
16
|
+
* Import the pipeline.bookc file as parsed JSON
|
|
17
17
|
*
|
|
18
18
|
* @private internal function of tests
|
|
19
19
|
*/
|
|
20
|
-
export declare function importPipelineJson(path: `${string}.
|
|
20
|
+
export declare function importPipelineJson(path: `${string}.bookc`): PipelineJson;
|
|
21
21
|
/**
|
|
22
|
-
* Import the pipeline.
|
|
22
|
+
* Import the pipeline.bookc file as string
|
|
23
23
|
*
|
|
24
24
|
* @private internal function of tests
|
|
25
25
|
*/
|
|
26
|
-
export declare function importPipelineJsonAsString(path: `${string}.
|
|
26
|
+
export declare function importPipelineJsonAsString(path: `${string}.bookc`): string_json<PipelineJson>;
|
|
27
27
|
/**
|
|
28
28
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
29
29
|
* Note: [⚫] Code in this file should never be published in any package
|
|
@@ -18,5 +18,5 @@ export type PreparationJson = {
|
|
|
18
18
|
/**
|
|
19
19
|
* TODO: [🍙] Make some standard order of json properties
|
|
20
20
|
* TODO: Maybe put here used `modelName`
|
|
21
|
-
* TODO: [🍥] When using `date` it changes all examples .
|
|
21
|
+
* TODO: [🍥] When using `date` it changes all examples .bookc files each time so until some more elegant solution omit the time from prepared pipeline
|
|
22
22
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@promptbook/types",
|
|
3
|
-
"version": "0.86.
|
|
3
|
+
"version": "0.86.6",
|
|
4
4
|
"description": "It's time for a paradigm shift. The future of software in plain English, French or Latin",
|
|
5
5
|
"private": false,
|
|
6
6
|
"sideEffects": false,
|
|
@@ -45,6 +45,6 @@
|
|
|
45
45
|
"homepage": "https://ptbk.io/",
|
|
46
46
|
"typings": "./esm/typings/src/_packages/types.index.d.ts",
|
|
47
47
|
"peerDependencies": {
|
|
48
|
-
"@promptbook/core": "0.86.
|
|
48
|
+
"@promptbook/core": "0.86.6"
|
|
49
49
|
}
|
|
50
50
|
}
|