@promptbook/cli 0.92.0 → 0.94.0-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 +143 -83
- package/esm/index.es.js +6 -1
- package/esm/index.es.js.map +1 -1
- package/esm/typings/src/version.d.ts +1 -1
- package/package.json +2 -2
- package/umd/index.umd.js +6 -1
- package/umd/index.umd.js.map +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
<!-- ⚠️ WARNING: This code has been generated so that any manual changes will be overwritten -->
|
|
2
2
|
|
|
3
|
-
# ✨ Promptbook
|
|
3
|
+
# ✨ Promptbook: AI apps in plain Language
|
|
4
|
+
|
|
5
|
+
Write AI applications using plain human language across multiple models and platforms.
|
|
4
6
|
|
|
5
7
|
|
|
6
8
|
|
|
@@ -8,20 +10,24 @@
|
|
|
8
10
|
[ Promptbook](https://badge.fury.io/js/promptbook.svg)](https://www.npmjs.com/package/promptbook)
|
|
9
11
|
[ Promptbook](https://packagequality.com/shield/promptbook.svg)](https://packagequality.com/#?package=promptbook)
|
|
10
12
|
[](https://snyk.io/test/github/webgptorg/promptbook)
|
|
13
|
+
[](https://github.com/webgptorg/promptbook/actions)
|
|
14
|
+
[](https://coveralls.io/github/webgptorg/promptbook?branch=main)
|
|
11
15
|
[](https://github.com/webgptorg/promptbook/issues)
|
|
12
16
|
|
|
13
17
|
|
|
14
18
|
|
|
15
|
-
|
|
16
|
-
|
|
17
19
|
## 🌟 New Features
|
|
18
20
|
|
|
19
|
-
-
|
|
20
|
-
- 🐳
|
|
21
|
-
-
|
|
22
|
-
-
|
|
21
|
+
- 💡 VS Code support for `.book` files with syntax highlighting and IntelliSense
|
|
22
|
+
- 🐳 Official Docker image (`hejny/promptbook`) for seamless containerized usage
|
|
23
|
+
- 🔥 Native support for OpenAI `o3-mini`, GPT-4 and other leading LLMs
|
|
24
|
+
- 🔍 DeepSeek integration for advanced knowledge search
|
|
25
|
+
|
|
23
26
|
|
|
24
27
|
|
|
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>
|
|
25
31
|
|
|
26
32
|
## 📦 Package `@promptbook/cli`
|
|
27
33
|
|
|
@@ -177,65 +183,92 @@ Hello world examples:
|
|
|
177
183
|
- [Hello world in Node.js](https://github.com/webgptorg/hello-world-node-js)
|
|
178
184
|
- [Hello world in Next.js](https://github.com/webgptorg/hello-world-next-js)
|
|
179
185
|
|
|
186
|
+
### 🌐 Community & Social Media
|
|
180
187
|
|
|
188
|
+
Join our growing community of developers and users:
|
|
181
189
|
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
190
|
+
<table>
|
|
191
|
+
<thead>
|
|
192
|
+
<tr>
|
|
193
|
+
<th>Platform</th>
|
|
194
|
+
<th>Description</th>
|
|
195
|
+
</tr>
|
|
196
|
+
</thead>
|
|
197
|
+
<tbody>
|
|
198
|
+
<tr>
|
|
199
|
+
<td><a href="https://discord.gg/x3QWNaa89N">💬 Discord</a></td>
|
|
200
|
+
<td>Join our active developer community for discussions and support</td>
|
|
201
|
+
</tr>
|
|
202
|
+
<tr>
|
|
203
|
+
<td><a href="https://github.com/webgptorg/promptbook/discussions">🗣️ GitHub Discussions</a></td>
|
|
204
|
+
<td>Technical discussions, feature requests, and community Q&A</td>
|
|
205
|
+
</tr>
|
|
206
|
+
<tr>
|
|
207
|
+
<td><a href="https://linkedin.com/company/promptbook">👔 LinkedIn</a></td>
|
|
208
|
+
<td>Professional updates and industry insights</td>
|
|
209
|
+
</tr>
|
|
210
|
+
<tr>
|
|
211
|
+
<td><a href="https://www.facebook.com/61560776453536">📱 Facebook</a></td>
|
|
212
|
+
<td>General announcements and community engagement</td>
|
|
213
|
+
</tr>
|
|
214
|
+
<tr>
|
|
215
|
+
<td><a href="https://ptbk.io">🔗 ptbk.io</a></td>
|
|
216
|
+
<td>Official landing page with project information</td>
|
|
217
|
+
</tr>
|
|
218
|
+
</tbody>
|
|
219
|
+
</table>
|
|
201
220
|
|
|
221
|
+
### 🖼️ Product & Brand Channels
|
|
202
222
|
|
|
203
|
-
|
|
204
|
-
- [Facebook `Promptujeme`](https://www.facebook.com/promptujeme/)
|
|
223
|
+
#### Promptbook.studio
|
|
205
224
|
|
|
206
|
-
|
|
225
|
+
<table>
|
|
226
|
+
<tbody>
|
|
227
|
+
<tr>
|
|
228
|
+
<td><a href="https://www.instagram.com/promptbook.studio/">📸 Instagram @promptbook.studio</a></td>
|
|
229
|
+
<td>Visual updates, UI showcases, and design inspiration</td>
|
|
230
|
+
</tr>
|
|
231
|
+
|
|
232
|
+
</tbody>
|
|
233
|
+
</table>
|
|
207
234
|
|
|
208
|
-
_/Sub-brand for images and graphics generated via Promptbook prompting/_
|
|
209
235
|
|
|
210
|
-
- [Instagram `@promptbook.city`](https://www.instagram.com/promptbook.city/)
|
|
211
|
-
- [Facebook `Promptbook City`](https://www.facebook.com/61565718625569)
|
|
212
236
|
|
|
213
237
|
|
|
214
238
|
|
|
215
239
|
|
|
240
|
+
## 📘 Book Language Blueprint
|
|
216
241
|
|
|
242
|
+
_A concise, Markdown-based DSL for crafting AI workflows and automations._
|
|
217
243
|
|
|
218
|
-
|
|
244
|
+
---
|
|
219
245
|
|
|
246
|
+
### 📑 Table of Contents
|
|
220
247
|
|
|
248
|
+
- [Introduction](#introduction)
|
|
249
|
+
- [Example](#example)
|
|
250
|
+
- [1. What: Workflows, Tasks & Parameters](#1-what-workflows-tasks--parameters)
|
|
251
|
+
- [2. Who: Personas](#2-who-personas)
|
|
252
|
+
- [3. How: Knowledge, Instruments & Actions](#3-how-knowledge-instruments-and-actions)
|
|
253
|
+
- [General Principles](#general-principles)
|
|
221
254
|
|
|
222
|
-
|
|
255
|
+
### Introduction
|
|
223
256
|
|
|
224
|
-
Book is a language that
|
|
257
|
+
Book is a Markdown-based language that simplifies the creation of AI applications, workflows, and automations. With human-readable commands, you can define inputs, outputs, personas, knowledge sources, and actions—without needing model-specific details.
|
|
225
258
|
|
|
226
259
|
### Example
|
|
227
260
|
|
|
228
|
-
```
|
|
229
|
-
# 🌟 My
|
|
261
|
+
```book
|
|
262
|
+
# 🌟 My First Book
|
|
230
263
|
|
|
231
264
|
- BOOK VERSION 1.0.0
|
|
232
265
|
- URL https://promptbook.studio/hello.book
|
|
233
266
|
- INPUT PARAMETER {topic}
|
|
234
267
|
- OUTPUT PARAMETER {article}
|
|
235
268
|
|
|
236
|
-
# Write an
|
|
269
|
+
# Write an Article
|
|
237
270
|
|
|
238
|
-
- PERSONA Jane, marketing specialist with prior experience in
|
|
271
|
+
- PERSONA Jane, marketing specialist with prior experience in tech and AI writing
|
|
239
272
|
- KNOWLEDGE https://wikipedia.org/
|
|
240
273
|
- KNOWLEDGE ./journalist-ethics.pdf
|
|
241
274
|
- EXPECT MIN 1 Sentence
|
|
@@ -243,20 +276,20 @@ Book is a language that can be used to write AI applications, agents, workflows,
|
|
|
243
276
|
|
|
244
277
|
> Write an article about {topic}
|
|
245
278
|
|
|
246
|
-
|
|
279
|
+
→ {article}
|
|
247
280
|
```
|
|
248
281
|
|
|
249
282
|
Each part of the book defines one of 3 circles:
|
|
250
283
|
|
|
251
|
-
### **What:** Workflows, Tasks and Parameters
|
|
284
|
+
### **1. What:** Workflows, Tasks and Parameters
|
|
252
285
|
|
|
253
|
-
What work needs to be done. Each book defines a [workflow
|
|
286
|
+
What work needs to be done. Each book defines a [workflow _(scenario or pipeline)_](https://github.com/webgptorg/promptbook/discussions/88), which is one or more tasks. Each workflow has a fixed input and output. For example, you have a book that generates an article from a topic. Once it generates an article about AI, once about marketing, once about cooking. The workflow (= your AI program) is the same, only the input and output change.
|
|
254
287
|
|
|
255
288
|
**Related commands:**
|
|
256
289
|
|
|
257
290
|
- [PARAMETER](https://github.com/webgptorg/promptbook/blob/main/documents/commands/PARAMETER.md)
|
|
258
291
|
|
|
259
|
-
### **Who:** Personas
|
|
292
|
+
### **2. Who:** Personas
|
|
260
293
|
|
|
261
294
|
Who does the work. Each task is performed by a persona. A persona is a description of your virtual employee. It is a higher abstraction than the model, tokens, temperature, top-k, top-p and other model parameters.
|
|
262
295
|
|
|
@@ -270,7 +303,7 @@ Personas can have access to different knowledge, tools and actions. They can als
|
|
|
270
303
|
|
|
271
304
|
|
|
272
305
|
|
|
273
|
-
### **How:** Knowledge, Instruments and Actions
|
|
306
|
+
### **3. How:** Knowledge, Instruments and Actions
|
|
274
307
|
|
|
275
308
|
The resources used by the personas are used to do the work.
|
|
276
309
|
|
|
@@ -280,7 +313,7 @@ The resources used by the personas are used to do the work.
|
|
|
280
313
|
- [INSTRUMENT](https://github.com/webgptorg/promptbook/blob/main/documents/commands/INSTRUMENT.md) for real-time data like time, location, weather, stock prices, searching the internet, calculations, etc.
|
|
281
314
|
- [ACTION](https://github.com/webgptorg/promptbook/blob/main/documents/commands/ACTION.md) for actions like sending emails, creating files, ending a workflow, etc.
|
|
282
315
|
|
|
283
|
-
### General
|
|
316
|
+
### General Principles
|
|
284
317
|
|
|
285
318
|
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.
|
|
286
319
|
|
|
@@ -294,6 +327,10 @@ But unlike programming languages, it is designed to be understandable by non-pro
|
|
|
294
327
|
|
|
295
328
|
|
|
296
329
|
|
|
330
|
+
## 📚 Documentation
|
|
331
|
+
|
|
332
|
+
See detailed guides and API reference in the [docs](https://github.com/webgptorg/promptbook/discussions/categories/concepts) or [online](https://discord.gg/x3QWNaa89N).
|
|
333
|
+
|
|
297
334
|
## 🔒 Security
|
|
298
335
|
|
|
299
336
|
For information on reporting security vulnerabilities, see our [Security Policy](./SECURITY.md).
|
|
@@ -374,25 +411,56 @@ _Note: This section is not complete dictionary, more list of general AI / LLM te
|
|
|
374
411
|
- [🤼 Personas](https://github.com/webgptorg/promptbook/discussions/22)
|
|
375
412
|
- [⭕ Parameters](https://github.com/webgptorg/promptbook/discussions/83)
|
|
376
413
|
- [🚀 Pipeline execution](https://github.com/webgptorg/promptbook/discussions/84)
|
|
377
|
-
- [🧪 Expectations](https://github.com/webgptorg/promptbook/discussions/30)
|
|
378
|
-
- [✂️ Postprocessing](https://github.com/webgptorg/promptbook/discussions/31)
|
|
379
|
-
- [🔣 Words not tokens](https://github.com/webgptorg/promptbook/discussions/29)
|
|
380
|
-
- [☯ Separation of concerns](https://github.com/webgptorg/promptbook/discussions/32)
|
|
414
|
+
- [🧪 Expectations](https://github.com/webgptorg/promptbook/discussions/30) - Define what outputs should look like and how they're validated
|
|
415
|
+
- [✂️ Postprocessing](https://github.com/webgptorg/promptbook/discussions/31) - How outputs are refined after generation
|
|
416
|
+
- [🔣 Words not tokens](https://github.com/webgptorg/promptbook/discussions/29) - The human-friendly way to think about text generation
|
|
417
|
+
- [☯ Separation of concerns](https://github.com/webgptorg/promptbook/discussions/32) - How Book language organizes different aspects of AI workflows
|
|
381
418
|
|
|
382
|
-
|
|
419
|
+
### Advanced concepts
|
|
420
|
+
|
|
421
|
+
<table>
|
|
422
|
+
<tr>
|
|
423
|
+
<th>Data & Knowledge Management</th>
|
|
424
|
+
<th>Pipeline Control</th>
|
|
425
|
+
</tr>
|
|
426
|
+
<tr>
|
|
427
|
+
<td>
|
|
428
|
+
<ul>
|
|
429
|
+
<li><a href="https://github.com/webgptorg/promptbook/discussions/41">📚 Knowledge (RAG)</a> - Retrieve and use external information</li>
|
|
430
|
+
<li><a href="https://github.com/webgptorg/promptbook/discussions/54">📽 Media handling</a> - Working with images, audio, video, spreadsheets</li>
|
|
431
|
+
<li><a href="https://github.com/webgptorg/promptbook/discussions/40">🔴 Anomaly detection</a> - Identifying unusual patterns or outputs</li>
|
|
432
|
+
</ul>
|
|
433
|
+
</td>
|
|
434
|
+
<td>
|
|
435
|
+
<ul>
|
|
436
|
+
<li><a href="https://github.com/webgptorg/promptbook/discussions/89">🌏 Remote server</a> - Executing workflows on remote infrastructure</li>
|
|
437
|
+
<li><a href="https://github.com/webgptorg/promptbook/discussions/66">🃏 Jokers (conditions)</a> - Adding conditional logic to workflows</li>
|
|
438
|
+
<li><a href="https://github.com/webgptorg/promptbook/discussions/35">🔳 Metaprompting</a> - Creating prompts that generate other prompts</li>
|
|
439
|
+
</ul>
|
|
440
|
+
</td>
|
|
441
|
+
</tr>
|
|
442
|
+
<tr>
|
|
443
|
+
<th>Language & Output Control</th>
|
|
444
|
+
<th>Advanced Generation</th>
|
|
445
|
+
</tr>
|
|
446
|
+
<tr>
|
|
447
|
+
<td>
|
|
448
|
+
<ul>
|
|
449
|
+
<li><a href="https://github.com/webgptorg/promptbook/discussions/53">🌏 Linguistically typed languages</a> - Type systems for natural language</li>
|
|
450
|
+
<li><a href="https://github.com/webgptorg/promptbook/discussions/42">🌍 Auto-Translations</a> - Automatic multilingual support</li>
|
|
451
|
+
<li><a href="https://github.com/webgptorg/promptbook/discussions/39">👮 Agent adversary expectations</a> - Safety and control mechanisms</li>
|
|
452
|
+
</ul>
|
|
453
|
+
</td>
|
|
454
|
+
<td>
|
|
455
|
+
<ul>
|
|
456
|
+
<li><a href="https://github.com/webgptorg/promptbook/discussions/37">🔙 Expectation-aware generation</a> - Outputs that meet defined criteria</li>
|
|
457
|
+
<li><a href="https://github.com/webgptorg/promptbook/discussions/33">⏳ Just-in-time fine-tuning</a> - Dynamic model adaptation</li>
|
|
458
|
+
</ul>
|
|
459
|
+
</td>
|
|
460
|
+
</tr>
|
|
461
|
+
</table>
|
|
383
462
|
|
|
384
|
-
|
|
385
|
-
- [🌏 Remote server](https://github.com/webgptorg/promptbook/discussions/89)
|
|
386
|
-
- [🃏 Jokers (conditions)](https://github.com/webgptorg/promptbook/discussions/66)
|
|
387
|
-
- [🔳 Metaprompting](https://github.com/webgptorg/promptbook/discussions/35)
|
|
388
|
-
- [🌏 Linguistically typed languages](https://github.com/webgptorg/promptbook/discussions/53)
|
|
389
|
-
- [🌍 Auto-Translations](https://github.com/webgptorg/promptbook/discussions/42)
|
|
390
|
-
- [📽 Images, audio, video, spreadsheets](https://github.com/webgptorg/promptbook/discussions/54)
|
|
391
|
-
- [🔙 Expectation-aware generation](https://github.com/webgptorg/promptbook/discussions/37)
|
|
392
|
-
- [⏳ Just-in-time fine-tuning](https://github.com/webgptorg/promptbook/discussions/33)
|
|
393
|
-
- [🔴 Anomaly detection](https://github.com/webgptorg/promptbook/discussions/40)
|
|
394
|
-
- [👮 Agent adversary expectations](https://github.com/webgptorg/promptbook/discussions/39)
|
|
395
|
-
- [view more](https://github.com/webgptorg/promptbook/discussions/categories/concepts)
|
|
463
|
+
<p align="center"><a href="https://github.com/webgptorg/promptbook/discussions/categories/concepts">🔍 View more concepts</a></p>
|
|
396
464
|
|
|
397
465
|
|
|
398
466
|
|
|
@@ -447,36 +515,28 @@ If you have a question [start a discussion](https://github.com/webgptorg/promptb
|
|
|
447
515
|
- [❔ Is Promptbook using RAG _(Retrieval-Augmented Generation)_?](https://github.com/webgptorg/promptbook/discussions/123)
|
|
448
516
|
- [❔ Is Promptbook using function calling?](https://github.com/webgptorg/promptbook/discussions/124)
|
|
449
517
|
|
|
450
|
-
##
|
|
518
|
+
## 📅 Changelog
|
|
451
519
|
|
|
452
520
|
See [CHANGELOG.md](./CHANGELOG.md)
|
|
453
521
|
|
|
454
522
|
## 📜 License
|
|
455
523
|
|
|
456
|
-
|
|
524
|
+
This project is licensed under [BUSL 1.1](./LICENSE.md).
|
|
457
525
|
|
|
458
|
-
##
|
|
526
|
+
## 🤝 Contributing
|
|
459
527
|
|
|
460
|
-
See [
|
|
528
|
+
We welcome contributions! See [CONTRIBUTING.md](./CONTRIBUTING.md) for guidelines.
|
|
461
529
|
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
<div style="display: flex; align-items: center; gap: 20px;">
|
|
465
|
-
|
|
466
|
-
<a href="https://promptbook.studio/">
|
|
467
|
-
<img src="./design/promptbook-studio-logo.png" alt="Partner 3" height="70">
|
|
468
|
-
</a>
|
|
469
|
-
|
|
470
|
-
<a href="https://technologickainkubace.org/en/about-technology-incubation/about-the-project/">
|
|
471
|
-
<img src="./other/partners/CI-Technology-Incubation.png" alt="Technology Incubation" height="70">
|
|
472
|
-
</a>
|
|
473
|
-
|
|
474
|
-
</div>
|
|
530
|
+
You can also ⭐ star the project, [follow us on GitHub](https://github.com/hejny) or [various other social networks](https://www.pavolhejny.com/contact/).We are open to [pull requests, feedback, and suggestions](./CONTRIBUTING.md).
|
|
475
531
|
|
|
476
|
-
##
|
|
532
|
+
## 🆘 Support & Community
|
|
477
533
|
|
|
478
|
-
|
|
534
|
+
Need help with Book language? We're here for you!
|
|
479
535
|
|
|
480
|
-
|
|
536
|
+
- 💬 [Join our Discord community](https://discord.gg/x3QWNaa89N) for real-time support
|
|
537
|
+
- 📝 [Browse our GitHub discussions](https://github.com/webgptorg/promptbook/discussions) for FAQs and community knowledge
|
|
538
|
+
- 🐛 [Report issues](https://github.com/webgptorg/book/issues) for bugs or feature requests
|
|
539
|
+
- 📚 Visit [ptbk.io](https://ptbk.io) for more resources and documentation
|
|
540
|
+
- 📧 Contact us directly through the channels listed in our [signpost](./SIGNPOST.md)
|
|
481
541
|
|
|
482
|
-
|
|
542
|
+
We welcome contributions and feedback to make Book language better for everyone!
|
package/esm/index.es.js
CHANGED
|
@@ -47,7 +47,7 @@ const BOOK_LANGUAGE_VERSION = '1.0.0';
|
|
|
47
47
|
* @generated
|
|
48
48
|
* @see https://github.com/webgptorg/promptbook
|
|
49
49
|
*/
|
|
50
|
-
const PROMPTBOOK_ENGINE_VERSION = '0.
|
|
50
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.94.0-0';
|
|
51
51
|
/**
|
|
52
52
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
53
53
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
@@ -6961,6 +6961,11 @@ async function executeTask(options) {
|
|
|
6961
6961
|
const jokerParameterNames = currentTask.jokerParameterNames || [];
|
|
6962
6962
|
const preparedContent = (currentTask.preparedContent || '{content}').split('{content}').join(currentTask.content);
|
|
6963
6963
|
// <- TODO: [🍵] Use here `templateParameters` to replace {websiteContent} with option to ignore missing parameters
|
|
6964
|
+
await onProgress({
|
|
6965
|
+
outputParameters: {
|
|
6966
|
+
[currentTask.resultingParameterName]: '',
|
|
6967
|
+
},
|
|
6968
|
+
});
|
|
6964
6969
|
const resultString = await executeFormatSubvalues({
|
|
6965
6970
|
jokerParameterNames,
|
|
6966
6971
|
priority,
|