@promptbook/utils 0.92.0 → 0.93.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 +139 -83
- package/esm/index.es.js +1 -1
- package/esm/typings/src/version.d.ts +1 -1
- package/package.json +2 -2
- package/umd/index.umd.js +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,18 +10,18 @@
|
|
|
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
|
|
23
25
|
|
|
24
26
|
|
|
25
27
|
|
|
@@ -269,65 +271,92 @@ Hello world examples:
|
|
|
269
271
|
- [Hello world in Node.js](https://github.com/webgptorg/hello-world-node-js)
|
|
270
272
|
- [Hello world in Next.js](https://github.com/webgptorg/hello-world-next-js)
|
|
271
273
|
|
|
274
|
+
### 🌐 Community & Social Media
|
|
272
275
|
|
|
276
|
+
Join our growing community of developers and users:
|
|
273
277
|
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
278
|
+
<table>
|
|
279
|
+
<thead>
|
|
280
|
+
<tr>
|
|
281
|
+
<th>Platform</th>
|
|
282
|
+
<th>Description</th>
|
|
283
|
+
</tr>
|
|
284
|
+
</thead>
|
|
285
|
+
<tbody>
|
|
286
|
+
<tr>
|
|
287
|
+
<td><a href="https://discord.gg/x3QWNaa89N">💬 Discord</a></td>
|
|
288
|
+
<td>Join our active developer community for discussions and support</td>
|
|
289
|
+
</tr>
|
|
290
|
+
<tr>
|
|
291
|
+
<td><a href="https://github.com/webgptorg/promptbook/discussions">🗣️ GitHub Discussions</a></td>
|
|
292
|
+
<td>Technical discussions, feature requests, and community Q&A</td>
|
|
293
|
+
</tr>
|
|
294
|
+
<tr>
|
|
295
|
+
<td><a href="https://linkedin.com/company/promptbook">👔 LinkedIn</a></td>
|
|
296
|
+
<td>Professional updates and industry insights</td>
|
|
297
|
+
</tr>
|
|
298
|
+
<tr>
|
|
299
|
+
<td><a href="https://www.facebook.com/61560776453536">📱 Facebook</a></td>
|
|
300
|
+
<td>General announcements and community engagement</td>
|
|
301
|
+
</tr>
|
|
302
|
+
<tr>
|
|
303
|
+
<td><a href="https://ptbk.io">🔗 ptbk.io</a></td>
|
|
304
|
+
<td>Official landing page with project information</td>
|
|
305
|
+
</tr>
|
|
306
|
+
</tbody>
|
|
307
|
+
</table>
|
|
293
308
|
|
|
309
|
+
### 🖼️ Product & Brand Channels
|
|
294
310
|
|
|
295
|
-
|
|
296
|
-
- [Facebook `Promptujeme`](https://www.facebook.com/promptujeme/)
|
|
311
|
+
#### Promptbook.studio
|
|
297
312
|
|
|
298
|
-
|
|
313
|
+
<table>
|
|
314
|
+
<tbody>
|
|
315
|
+
<tr>
|
|
316
|
+
<td><a href="https://www.instagram.com/promptbook.studio/">📸 Instagram @promptbook.studio</a></td>
|
|
317
|
+
<td>Visual updates, UI showcases, and design inspiration</td>
|
|
318
|
+
</tr>
|
|
319
|
+
|
|
320
|
+
</tbody>
|
|
321
|
+
</table>
|
|
299
322
|
|
|
300
|
-
_/Sub-brand for images and graphics generated via Promptbook prompting/_
|
|
301
323
|
|
|
302
|
-
- [Instagram `@promptbook.city`](https://www.instagram.com/promptbook.city/)
|
|
303
|
-
- [Facebook `Promptbook City`](https://www.facebook.com/61565718625569)
|
|
304
324
|
|
|
305
325
|
|
|
306
326
|
|
|
307
327
|
|
|
328
|
+
## 📘 Book Language Blueprint
|
|
308
329
|
|
|
330
|
+
_A concise, Markdown-based DSL for crafting AI workflows and automations._
|
|
309
331
|
|
|
310
|
-
|
|
332
|
+
---
|
|
311
333
|
|
|
334
|
+
### 📑 Table of Contents
|
|
312
335
|
|
|
336
|
+
- [Introduction](#introduction)
|
|
337
|
+
- [Example](#example)
|
|
338
|
+
- [1. What: Workflows, Tasks & Parameters](#1-what-workflows-tasks--parameters)
|
|
339
|
+
- [2. Who: Personas](#2-who-personas)
|
|
340
|
+
- [3. How: Knowledge, Instruments & Actions](#3-how-knowledge-instruments-and-actions)
|
|
341
|
+
- [General Principles](#general-principles)
|
|
313
342
|
|
|
314
|
-
|
|
343
|
+
### Introduction
|
|
315
344
|
|
|
316
|
-
Book is a language that
|
|
345
|
+
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.
|
|
317
346
|
|
|
318
347
|
### Example
|
|
319
348
|
|
|
320
|
-
```
|
|
321
|
-
# 🌟 My
|
|
349
|
+
```book
|
|
350
|
+
# 🌟 My First Book
|
|
322
351
|
|
|
323
352
|
- BOOK VERSION 1.0.0
|
|
324
353
|
- URL https://promptbook.studio/hello.book
|
|
325
354
|
- INPUT PARAMETER {topic}
|
|
326
355
|
- OUTPUT PARAMETER {article}
|
|
327
356
|
|
|
328
|
-
# Write an
|
|
357
|
+
# Write an Article
|
|
329
358
|
|
|
330
|
-
- PERSONA Jane, marketing specialist with prior experience in
|
|
359
|
+
- PERSONA Jane, marketing specialist with prior experience in tech and AI writing
|
|
331
360
|
- KNOWLEDGE https://wikipedia.org/
|
|
332
361
|
- KNOWLEDGE ./journalist-ethics.pdf
|
|
333
362
|
- EXPECT MIN 1 Sentence
|
|
@@ -335,20 +364,20 @@ Book is a language that can be used to write AI applications, agents, workflows,
|
|
|
335
364
|
|
|
336
365
|
> Write an article about {topic}
|
|
337
366
|
|
|
338
|
-
|
|
367
|
+
→ {article}
|
|
339
368
|
```
|
|
340
369
|
|
|
341
370
|
Each part of the book defines one of 3 circles:
|
|
342
371
|
|
|
343
|
-
### **What:** Workflows, Tasks and Parameters
|
|
372
|
+
### **1. What:** Workflows, Tasks and Parameters
|
|
344
373
|
|
|
345
|
-
What work needs to be done. Each book defines a [workflow
|
|
374
|
+
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.
|
|
346
375
|
|
|
347
376
|
**Related commands:**
|
|
348
377
|
|
|
349
378
|
- [PARAMETER](https://github.com/webgptorg/promptbook/blob/main/documents/commands/PARAMETER.md)
|
|
350
379
|
|
|
351
|
-
### **Who:** Personas
|
|
380
|
+
### **2. Who:** Personas
|
|
352
381
|
|
|
353
382
|
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.
|
|
354
383
|
|
|
@@ -362,7 +391,7 @@ Personas can have access to different knowledge, tools and actions. They can als
|
|
|
362
391
|
|
|
363
392
|
|
|
364
393
|
|
|
365
|
-
### **How:** Knowledge, Instruments and Actions
|
|
394
|
+
### **3. How:** Knowledge, Instruments and Actions
|
|
366
395
|
|
|
367
396
|
The resources used by the personas are used to do the work.
|
|
368
397
|
|
|
@@ -372,7 +401,7 @@ The resources used by the personas are used to do the work.
|
|
|
372
401
|
- [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.
|
|
373
402
|
- [ACTION](https://github.com/webgptorg/promptbook/blob/main/documents/commands/ACTION.md) for actions like sending emails, creating files, ending a workflow, etc.
|
|
374
403
|
|
|
375
|
-
### General
|
|
404
|
+
### General Principles
|
|
376
405
|
|
|
377
406
|
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.
|
|
378
407
|
|
|
@@ -386,6 +415,10 @@ But unlike programming languages, it is designed to be understandable by non-pro
|
|
|
386
415
|
|
|
387
416
|
|
|
388
417
|
|
|
418
|
+
## 📚 Documentation
|
|
419
|
+
|
|
420
|
+
See detailed guides and API reference in the [docs](https://github.com/webgptorg/promptbook/discussions/categories/concepts) or [online](https://discord.gg/x3QWNaa89N).
|
|
421
|
+
|
|
389
422
|
## 🔒 Security
|
|
390
423
|
|
|
391
424
|
For information on reporting security vulnerabilities, see our [Security Policy](./SECURITY.md).
|
|
@@ -466,25 +499,56 @@ _Note: This section is not complete dictionary, more list of general AI / LLM te
|
|
|
466
499
|
- [🤼 Personas](https://github.com/webgptorg/promptbook/discussions/22)
|
|
467
500
|
- [⭕ Parameters](https://github.com/webgptorg/promptbook/discussions/83)
|
|
468
501
|
- [🚀 Pipeline execution](https://github.com/webgptorg/promptbook/discussions/84)
|
|
469
|
-
- [🧪 Expectations](https://github.com/webgptorg/promptbook/discussions/30)
|
|
470
|
-
- [✂️ Postprocessing](https://github.com/webgptorg/promptbook/discussions/31)
|
|
471
|
-
- [🔣 Words not tokens](https://github.com/webgptorg/promptbook/discussions/29)
|
|
472
|
-
- [☯ Separation of concerns](https://github.com/webgptorg/promptbook/discussions/32)
|
|
502
|
+
- [🧪 Expectations](https://github.com/webgptorg/promptbook/discussions/30) - Define what outputs should look like and how they're validated
|
|
503
|
+
- [✂️ Postprocessing](https://github.com/webgptorg/promptbook/discussions/31) - How outputs are refined after generation
|
|
504
|
+
- [🔣 Words not tokens](https://github.com/webgptorg/promptbook/discussions/29) - The human-friendly way to think about text generation
|
|
505
|
+
- [☯ Separation of concerns](https://github.com/webgptorg/promptbook/discussions/32) - How Book language organizes different aspects of AI workflows
|
|
473
506
|
|
|
474
|
-
|
|
507
|
+
### Advanced concepts
|
|
508
|
+
|
|
509
|
+
<table>
|
|
510
|
+
<tr>
|
|
511
|
+
<th>Data & Knowledge Management</th>
|
|
512
|
+
<th>Pipeline Control</th>
|
|
513
|
+
</tr>
|
|
514
|
+
<tr>
|
|
515
|
+
<td>
|
|
516
|
+
<ul>
|
|
517
|
+
<li><a href="https://github.com/webgptorg/promptbook/discussions/41">📚 Knowledge (RAG)</a> - Retrieve and use external information</li>
|
|
518
|
+
<li><a href="https://github.com/webgptorg/promptbook/discussions/54">📽 Media handling</a> - Working with images, audio, video, spreadsheets</li>
|
|
519
|
+
<li><a href="https://github.com/webgptorg/promptbook/discussions/40">🔴 Anomaly detection</a> - Identifying unusual patterns or outputs</li>
|
|
520
|
+
</ul>
|
|
521
|
+
</td>
|
|
522
|
+
<td>
|
|
523
|
+
<ul>
|
|
524
|
+
<li><a href="https://github.com/webgptorg/promptbook/discussions/89">🌏 Remote server</a> - Executing workflows on remote infrastructure</li>
|
|
525
|
+
<li><a href="https://github.com/webgptorg/promptbook/discussions/66">🃏 Jokers (conditions)</a> - Adding conditional logic to workflows</li>
|
|
526
|
+
<li><a href="https://github.com/webgptorg/promptbook/discussions/35">🔳 Metaprompting</a> - Creating prompts that generate other prompts</li>
|
|
527
|
+
</ul>
|
|
528
|
+
</td>
|
|
529
|
+
</tr>
|
|
530
|
+
<tr>
|
|
531
|
+
<th>Language & Output Control</th>
|
|
532
|
+
<th>Advanced Generation</th>
|
|
533
|
+
</tr>
|
|
534
|
+
<tr>
|
|
535
|
+
<td>
|
|
536
|
+
<ul>
|
|
537
|
+
<li><a href="https://github.com/webgptorg/promptbook/discussions/53">🌏 Linguistically typed languages</a> - Type systems for natural language</li>
|
|
538
|
+
<li><a href="https://github.com/webgptorg/promptbook/discussions/42">🌍 Auto-Translations</a> - Automatic multilingual support</li>
|
|
539
|
+
<li><a href="https://github.com/webgptorg/promptbook/discussions/39">👮 Agent adversary expectations</a> - Safety and control mechanisms</li>
|
|
540
|
+
</ul>
|
|
541
|
+
</td>
|
|
542
|
+
<td>
|
|
543
|
+
<ul>
|
|
544
|
+
<li><a href="https://github.com/webgptorg/promptbook/discussions/37">🔙 Expectation-aware generation</a> - Outputs that meet defined criteria</li>
|
|
545
|
+
<li><a href="https://github.com/webgptorg/promptbook/discussions/33">⏳ Just-in-time fine-tuning</a> - Dynamic model adaptation</li>
|
|
546
|
+
</ul>
|
|
547
|
+
</td>
|
|
548
|
+
</tr>
|
|
549
|
+
</table>
|
|
475
550
|
|
|
476
|
-
|
|
477
|
-
- [🌏 Remote server](https://github.com/webgptorg/promptbook/discussions/89)
|
|
478
|
-
- [🃏 Jokers (conditions)](https://github.com/webgptorg/promptbook/discussions/66)
|
|
479
|
-
- [🔳 Metaprompting](https://github.com/webgptorg/promptbook/discussions/35)
|
|
480
|
-
- [🌏 Linguistically typed languages](https://github.com/webgptorg/promptbook/discussions/53)
|
|
481
|
-
- [🌍 Auto-Translations](https://github.com/webgptorg/promptbook/discussions/42)
|
|
482
|
-
- [📽 Images, audio, video, spreadsheets](https://github.com/webgptorg/promptbook/discussions/54)
|
|
483
|
-
- [🔙 Expectation-aware generation](https://github.com/webgptorg/promptbook/discussions/37)
|
|
484
|
-
- [⏳ Just-in-time fine-tuning](https://github.com/webgptorg/promptbook/discussions/33)
|
|
485
|
-
- [🔴 Anomaly detection](https://github.com/webgptorg/promptbook/discussions/40)
|
|
486
|
-
- [👮 Agent adversary expectations](https://github.com/webgptorg/promptbook/discussions/39)
|
|
487
|
-
- [view more](https://github.com/webgptorg/promptbook/discussions/categories/concepts)
|
|
551
|
+
<p align="center"><a href="https://github.com/webgptorg/promptbook/discussions/categories/concepts">🔍 View more concepts</a></p>
|
|
488
552
|
|
|
489
553
|
|
|
490
554
|
|
|
@@ -539,36 +603,28 @@ If you have a question [start a discussion](https://github.com/webgptorg/promptb
|
|
|
539
603
|
- [❔ Is Promptbook using RAG _(Retrieval-Augmented Generation)_?](https://github.com/webgptorg/promptbook/discussions/123)
|
|
540
604
|
- [❔ Is Promptbook using function calling?](https://github.com/webgptorg/promptbook/discussions/124)
|
|
541
605
|
|
|
542
|
-
##
|
|
606
|
+
## 📅 Changelog
|
|
543
607
|
|
|
544
608
|
See [CHANGELOG.md](./CHANGELOG.md)
|
|
545
609
|
|
|
546
610
|
## 📜 License
|
|
547
611
|
|
|
548
|
-
|
|
612
|
+
This project is licensed under [BUSL 1.1](./LICENSE.md).
|
|
549
613
|
|
|
550
|
-
##
|
|
614
|
+
## 🤝 Contributing
|
|
551
615
|
|
|
552
|
-
See [
|
|
616
|
+
We welcome contributions! See [CONTRIBUTING.md](./CONTRIBUTING.md) for guidelines.
|
|
553
617
|
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
<div style="display: flex; align-items: center; gap: 20px;">
|
|
557
|
-
|
|
558
|
-
<a href="https://promptbook.studio/">
|
|
559
|
-
<img src="./design/promptbook-studio-logo.png" alt="Partner 3" height="70">
|
|
560
|
-
</a>
|
|
561
|
-
|
|
562
|
-
<a href="https://technologickainkubace.org/en/about-technology-incubation/about-the-project/">
|
|
563
|
-
<img src="./other/partners/CI-Technology-Incubation.png" alt="Technology Incubation" height="70">
|
|
564
|
-
</a>
|
|
565
|
-
|
|
566
|
-
</div>
|
|
618
|
+
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).
|
|
567
619
|
|
|
568
|
-
##
|
|
620
|
+
## 🆘 Support & Community
|
|
569
621
|
|
|
570
|
-
|
|
622
|
+
Need help with Book language? We're here for you!
|
|
571
623
|
|
|
572
|
-
|
|
624
|
+
- 💬 [Join our Discord community](https://discord.gg/x3QWNaa89N) for real-time support
|
|
625
|
+
- 📝 [Browse our GitHub discussions](https://github.com/webgptorg/promptbook/discussions) for FAQs and community knowledge
|
|
626
|
+
- 🐛 [Report issues](https://github.com/webgptorg/book/issues) for bugs or feature requests
|
|
627
|
+
- 📚 Visit [ptbk.io](https://ptbk.io) for more resources and documentation
|
|
628
|
+
- 📧 Contact us directly through the channels listed in our [signpost](./SIGNPOST.md)
|
|
573
629
|
|
|
574
|
-
|
|
630
|
+
We welcome contributions and feedback to make Book language better for everyone!
|
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.
|
|
19
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.93.0';
|
|
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
|
|
@@ -15,7 +15,7 @@ export declare const BOOK_LANGUAGE_VERSION: string_semantic_version;
|
|
|
15
15
|
export declare const PROMPTBOOK_ENGINE_VERSION: string_promptbook_version;
|
|
16
16
|
/**
|
|
17
17
|
* Represents the version string of the Promptbook engine.
|
|
18
|
-
* It follows semantic versioning (e.g., `0.92.0
|
|
18
|
+
* It follows semantic versioning (e.g., `0.92.0`).
|
|
19
19
|
*
|
|
20
20
|
* @generated
|
|
21
21
|
*/
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@promptbook/utils",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.93.0",
|
|
4
|
+
"description": "Promptbook: Run AI apps in plain human language across multiple models and platforms",
|
|
5
5
|
"private": false,
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"repository": {
|
package/umd/index.umd.js
CHANGED
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
* @generated
|
|
23
23
|
* @see https://github.com/webgptorg/promptbook
|
|
24
24
|
*/
|
|
25
|
-
const PROMPTBOOK_ENGINE_VERSION = '0.
|
|
25
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.93.0';
|
|
26
26
|
/**
|
|
27
27
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
28
28
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|