@promptbook/cli 0.86.31 → 0.88.0-10
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 +22 -44
- package/esm/index.es.js +2755 -2600
- package/esm/index.es.js.map +1 -1
- package/esm/typings/src/_packages/node.index.d.ts +2 -0
- 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/scrapers/_common/register/$provideScriptingForNode.d.ts +11 -0
- package/esm/typings/src/scripting/javascript/JavascriptEvalExecutionTools.d.ts +1 -1
- package/esm/typings/src/scripting/javascript/JavascriptExecutionTools.d.ts +1 -1
- package/esm/typings/src/scripting/javascript/postprocessing-functions.d.ts +1 -1
- package/esm/typings/src/scripting/javascript/utils/extractVariablesFromJavascript.d.ts +1 -1
- 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 +1 -1
- package/umd/index.umd.js +2758 -2603
- package/umd/index.umd.js.map +1 -1
- /package/esm/typings/src/_packages/{execute-javascript.index.d.ts → javascript.index.d.ts} +0 -0
package/README.md
CHANGED
|
@@ -23,6 +23,10 @@
|
|
|
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
|
+
|
|
26
30
|
## 📦 Package `@promptbook/cli`
|
|
27
31
|
|
|
28
32
|
- Promptbooks are [divided into several](#-packages) packages, all are published from [single monorepo](https://github.com/webgptorg/promptbook).
|
|
@@ -60,7 +64,7 @@ import { createPipelineExecutor } from '@promptbook/core';
|
|
|
60
64
|
import { $provideExecutionToolsForNode } from '@promptbook/node';
|
|
61
65
|
import { $provideFilesystemForNode } from '@promptbook/node';
|
|
62
66
|
import { getPipelineCollection } from './books'; // <- Importing from pre-built library
|
|
63
|
-
import { JavascriptExecutionTools } from '@promptbook/
|
|
67
|
+
import { JavascriptExecutionTools } from '@promptbook/javascript';
|
|
64
68
|
import { OpenAiExecutionTools } from '@promptbook/openai';
|
|
65
69
|
|
|
66
70
|
// ▶ Get single Pipeline
|
|
@@ -108,8 +112,6 @@ Rest of the documentation is common for **entire promptbook ecosystem**:
|
|
|
108
112
|
|
|
109
113
|
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**!
|
|
110
114
|
|
|
111
|
-
|
|
112
|
-
|
|
113
115
|
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!
|
|
114
116
|
|
|
115
117
|
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.
|
|
@@ -166,27 +168,28 @@ Promptbook project is ecosystem of multiple projects and tools, following is a l
|
|
|
166
168
|
</tbody>
|
|
167
169
|
</table>
|
|
168
170
|
|
|
171
|
+
Hello world examples:
|
|
172
|
+
|
|
173
|
+
- [Hello world](https://github.com/webgptorg/hello-world)
|
|
174
|
+
- [Hello world in Node.js](https://github.com/webgptorg/hello-world-node-js)
|
|
175
|
+
- [Hello world in Next.js](https://github.com/webgptorg/hello-world-next-js)
|
|
176
|
+
|
|
169
177
|
We also have a community of developers and users of **Promptbook**:
|
|
170
178
|
|
|
171
179
|
- [Discord community](https://discord.gg/x3QWNaa89N)
|
|
172
180
|
- [Landing page `ptbk.io`](https://ptbk.io)
|
|
173
181
|
- [Github discussions](https://github.com/webgptorg/promptbook/discussions)
|
|
174
182
|
- [LinkedIn `Promptbook`](https://linkedin.com/company/promptbook)
|
|
175
|
-
- [Facebook `Promptbook`](https://www.facebook.com/61560776453536)
|
|
183
|
+
- [Facebook `Promptbook`](https://www.facebook.com/61560776453536)
|
|
176
184
|
|
|
177
185
|
And **Promptbook.studio** branded socials:
|
|
178
186
|
|
|
179
|
-
|
|
180
|
-
|
|
181
187
|
- [Instagram `@promptbook.studio`](https://www.instagram.com/promptbook.studio/)
|
|
182
188
|
|
|
183
189
|
And **Promptujeme** sub-brand:
|
|
184
190
|
|
|
185
191
|
_/Subbrand for Czech clients/_
|
|
186
192
|
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
193
|
- [Promptujeme.cz](https://www.promptujeme.cz/)
|
|
191
194
|
- [Facebook `Promptujeme`](https://www.facebook.com/promptujeme/)
|
|
192
195
|
|
|
@@ -204,8 +207,6 @@ _/Sub-brand for images and graphics generated via Promptbook prompting/_
|
|
|
204
207
|
|
|
205
208
|
## 💙 The Book language
|
|
206
209
|
|
|
207
|
-
|
|
208
|
-
|
|
209
210
|
Following is the documentation and blueprint of the [Book language](https://github.com/webgptorg/book).
|
|
210
211
|
|
|
211
212
|
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.
|
|
@@ -255,8 +256,6 @@ Personas can have access to different knowledge, tools and actions. They can als
|
|
|
255
256
|
|
|
256
257
|
- [PERSONA](https://github.com/webgptorg/promptbook/blob/main/documents/commands/PERSONA.md)
|
|
257
258
|
|
|
258
|
-
|
|
259
|
-
|
|
260
259
|
### **How:** Knowledge, Instruments and Actions
|
|
261
260
|
|
|
262
261
|
The resources used by the personas are used to do the work.
|
|
@@ -303,7 +302,7 @@ Or you can install them separately:
|
|
|
303
302
|
- ⭐ **[@promptbook/utils](https://www.npmjs.com/package/@promptbook/utils)** - Utility functions used in the library but also useful for individual use in preprocessing and postprocessing LLM inputs and outputs
|
|
304
303
|
- **[@promptbook/markdown-utils](https://www.npmjs.com/package/@promptbook/markdown-utils)** - Utility functions used for processing markdown
|
|
305
304
|
- _(Not finished)_ **[@promptbook/wizzard](https://www.npmjs.com/package/@promptbook/wizzard)** - Wizard for creating+running promptbooks in single line
|
|
306
|
-
- **[@promptbook/
|
|
305
|
+
- **[@promptbook/javascript](https://www.npmjs.com/package/@promptbook/javascript)** - Execution tools for javascript inside promptbooks
|
|
307
306
|
- **[@promptbook/openai](https://www.npmjs.com/package/@promptbook/openai)** - Execution tools for OpenAI API, wrapper around OpenAI SDK
|
|
308
307
|
- **[@promptbook/anthropic-claude](https://www.npmjs.com/package/@promptbook/anthropic-claude)** - Execution tools for Anthropic Claude API, wrapper around Anthropic Claude SDK
|
|
309
308
|
- **[@promptbook/vercel](https://www.npmjs.com/package/@promptbook/vercel)** - Adapter for Vercel functionalities
|
|
@@ -332,16 +331,9 @@ Or you can install them separately:
|
|
|
332
331
|
|
|
333
332
|
## 📚 Dictionary
|
|
334
333
|
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
### 📚 Dictionary
|
|
341
|
-
|
|
342
334
|
The following glossary is used to clarify certain concepts:
|
|
343
335
|
|
|
344
|
-
|
|
336
|
+
### General LLM / AI terms
|
|
345
337
|
|
|
346
338
|
- **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.
|
|
347
339
|
- **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.
|
|
@@ -352,13 +344,9 @@ The following glossary is used to clarify certain concepts:
|
|
|
352
344
|
- **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.
|
|
353
345
|
- **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.
|
|
354
346
|
|
|
347
|
+
_Note: This section is not complete dictionary, more list of general AI / LLM terms that has connection with Promptbook_
|
|
355
348
|
|
|
356
|
-
|
|
357
|
-
_Note: Thos section is not complete dictionary, more list of general AI / LLM terms that has connection with Promptbook_
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
#### 💯 Core concepts
|
|
349
|
+
### 💯 Core concepts
|
|
362
350
|
|
|
363
351
|
- [📚 Collection of pipelines](https://github.com/webgptorg/promptbook/discussions/65)
|
|
364
352
|
- [📯 Pipeline](https://github.com/webgptorg/promptbook/discussions/64)
|
|
@@ -371,7 +359,7 @@ _Note: Thos section is not complete dictionary, more list of general AI / LLM te
|
|
|
371
359
|
- [🔣 Words not tokens](https://github.com/webgptorg/promptbook/discussions/29)
|
|
372
360
|
- [☯ Separation of concerns](https://github.com/webgptorg/promptbook/discussions/32)
|
|
373
361
|
|
|
374
|
-
|
|
362
|
+
#### Advanced concepts
|
|
375
363
|
|
|
376
364
|
- [📚 Knowledge (Retrieval-augmented generation)](https://github.com/webgptorg/promptbook/discussions/41)
|
|
377
365
|
- [🌏 Remote server](https://github.com/webgptorg/promptbook/discussions/89)
|
|
@@ -388,17 +376,9 @@ _Note: Thos section is not complete dictionary, more list of general AI / LLM te
|
|
|
388
376
|
|
|
389
377
|
|
|
390
378
|
|
|
391
|
-
|
|
379
|
+
## 🚂 Promptbook Engine
|
|
392
380
|
|
|
393
|
-
-
|
|
394
|
-
- Application mode
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
## 🔌 Usage in Typescript / Javascript
|
|
399
|
-
|
|
400
|
-
- [Simple usage](./examples/usage/simple-script)
|
|
401
|
-
- [Usage with client and remote server](./examples/usage/remote)
|
|
381
|
+

|
|
402
382
|
|
|
403
383
|
## ➕➖ When to use Promptbook?
|
|
404
384
|
|
|
@@ -459,20 +439,18 @@ Promptbook project is under [BUSL 1.1 is an SPDX license](https://spdx.org/licen
|
|
|
459
439
|
|
|
460
440
|
See [TODO.md](./TODO.md)
|
|
461
441
|
|
|
462
|
-
|
|
463
|
-
|
|
464
442
|
## 🤝 Partners
|
|
465
443
|
|
|
466
444
|
<div style="display: flex; align-items: center; gap: 20px;">
|
|
467
445
|
|
|
468
446
|
<a href="https://promptbook.studio/">
|
|
469
|
-
<img src="./design/promptbook-studio-logo.png" alt="Partner 3" height="
|
|
447
|
+
<img src="./design/promptbook-studio-logo.png" alt="Partner 3" height="70">
|
|
470
448
|
</a>
|
|
471
449
|
|
|
472
450
|
<a href="https://technologickainkubace.org/en/about-technology-incubation/about-the-project/">
|
|
473
|
-
<img src="./other/partners/CI-Technology-Incubation.png" alt="Technology Incubation" height="
|
|
451
|
+
<img src="./other/partners/CI-Technology-Incubation.png" alt="Technology Incubation" height="70">
|
|
474
452
|
</a>
|
|
475
|
-
|
|
453
|
+
|
|
476
454
|
</div>
|
|
477
455
|
|
|
478
456
|
## 🖋️ Contributing
|