@promptbook/types 0.88.0-9 → 0.88.0
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 +35 -18
- package/esm/typings/src/config.d.ts +1 -1
- package/esm/typings/src/errors/PipelineExecutionError.d.ts +5 -0
- package/esm/typings/src/errors/utils/ErrorJson.d.ts +5 -0
- package/esm/typings/src/utils/expectation-counters/countCharacters.d.ts +3 -0
- package/esm/typings/src/utils/expectation-counters/countLines.d.ts +3 -0
- package/esm/typings/src/utils/expectation-counters/countPages.d.ts +3 -0
- package/esm/typings/src/utils/expectation-counters/countParagraphs.d.ts +3 -0
- package/esm/typings/src/utils/expectation-counters/countSentences.d.ts +3 -0
- package/esm/typings/src/utils/expectation-counters/countWords.d.ts +3 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -23,10 +23,6 @@
|
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
|
|
26
|
-
<blockquote style="color: #ff8811">
|
|
27
|
-
<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>.
|
|
28
|
-
</blockquote>
|
|
29
|
-
|
|
30
26
|
## 📦 Package `@promptbook/types`
|
|
31
27
|
|
|
32
28
|
- Promptbooks are [divided into several](#-packages) packages, all are published from [single monorepo](https://github.com/webgptorg/promptbook).
|
|
@@ -83,6 +79,8 @@ Rest of the documentation is common for **entire promptbook ecosystem**:
|
|
|
83
79
|
|
|
84
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**!
|
|
85
81
|
|
|
82
|
+
|
|
83
|
+
|
|
86
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!
|
|
87
85
|
|
|
88
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.
|
|
@@ -93,6 +91,9 @@ This shift is going to happen, whether we are ready for it or not. Our mission i
|
|
|
93
91
|
|
|
94
92
|
|
|
95
93
|
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
|
|
96
97
|
## 🚀 Get started
|
|
97
98
|
|
|
98
99
|
Take a look at the simple starter kit with books integrated into the **Hello World** sample applications:
|
|
@@ -104,6 +105,8 @@ Take a look at the simple starter kit with books integrated into the **Hello Wor
|
|
|
104
105
|
|
|
105
106
|
|
|
106
107
|
|
|
108
|
+
|
|
109
|
+
|
|
107
110
|
## 💜 The Promptbook Project
|
|
108
111
|
|
|
109
112
|
Promptbook project is ecosystem of multiple projects and tools, following is a list of most important pieces of the project:
|
|
@@ -139,22 +142,35 @@ Promptbook project is ecosystem of multiple projects and tools, following is a l
|
|
|
139
142
|
</tbody>
|
|
140
143
|
</table>
|
|
141
144
|
|
|
145
|
+
Hello world examples:
|
|
146
|
+
|
|
147
|
+
- [Hello world](https://github.com/webgptorg/hello-world)
|
|
148
|
+
- [Hello world in Node.js](https://github.com/webgptorg/hello-world-node-js)
|
|
149
|
+
- [Hello world in Next.js](https://github.com/webgptorg/hello-world-next-js)
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
|
|
142
153
|
We also have a community of developers and users of **Promptbook**:
|
|
143
154
|
|
|
144
155
|
- [Discord community](https://discord.gg/x3QWNaa89N)
|
|
145
156
|
- [Landing page `ptbk.io`](https://ptbk.io)
|
|
146
157
|
- [Github discussions](https://github.com/webgptorg/promptbook/discussions)
|
|
147
158
|
- [LinkedIn `Promptbook`](https://linkedin.com/company/promptbook)
|
|
148
|
-
- [Facebook `Promptbook`](https://www.facebook.com/61560776453536)
|
|
159
|
+
- [Facebook `Promptbook`](https://www.facebook.com/61560776453536)
|
|
149
160
|
|
|
150
161
|
And **Promptbook.studio** branded socials:
|
|
151
162
|
|
|
163
|
+
|
|
164
|
+
|
|
152
165
|
- [Instagram `@promptbook.studio`](https://www.instagram.com/promptbook.studio/)
|
|
153
166
|
|
|
154
167
|
And **Promptujeme** sub-brand:
|
|
155
168
|
|
|
156
169
|
_/Subbrand for Czech clients/_
|
|
157
170
|
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
|
|
158
174
|
- [Promptujeme.cz](https://www.promptujeme.cz/)
|
|
159
175
|
- [Facebook `Promptujeme`](https://www.facebook.com/promptujeme/)
|
|
160
176
|
|
|
@@ -172,6 +188,8 @@ _/Sub-brand for images and graphics generated via Promptbook prompting/_
|
|
|
172
188
|
|
|
173
189
|
## 💙 The Book language
|
|
174
190
|
|
|
191
|
+
|
|
192
|
+
|
|
175
193
|
Following is the documentation and blueprint of the [Book language](https://github.com/webgptorg/book).
|
|
176
194
|
|
|
177
195
|
Book is a language that can be used to write AI applications, agents, workflows, automations, knowledgebases, translators, sheet processors, email automations and more. It allows you to harness the power of AI models in human-like terms, without the need to know the specifics and technicalities of the models.
|
|
@@ -221,6 +239,8 @@ Personas can have access to different knowledge, tools and actions. They can als
|
|
|
221
239
|
|
|
222
240
|
- [PERSONA](https://github.com/webgptorg/promptbook/blob/main/documents/commands/PERSONA.md)
|
|
223
241
|
|
|
242
|
+
|
|
243
|
+
|
|
224
244
|
### **How:** Knowledge, Instruments and Actions
|
|
225
245
|
|
|
226
246
|
The resources used by the personas are used to do the work.
|
|
@@ -296,11 +316,9 @@ Or you can install them separately:
|
|
|
296
316
|
|
|
297
317
|
## 📚 Dictionary
|
|
298
318
|
|
|
299
|
-
### 📚 Dictionary
|
|
300
|
-
|
|
301
319
|
The following glossary is used to clarify certain concepts:
|
|
302
320
|
|
|
303
|
-
|
|
321
|
+
### General LLM / AI terms
|
|
304
322
|
|
|
305
323
|
- **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.
|
|
306
324
|
- **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.
|
|
@@ -311,9 +329,13 @@ The following glossary is used to clarify certain concepts:
|
|
|
311
329
|
- **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
330
|
- **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
331
|
|
|
314
|
-
_Note: Thos section is not complete dictionary, more list of general AI / LLM terms that has connection with Promptbook_
|
|
315
332
|
|
|
316
|
-
|
|
333
|
+
|
|
334
|
+
_Note: This section is not complete dictionary, more list of general AI / LLM terms that has connection with Promptbook_
|
|
335
|
+
|
|
336
|
+
|
|
337
|
+
|
|
338
|
+
### 💯 Core concepts
|
|
317
339
|
|
|
318
340
|
- [📚 Collection of pipelines](https://github.com/webgptorg/promptbook/discussions/65)
|
|
319
341
|
- [📯 Pipeline](https://github.com/webgptorg/promptbook/discussions/64)
|
|
@@ -326,7 +348,7 @@ _Note: Thos section is not complete dictionary, more list of general AI / LLM te
|
|
|
326
348
|
- [🔣 Words not tokens](https://github.com/webgptorg/promptbook/discussions/29)
|
|
327
349
|
- [☯ Separation of concerns](https://github.com/webgptorg/promptbook/discussions/32)
|
|
328
350
|
|
|
329
|
-
|
|
351
|
+
#### Advanced concepts
|
|
330
352
|
|
|
331
353
|
- [📚 Knowledge (Retrieval-augmented generation)](https://github.com/webgptorg/promptbook/discussions/41)
|
|
332
354
|
- [🌏 Remote server](https://github.com/webgptorg/promptbook/discussions/89)
|
|
@@ -341,11 +363,6 @@ _Note: Thos section is not complete dictionary, more list of general AI / LLM te
|
|
|
341
363
|
- [👮 Agent adversary expectations](https://github.com/webgptorg/promptbook/discussions/39)
|
|
342
364
|
- [view more](https://github.com/webgptorg/promptbook/discussions/categories/concepts)
|
|
343
365
|
|
|
344
|
-
### Terms specific to Promptbook TypeScript implementation
|
|
345
|
-
|
|
346
|
-
- Anonymous mode
|
|
347
|
-
- Application mode
|
|
348
|
-
|
|
349
366
|
|
|
350
367
|
|
|
351
368
|
## 🚂 Promptbook Engine
|
|
@@ -416,11 +433,11 @@ See [TODO.md](./TODO.md)
|
|
|
416
433
|
<div style="display: flex; align-items: center; gap: 20px;">
|
|
417
434
|
|
|
418
435
|
<a href="https://promptbook.studio/">
|
|
419
|
-
<img src="./design/promptbook-studio-logo.png" alt="Partner 3" height="
|
|
436
|
+
<img src="./design/promptbook-studio-logo.png" alt="Partner 3" height="70">
|
|
420
437
|
</a>
|
|
421
438
|
|
|
422
439
|
<a href="https://technologickainkubace.org/en/about-technology-incubation/about-the-project/">
|
|
423
|
-
<img src="./other/partners/CI-Technology-Incubation.png" alt="Technology Incubation" height="
|
|
440
|
+
<img src="./other/partners/CI-Technology-Incubation.png" alt="Technology Incubation" height="70">
|
|
424
441
|
</a>
|
|
425
442
|
|
|
426
443
|
</div>
|
|
@@ -162,7 +162,7 @@ export declare const DEFAULT_MAX_PARALLEL_COUNT = 5;
|
|
|
162
162
|
*
|
|
163
163
|
* @public exported from `@promptbook/core`
|
|
164
164
|
*/
|
|
165
|
-
export declare const DEFAULT_MAX_EXECUTION_ATTEMPTS =
|
|
165
|
+
export declare const DEFAULT_MAX_EXECUTION_ATTEMPTS = 10;
|
|
166
166
|
/**
|
|
167
167
|
* @@@
|
|
168
168
|
* TODO: [🐝][main] !!3 Use
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { task_id } from '../types/typeAliases';
|
|
1
2
|
/**
|
|
2
3
|
* This error indicates errors during the execution of the pipeline
|
|
3
4
|
*
|
|
@@ -5,5 +6,9 @@
|
|
|
5
6
|
*/
|
|
6
7
|
export declare class PipelineExecutionError extends Error {
|
|
7
8
|
readonly name = "PipelineExecutionError";
|
|
9
|
+
readonly id?: task_id;
|
|
8
10
|
constructor(message: string);
|
|
9
11
|
}
|
|
12
|
+
/**
|
|
13
|
+
* TODO: !!!!!! Add id to all errors
|
|
14
|
+
*/
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { task_id } from '../../types/typeAliases';
|
|
1
2
|
import type { ALL_ERRORS } from '../0-index';
|
|
2
3
|
/**
|
|
3
4
|
* Represents a serialized error or custom Promptbook error
|
|
@@ -5,6 +6,10 @@ import type { ALL_ERRORS } from '../0-index';
|
|
|
5
6
|
* Note: [🚉] This is fully serializable as JSON
|
|
6
7
|
*/
|
|
7
8
|
export type ErrorJson = {
|
|
9
|
+
/**
|
|
10
|
+
* The unique identifier of the error
|
|
11
|
+
*/
|
|
12
|
+
readonly id?: task_id;
|
|
8
13
|
/**
|
|
9
14
|
* The type of the error
|
|
10
15
|
*/
|
|
@@ -5,3 +5,6 @@ import type { ExpectationAmount } from '../../pipeline/PipelineJson/Expectations
|
|
|
5
5
|
* @public exported from `@promptbook/utils`
|
|
6
6
|
*/
|
|
7
7
|
export declare function countCharacters(text: string): ExpectationAmount;
|
|
8
|
+
/**
|
|
9
|
+
* TODO: [🥴] Implement counting in formats - like JSON, CSV, XML,...
|
|
10
|
+
*/
|
|
@@ -7,3 +7,6 @@ import type { ExpectationAmount } from '../../pipeline/PipelineJson/Expectations
|
|
|
7
7
|
* @public exported from `@promptbook/utils`
|
|
8
8
|
*/
|
|
9
9
|
export declare function countLines(text: string): ExpectationAmount;
|
|
10
|
+
/**
|
|
11
|
+
* TODO: [🥴] Implement counting in formats - like JSON, CSV, XML,...
|
|
12
|
+
*/
|
|
@@ -7,3 +7,6 @@ import type { ExpectationAmount } from '../../pipeline/PipelineJson/Expectations
|
|
|
7
7
|
* @public exported from `@promptbook/utils`
|
|
8
8
|
*/
|
|
9
9
|
export declare function countPages(text: string): ExpectationAmount;
|
|
10
|
+
/**
|
|
11
|
+
* TODO: [🥴] Implement counting in formats - like JSON, CSV, XML,...
|
|
12
|
+
*/
|
|
@@ -5,3 +5,6 @@ import type { ExpectationAmount } from '../../pipeline/PipelineJson/Expectations
|
|
|
5
5
|
* @public exported from `@promptbook/utils`
|
|
6
6
|
*/
|
|
7
7
|
export declare function countParagraphs(text: string): ExpectationAmount;
|
|
8
|
+
/**
|
|
9
|
+
* TODO: [🥴] Implement counting in formats - like JSON, CSV, XML,...
|
|
10
|
+
*/
|
|
@@ -11,3 +11,6 @@ export declare function splitIntoSentences(text: string): ReadonlyArray<string>;
|
|
|
11
11
|
* @public exported from `@promptbook/utils`
|
|
12
12
|
*/
|
|
13
13
|
export declare function countSentences(text: string): ExpectationAmount;
|
|
14
|
+
/**
|
|
15
|
+
* TODO: [🥴] Implement counting in formats - like JSON, CSV, XML,...
|
|
16
|
+
*/
|
|
@@ -5,3 +5,6 @@ import type { ExpectationAmount } from '../../pipeline/PipelineJson/Expectations
|
|
|
5
5
|
* @public exported from `@promptbook/utils`
|
|
6
6
|
*/
|
|
7
7
|
export declare function countWords(text: string): ExpectationAmount;
|
|
8
|
+
/**
|
|
9
|
+
* TODO: [🥴] Implement counting in formats - like JSON, CSV, XML,...
|
|
10
|
+
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@promptbook/types",
|
|
3
|
-
"version": "0.88.0
|
|
3
|
+
"version": "0.88.0",
|
|
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.88.0
|
|
48
|
+
"@promptbook/core": "0.88.0"
|
|
49
49
|
}
|
|
50
50
|
}
|