@promptbook/types 0.88.0-8 → 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 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).
@@ -95,6 +91,9 @@ This shift is going to happen, whether we are ready for it or not. Our mission i
95
91
 
96
92
 
97
93
 
94
+
95
+
96
+
98
97
  ## 🚀 Get started
99
98
 
100
99
  Take a look at the simple starter kit with books integrated into the **Hello World** sample applications:
@@ -106,6 +105,8 @@ Take a look at the simple starter kit with books integrated into the **Hello Wor
106
105
 
107
106
 
108
107
 
108
+
109
+
109
110
  ## 💜 The Promptbook Project
110
111
 
111
112
  Promptbook project is ecosystem of multiple projects and tools, following is a list of most important pieces of the project:
@@ -141,6 +142,14 @@ Promptbook project is ecosystem of multiple projects and tools, following is a l
141
142
  </tbody>
142
143
  </table>
143
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
+
144
153
  We also have a community of developers and users of **Promptbook**:
145
154
 
146
155
  - [Discord community](https://discord.gg/x3QWNaa89N)
@@ -307,16 +316,9 @@ Or you can install them separately:
307
316
 
308
317
  ## 📚 Dictionary
309
318
 
310
-
311
-
312
-
313
-
314
-
315
- ### 📚 Dictionary
316
-
317
319
  The following glossary is used to clarify certain concepts:
318
320
 
319
- #### General LLM / AI terms
321
+ ### General LLM / AI terms
320
322
 
321
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.
322
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.
@@ -329,11 +331,11 @@ The following glossary is used to clarify certain concepts:
329
331
 
330
332
 
331
333
 
332
- _Note: Thos section is not complete dictionary, more list of general AI / LLM terms that has connection with Promptbook_
334
+ _Note: This section is not complete dictionary, more list of general AI / LLM terms that has connection with Promptbook_
333
335
 
334
336
 
335
337
 
336
- #### 💯 Core concepts
338
+ ### 💯 Core concepts
337
339
 
338
340
  - [📚 Collection of pipelines](https://github.com/webgptorg/promptbook/discussions/65)
339
341
  - [📯 Pipeline](https://github.com/webgptorg/promptbook/discussions/64)
@@ -346,7 +348,7 @@ _Note: Thos section is not complete dictionary, more list of general AI / LLM te
346
348
  - [🔣 Words not tokens](https://github.com/webgptorg/promptbook/discussions/29)
347
349
  - [☯ Separation of concerns](https://github.com/webgptorg/promptbook/discussions/32)
348
350
 
349
- ##### Advanced concepts
351
+ #### Advanced concepts
350
352
 
351
353
  - [📚 Knowledge (Retrieval-augmented generation)](https://github.com/webgptorg/promptbook/discussions/41)
352
354
  - [🌏 Remote server](https://github.com/webgptorg/promptbook/discussions/89)
@@ -363,17 +365,9 @@ _Note: Thos section is not complete dictionary, more list of general AI / LLM te
363
365
 
364
366
 
365
367
 
366
- ### Terms specific to Promptbook TypeScript implementation
367
-
368
- - Anonymous mode
369
- - Application mode
370
-
371
-
372
-
373
- ## 🔌 Usage in Typescript / Javascript
368
+ ## 🚂 Promptbook Engine
374
369
 
375
- - [Simple usage](./examples/usage/simple-script)
376
- - [Usage with client and remote server](./examples/usage/remote)
370
+ ![Schema of Promptbook Engine](./documents/promptbook-engine.svg)
377
371
 
378
372
  ## ➕➖ When to use Promptbook?
379
373
 
@@ -439,11 +433,11 @@ See [TODO.md](./TODO.md)
439
433
  <div style="display: flex; align-items: center; gap: 20px;">
440
434
 
441
435
  <a href="https://promptbook.studio/">
442
- <img src="./design/promptbook-studio-logo.png" alt="Partner 3" height="100">
436
+ <img src="./design/promptbook-studio-logo.png" alt="Partner 3" height="70">
443
437
  </a>
444
438
 
445
439
  <a href="https://technologickainkubace.org/en/about-technology-incubation/about-the-project/">
446
- <img src="./other/partners/CI-Technology-Incubation.png" alt="Technology Incubation" height="100">
440
+ <img src="./other/partners/CI-Technology-Incubation.png" alt="Technology Incubation" height="70">
447
441
  </a>
448
442
 
449
443
  </div>
@@ -62,6 +62,7 @@ import { clonePipeline } from '../utils/serialization/clonePipeline';
62
62
  import { deepClone } from '../utils/serialization/deepClone';
63
63
  import { exportJson } from '../utils/serialization/exportJson';
64
64
  import { isSerializableAsJson } from '../utils/serialization/isSerializableAsJson';
65
+ import { jsonStringsToJsons } from '../utils/serialization/jsonStringsToJsons';
65
66
  import { difference } from '../utils/sets/difference';
66
67
  import { intersection } from '../utils/sets/intersection';
67
68
  import { union } from '../utils/sets/union';
@@ -143,6 +144,7 @@ export { clonePipeline };
143
144
  export { deepClone };
144
145
  export { exportJson };
145
146
  export { isSerializableAsJson };
147
+ export { jsonStringsToJsons };
146
148
  export { difference };
147
149
  export { intersection };
148
150
  export { union };
@@ -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 = 3;
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
+ */
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Recursively converts JSON strings to JSON objects
3
+
4
+ * @public exported from `@promptbook/utils`
5
+ */
6
+ export declare function jsonStringsToJsons<T>(object: T): T;
7
+ /**
8
+ * TODO: Type the return type correctly
9
+ */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@promptbook/types",
3
- "version": "0.88.0-8",
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-8"
48
+ "@promptbook/core": "0.88.0"
49
49
  }
50
50
  }