@promptbook/openai 0.88.0-1 → 0.88.0-9
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 +3 -26
- package/esm/index.es.js +1 -1
- package/esm/typings/src/_packages/types.index.d.ts +2 -0
- package/esm/typings/src/_packages/utils.index.d.ts +2 -0
- package/esm/typings/src/cli/cli-commands/common/handleActionErrors.d.ts +11 -0
- package/esm/typings/src/execution/ExecutionTask.d.ts +24 -0
- package/esm/typings/src/utils/serialization/jsonStringsToJsons.d.ts +9 -0
- package/esm/typings/src/utils/serialization/jsonStringsToJsons.test.d.ts +1 -0
- package/package.json +2 -2
- package/umd/index.umd.js +1 -1
package/README.md
CHANGED
|
@@ -261,8 +261,6 @@ Rest of the documentation is common for **entire promptbook ecosystem**:
|
|
|
261
261
|
|
|
262
262
|
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**!
|
|
263
263
|
|
|
264
|
-
|
|
265
|
-
|
|
266
264
|
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!
|
|
267
265
|
|
|
268
266
|
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.
|
|
@@ -325,21 +323,16 @@ We also have a community of developers and users of **Promptbook**:
|
|
|
325
323
|
- [Landing page `ptbk.io`](https://ptbk.io)
|
|
326
324
|
- [Github discussions](https://github.com/webgptorg/promptbook/discussions)
|
|
327
325
|
- [LinkedIn `Promptbook`](https://linkedin.com/company/promptbook)
|
|
328
|
-
- [Facebook `Promptbook`](https://www.facebook.com/61560776453536)
|
|
326
|
+
- [Facebook `Promptbook`](https://www.facebook.com/61560776453536)
|
|
329
327
|
|
|
330
328
|
And **Promptbook.studio** branded socials:
|
|
331
329
|
|
|
332
|
-
|
|
333
|
-
|
|
334
330
|
- [Instagram `@promptbook.studio`](https://www.instagram.com/promptbook.studio/)
|
|
335
331
|
|
|
336
332
|
And **Promptujeme** sub-brand:
|
|
337
333
|
|
|
338
334
|
_/Subbrand for Czech clients/_
|
|
339
335
|
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
336
|
- [Promptujeme.cz](https://www.promptujeme.cz/)
|
|
344
337
|
- [Facebook `Promptujeme`](https://www.facebook.com/promptujeme/)
|
|
345
338
|
|
|
@@ -357,8 +350,6 @@ _/Sub-brand for images and graphics generated via Promptbook prompting/_
|
|
|
357
350
|
|
|
358
351
|
## 💙 The Book language
|
|
359
352
|
|
|
360
|
-
|
|
361
|
-
|
|
362
353
|
Following is the documentation and blueprint of the [Book language](https://github.com/webgptorg/book).
|
|
363
354
|
|
|
364
355
|
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.
|
|
@@ -408,8 +399,6 @@ Personas can have access to different knowledge, tools and actions. They can als
|
|
|
408
399
|
|
|
409
400
|
- [PERSONA](https://github.com/webgptorg/promptbook/blob/main/documents/commands/PERSONA.md)
|
|
410
401
|
|
|
411
|
-
|
|
412
|
-
|
|
413
402
|
### **How:** Knowledge, Instruments and Actions
|
|
414
403
|
|
|
415
404
|
The resources used by the personas are used to do the work.
|
|
@@ -485,11 +474,6 @@ Or you can install them separately:
|
|
|
485
474
|
|
|
486
475
|
## 📚 Dictionary
|
|
487
476
|
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
477
|
### 📚 Dictionary
|
|
494
478
|
|
|
495
479
|
The following glossary is used to clarify certain concepts:
|
|
@@ -505,12 +489,8 @@ The following glossary is used to clarify certain concepts:
|
|
|
505
489
|
- **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.
|
|
506
490
|
- **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.
|
|
507
491
|
|
|
508
|
-
|
|
509
|
-
|
|
510
492
|
_Note: Thos section is not complete dictionary, more list of general AI / LLM terms that has connection with Promptbook_
|
|
511
493
|
|
|
512
|
-
|
|
513
|
-
|
|
514
494
|
#### 💯 Core concepts
|
|
515
495
|
|
|
516
496
|
- [📚 Collection of pipelines](https://github.com/webgptorg/promptbook/discussions/65)
|
|
@@ -539,8 +519,6 @@ _Note: Thos section is not complete dictionary, more list of general AI / LLM te
|
|
|
539
519
|
- [👮 Agent adversary expectations](https://github.com/webgptorg/promptbook/discussions/39)
|
|
540
520
|
- [view more](https://github.com/webgptorg/promptbook/discussions/categories/concepts)
|
|
541
521
|
|
|
542
|
-
|
|
543
|
-
|
|
544
522
|
### Terms specific to Promptbook TypeScript implementation
|
|
545
523
|
|
|
546
524
|
- Anonymous mode
|
|
@@ -548,10 +526,9 @@ _Note: Thos section is not complete dictionary, more list of general AI / LLM te
|
|
|
548
526
|
|
|
549
527
|
|
|
550
528
|
|
|
551
|
-
##
|
|
529
|
+
## 🚂 Promptbook Engine
|
|
552
530
|
|
|
553
|
-
|
|
554
|
-
- [Usage with client and remote server](./examples/usage/remote)
|
|
531
|
+

|
|
555
532
|
|
|
556
533
|
## ➕➖ When to use Promptbook?
|
|
557
534
|
|
package/esm/index.es.js
CHANGED
|
@@ -16,7 +16,7 @@ const BOOK_LANGUAGE_VERSION = '1.0.0';
|
|
|
16
16
|
* @generated
|
|
17
17
|
* @see https://github.com/webgptorg/promptbook
|
|
18
18
|
*/
|
|
19
|
-
const PROMPTBOOK_ENGINE_VERSION = '0.88.0-
|
|
19
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.88.0-9';
|
|
20
20
|
/**
|
|
21
21
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
22
22
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
@@ -40,6 +40,7 @@ import type { ExecutionReportString } from '../execution/execution-report/Execut
|
|
|
40
40
|
import type { ExecutionReportStringOptions } from '../execution/execution-report/ExecutionReportStringOptions';
|
|
41
41
|
import type { ExecutionTask } from '../execution/ExecutionTask';
|
|
42
42
|
import type { PreparationTask } from '../execution/ExecutionTask';
|
|
43
|
+
import type { task_status } from '../execution/ExecutionTask';
|
|
43
44
|
import type { AbstractTask } from '../execution/ExecutionTask';
|
|
44
45
|
import type { Task } from '../execution/ExecutionTask';
|
|
45
46
|
import type { ExecutionTools } from '../execution/ExecutionTools';
|
|
@@ -322,6 +323,7 @@ export type { ExecutionReportString };
|
|
|
322
323
|
export type { ExecutionReportStringOptions };
|
|
323
324
|
export type { ExecutionTask };
|
|
324
325
|
export type { PreparationTask };
|
|
326
|
+
export type { task_status };
|
|
325
327
|
export type { AbstractTask };
|
|
326
328
|
export type { Task };
|
|
327
329
|
export type { ExecutionTools };
|
|
@@ -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 };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Command as Program } from 'commander';
|
|
2
|
+
type actionCallbackFunction = Parameters<Program['action']>[0];
|
|
3
|
+
/**
|
|
4
|
+
* Wraps action to handle error console logging and exit process with error code
|
|
5
|
+
*
|
|
6
|
+
* @param action Action to be wrapped in error handling
|
|
7
|
+
* @returns Wrapped action
|
|
8
|
+
* @private internal helper function for CLI commands
|
|
9
|
+
*/
|
|
10
|
+
export declare function handleActionErrors(action: actionCallbackFunction): actionCallbackFunction;
|
|
11
|
+
export {};
|
|
@@ -40,6 +40,10 @@ export type PreparationTask = AbstractTask<PipelineExecutorResult> & {
|
|
|
40
40
|
readonly taskType: 'PREPARATION';
|
|
41
41
|
readonly taskId: `prep-${task_id}`;
|
|
42
42
|
};
|
|
43
|
+
/**
|
|
44
|
+
* Status of a task
|
|
45
|
+
*/
|
|
46
|
+
export type task_status = 'RUNNING' | 'FINISHED' | 'ERROR';
|
|
43
47
|
/**
|
|
44
48
|
* Base interface for all task types
|
|
45
49
|
*/
|
|
@@ -52,6 +56,18 @@ export type AbstractTask<TTaskResult extends AbstractTaskResult> = {
|
|
|
52
56
|
* Unique identifier for the task
|
|
53
57
|
*/
|
|
54
58
|
readonly taskId: task_id;
|
|
59
|
+
/**
|
|
60
|
+
* Status of the task
|
|
61
|
+
*/
|
|
62
|
+
readonly status: task_status;
|
|
63
|
+
/**
|
|
64
|
+
* Date when the task was created
|
|
65
|
+
*/
|
|
66
|
+
readonly createdAt: Date;
|
|
67
|
+
/**
|
|
68
|
+
* Date when the task was last updated
|
|
69
|
+
*/
|
|
70
|
+
readonly updatedAt: Date;
|
|
55
71
|
/**
|
|
56
72
|
* Gets a promise that resolves with the task result
|
|
57
73
|
*/
|
|
@@ -66,6 +82,14 @@ export type AbstractTask<TTaskResult extends AbstractTaskResult> = {
|
|
|
66
82
|
* Gets just the current value which is mutated during the task processing
|
|
67
83
|
*/
|
|
68
84
|
currentValue: PartialDeep<TTaskResult>;
|
|
85
|
+
/**
|
|
86
|
+
* List of errors that occurred during the task processing
|
|
87
|
+
*/
|
|
88
|
+
readonly errors: Array<Error>;
|
|
89
|
+
/**
|
|
90
|
+
* List of warnings that occurred during the task processing
|
|
91
|
+
*/
|
|
92
|
+
readonly warnings: Array<Error>;
|
|
69
93
|
};
|
|
70
94
|
export type Task = ExecutionTask | PreparationTask;
|
|
71
95
|
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@promptbook/openai",
|
|
3
|
-
"version": "0.88.0-
|
|
3
|
+
"version": "0.88.0-9",
|
|
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,
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"module": "./esm/index.es.js",
|
|
48
48
|
"typings": "./esm/typings/src/_packages/openai.index.d.ts",
|
|
49
49
|
"peerDependencies": {
|
|
50
|
-
"@promptbook/core": "0.88.0-
|
|
50
|
+
"@promptbook/core": "0.88.0-9"
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
53
|
"colors": "1.4.0",
|
package/umd/index.umd.js
CHANGED
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
* @generated
|
|
25
25
|
* @see https://github.com/webgptorg/promptbook
|
|
26
26
|
*/
|
|
27
|
-
const PROMPTBOOK_ENGINE_VERSION = '0.88.0-
|
|
27
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.88.0-9';
|
|
28
28
|
/**
|
|
29
29
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
30
30
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|