@promptbook/utils 0.86.8 β 0.86.22
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 +38 -46
- package/esm/index.es.js +690 -845
- package/esm/index.es.js.map +1 -1
- package/esm/typings/src/_packages/types.index.d.ts +2 -0
- package/esm/typings/src/conversion/archive/loadArchive.d.ts +16 -0
- package/esm/typings/src/conversion/archive/saveArchive.d.ts +18 -0
- package/esm/typings/src/conversion/utils/extractVariablesFromScript.d.ts +5 -5
- package/esm/typings/src/conversion/validation/_importPipeline.d.ts +3 -10
- package/esm/typings/src/execution/AbstractTaskResult.d.ts +3 -3
- package/esm/typings/src/execution/PipelineExecutorResult.d.ts +1 -1
- package/esm/typings/src/execution/utils/usageToHuman.d.ts +11 -1
- package/esm/typings/src/execution/utils/usageToWorktime.d.ts +9 -1
- package/esm/typings/src/formats/_common/FormatDefinition.d.ts +1 -1
- package/esm/typings/src/formats/text/TextFormatDefinition.d.ts +1 -1
- package/esm/typings/src/llm-providers/multiple/MultipleLlmExecutionTools.d.ts +1 -1
- package/esm/typings/src/types/typeAliases.d.ts +6 -0
- package/package.json +1 -1
- package/umd/index.umd.js +694 -849
- package/umd/index.umd.js.map +1 -1
- package/esm/typings/src/utils/editable/utils/stringifyPipelineJson.test.d.ts +0 -1
package/README.md
CHANGED
|
@@ -287,9 +287,7 @@ And **Promptbook.city** branded socials:
|
|
|
287
287
|
_/Sub-brand for images and graphics generated via Promptbook prompting/_
|
|
288
288
|
|
|
289
289
|
- [Instagram `@promptbook.city`](https://www.instagram.com/promptbook.city/)
|
|
290
|
-
- [Facebook `Promptbook City`](https://www.facebook.com/61565718625569)
|
|
291
|
-
|
|
292
|
-
##
|
|
290
|
+
- [Facebook `Promptbook City`](https://www.facebook.com/61565718625569)
|
|
293
291
|
|
|
294
292
|
|
|
295
293
|
|
|
@@ -300,7 +298,9 @@ _/Sub-brand for images and graphics generated via Promptbook prompting/_
|
|
|
300
298
|
|
|
301
299
|
|
|
302
300
|
|
|
303
|
-
Following is the documentation and blueprint of the Book language.
|
|
301
|
+
Following is the documentation and blueprint of the [Book language](https://github.com/webgptorg/book).
|
|
302
|
+
|
|
303
|
+
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.
|
|
304
304
|
|
|
305
305
|
### Example
|
|
306
306
|
|
|
@@ -308,35 +308,56 @@ Following is the documentation and blueprint of the Book language.
|
|
|
308
308
|
# π My first Book
|
|
309
309
|
|
|
310
310
|
- BOOK VERSION 1.0.0
|
|
311
|
-
- URL https://promptbook.studio/
|
|
311
|
+
- URL https://promptbook.studio/hello.book
|
|
312
|
+
- INPUT PARAMETER {topic}
|
|
313
|
+
- OUTPUT PARAMETER {article}
|
|
312
314
|
|
|
313
315
|
# Write an article
|
|
314
316
|
|
|
315
317
|
- PERSONA Jane, marketing specialist with prior experience in writing articles about technology and artificial intelligence
|
|
316
|
-
- KNOWLEDGE https://
|
|
317
|
-
- KNOWLEDGE ./
|
|
318
|
+
- KNOWLEDGE https://wikipedia.org/
|
|
319
|
+
- KNOWLEDGE ./journalist-ethics.pdf
|
|
318
320
|
- EXPECT MIN 1 Sentence
|
|
319
|
-
- EXPECT MAX
|
|
321
|
+
- EXPECT MAX 5 Pages
|
|
320
322
|
|
|
321
|
-
> Write an article about
|
|
322
|
-
> Look specifically at the impact of Promptbook on the AI industry.
|
|
323
|
+
> Write an article about {topic}
|
|
323
324
|
|
|
324
325
|
-> {article}
|
|
325
326
|
```
|
|
326
327
|
|
|
328
|
+
Each part of the book defines one of 3 circles:
|
|
329
|
+
|
|
327
330
|
### **What:** Workflows, Tasks and Parameters
|
|
328
331
|
|
|
332
|
+
What work needs to be done. Each book defines a workflow, 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.
|
|
333
|
+
|
|
334
|
+
**Related commands:**
|
|
335
|
+
|
|
329
336
|
- [PARAMETER](https://github.com/webgptorg/promptbook/blob/main/documents/commands/PARAMETER.md)
|
|
330
337
|
|
|
331
338
|
### **Who:** Personas
|
|
332
339
|
|
|
340
|
+
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.
|
|
341
|
+
|
|
342
|
+
You can describe what you want in human language like `Jane, creative writer with a sense of sharp humour` instead of `gpt-4-2024-13-31, temperature 1.2, top-k 40, STOP token ".\n",...`.
|
|
343
|
+
|
|
344
|
+
Personas can have access to different knowledge, tools and actions. They can also consult their work with other personas or user, if allowed.
|
|
345
|
+
|
|
346
|
+
**Related commands:**
|
|
347
|
+
|
|
333
348
|
- [PERSONA](https://github.com/webgptorg/promptbook/blob/main/documents/commands/PERSONA.md)
|
|
334
349
|
|
|
350
|
+
|
|
351
|
+
|
|
335
352
|
### **How:** Knowledge, Instruments and Actions
|
|
336
353
|
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
354
|
+
The resources used by the personas are used to do the work.
|
|
355
|
+
|
|
356
|
+
**Related commands:**
|
|
357
|
+
|
|
358
|
+
- [KNOWLEDGE](https://github.com/webgptorg/promptbook/blob/main/documents/commands/KNOWLEDGE.md) of documents, websites, and other resources
|
|
359
|
+
- [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.
|
|
360
|
+
- [ACTION](https://github.com/webgptorg/promptbook/blob/main/documents/commands/ACTION.md) for actions like sending emails, creating files, ending a workflow, etc.
|
|
340
361
|
|
|
341
362
|
### General principles of book language
|
|
342
363
|
|
|
@@ -427,35 +448,7 @@ The following glossary is used to clarify certain concepts:
|
|
|
427
448
|
|
|
428
449
|
_Note: Thos section is not complete dictionary, more list of general AI / LLM terms that has connection with Promptbook_
|
|
429
450
|
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
- **Organization** _(legacy name collection)_ group jobs, workforce, knowledge, instruments, and actions into one package. Entities in one organization can share resources (= import resources from each other).
|
|
433
|
-
- **Jobs**
|
|
434
|
-
- **Task**
|
|
435
|
-
- **Subtask**
|
|
436
|
-
- **Workforce**
|
|
437
|
-
- **Persona**
|
|
438
|
-
- **Team**
|
|
439
|
-
- **Role**
|
|
440
|
-
- **Knowledge**
|
|
441
|
-
- **Public**
|
|
442
|
-
- **Private**
|
|
443
|
-
- **Protected**
|
|
444
|
-
- **Instruments**
|
|
445
|
-
- **Actions**
|
|
446
|
-
|
|
447
|
-
#### Book language
|
|
448
|
-
|
|
449
|
-
- **Book file**
|
|
450
|
-
- **Section**
|
|
451
|
-
- **Heading**
|
|
452
|
-
- **Description**
|
|
453
|
-
- **Command**
|
|
454
|
-
- **Block**
|
|
455
|
-
- **Return statement**
|
|
456
|
-
- **Comment**
|
|
457
|
-
- **Import**
|
|
458
|
-
- **Scope**
|
|
451
|
+
|
|
459
452
|
|
|
460
453
|
#### π― Core concepts
|
|
461
454
|
|
|
@@ -552,7 +545,7 @@ See [CHANGELOG.md](./CHANGELOG.md)
|
|
|
552
545
|
|
|
553
546
|
## π License
|
|
554
547
|
|
|
555
|
-
|
|
548
|
+
Promptbook project is under [BUSL 1.1 is an SPDX license](https://spdx.org/licenses/BUSL-1.1.html)
|
|
556
549
|
|
|
557
550
|
## π― Todos
|
|
558
551
|
|
|
@@ -560,7 +553,6 @@ See [TODO.md](./TODO.md)
|
|
|
560
553
|
|
|
561
554
|
|
|
562
555
|
|
|
563
|
-
|
|
564
556
|
## π€ Partners
|
|
565
557
|
|
|
566
558
|
<div style="display: flex; align-items: center; gap: 20px;">
|
|
@@ -577,6 +569,6 @@ See [TODO.md](./TODO.md)
|
|
|
577
569
|
|
|
578
570
|
## ποΈ Contributing
|
|
579
571
|
|
|
580
|
-
|
|
572
|
+
We are open to pull requests, feedback, and suggestions.
|
|
581
573
|
|
|
582
|
-
You can also β star the
|
|
574
|
+
You can also β star the project, [follow us on GitHub](https://github.com/hejny) or [various other social networks](https://www.pavolhejny.com/contact/).
|