@promptbook/openai 0.103.0-1 → 0.103.0-11

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 CHANGED
@@ -378,19 +378,130 @@ Rest of the documentation is common for **entire promptbook ecosystem**:
378
378
 
379
379
 
380
380
 
381
- ## 🤍 The Book Abstract
381
+ ## 📖 The Book Whitepaper
382
382
 
383
- **It's time for a paradigm shift! The future of software is written in plain English, French, or Latin.**
383
+ For most business applications nowadays, the biggest challenge isn't about the raw capabilities of AI models. Large language models like GPT-5 or Claude-4.1 are extremely capable.
384
384
 
385
- 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**!
385
+ The main challenge is to narrow it down, constrain it, set the proper **context, rules, knowledge, and personality**. There are a lot of tools which can do exactly this. On one side, there are no-code platforms which can launch your agent in seconds. On the other side, there are heavy frameworks like Langchain or Semantic Kernel, which can give you deep control.
386
386
 
387
- 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!
387
+ Promptbook takes the best from both worlds. You are defining your AI behavior by simple **books**, which are very explicit. They are automatically enforced, but they are very easy to understand, very easy to write, and very reliable and portable.
388
388
 
389
- 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.
390
389
 
391
- This shift will happen whether we're ready or not. Our mission is to make it excellent, not just good.
390
+ <img
391
+ alt="Paul Smith & Associés Book"
392
+ src="https://promptbook.studio/embed/book-preview.png?book=Paul%20Smith%20%26%20Associ%C3%A9s%0A%20%20%20%20%20%20%7C%20PERSONA%20You%20are%20a%20company%20lawyer.%0A%20%20%20%20%20%20%7C%20Your%20job%20is%20to%20provide%20legal%20advice%20and%20support%20to%20the%20company%20and%20its%20employees.%0A%20%20%20%20%20%20%7C%20You%20are%20knowledgeable%2C%20professional%2C%20and%20detail-oriented.&width=800&height=450&nonce=0"
393
+ />
392
394
 
393
- **Join us in this journey!**
395
+ <div style="page-break-after: always;"></div>
396
+
397
+ ### Aspects of great AI agent
398
+
399
+ We have created a language called **Book**, which allows you to write AI agents in their native language and create your own AI persona. Book provides a guide to define all the traits and commitments.
400
+
401
+ You can look at it as prompting (or writing a system message), but decorated by **commitments**.
402
+
403
+ #### `Persona` commitment
404
+
405
+ Personas define the character of your AI persona, its role, and how it should interact with users. It sets the tone and style of communication.
406
+
407
+
408
+ <img
409
+ alt="Paul Smith & Associés Book"
410
+ src="https://promptbook.studio/embed/book-preview.png?book=Paul%20Smith%20%26%20Associ%C3%A9s%0A%20%20%20%20%20%20%7C%20PERSONA%20You%20are%20a%20company%20lawyer.%0A%20%20%20%20%20%20%7C%20Your%20job%20is%20to%20provide%20legal%20advice%20and%20support%20to%20the%20company%20and%20its%20employees.%0A%20%20%20%20%20%20%7C%20You%20are%20knowledgeable%2C%20professional%2C%20and%20detail-oriented.&width=800&height=450&nonce=0"
411
+ />
412
+
413
+ #### `Knowledge` commitment
414
+
415
+ Knowledge Commitment allows you to provide specific information, facts, or context that the AI should be aware of when responding.
416
+
417
+ This can include domain-specific knowledge, company policies, or any other relevant information.
418
+
419
+ Promptbook Engine will automatically enforce this knowledge during interactions. When the knowledge is short enough, it will be included in the prompt. When it is too long, it will be stored in vector databases and RAG retrieved when needed. But you don't need to care about it.
420
+
421
+
422
+ <img
423
+ alt="Paul Smith & Associés Book"
424
+ src="https://promptbook.studio/embed/book-preview.png?book=Paul%20Smith%20%26%20Associ%C3%A9s%0A%20%20%20%20%20%20%7C%20PERSONA%20You%20are%20a%20company%20lawyer.%0A%20%20%20%20%20%20%7C%20Your%20job%20is%20to%20provide%20legal%20advice%20and%20support%20to%20the%20company%20and%20its%20employees.%0A%20%20%20%20%20%20%7C%20You%20are%20knowledgeable%2C%20professional%2C%20and%20detail-oriented.%0A%20%20%20%20%20%20%7C%20KNOWLEDGE%20%20https%3A%2F%2Fcompany.com%2Fcompany-policies.pdf%0A%20%20%20%20%20%20%7C%20KNOWLEDGE%20https%3A%2F%2Fcompany.com%2Finternal-documents%2Femployee-handbook.docx&width=800&height=450&nonce=0"
425
+ />
426
+
427
+ #### `Rule` commitment
428
+
429
+ Rules will enforce specific behaviors or constraints on the AI's responses. This can include ethical guidelines, communication styles, or any other rules you want the AI to follow.
430
+
431
+ Depending on rule strictness, Promptbook will either propagate it to the prompt or use other techniques, like adversary agent, to enforce it.
432
+
433
+
434
+ <img
435
+ alt="Paul Smith & Associés Book"
436
+ src="https://promptbook.studio/embed/book-preview.png?book=Paul%20Smith%20%26%20Associ%C3%A9s%0A%20%20%20%20%20%20%7C%20PERSONA%20You%20are%20a%20company%20lawyer.%0A%20%20%20%20%20%20%7C%20Your%20job%20is%20to%20provide%20legal%20advice%20and%20support%20to%20the%20company%20and%20its%20employees.%0A%20%20%20%20%20%20%7C%20You%20are%20knowledgeable%2C%20professional%2C%20and%20detail-oriented.%0A%20%20%20%20%20%20%7C%20RULE%20Always%20ensure%20compliance%20with%20laws%20and%20regulations.%0A%20%20%20%20%20%20%7C%20RULE%20Never%20provide%20legal%20advice%20outside%20your%20area%20of%20expertise.%0A%20%20%20%20%20%20%7C%20RULE%20Never%20provide%20legal%20advice%20about%20criminal%20law.%0A%20%20%20%20%20%20%7C%20KNOWLEDGE%20%20https%3A%2F%2Fcompany.com%2Fcompany-policies.pdf%0A%20%20%20%20%20%20%7C%20KNOWLEDGE%20https%3A%2F%2Fcompany.com%2Finternal-documents%2Femployee-handbook.docx&width=800&height=450&nonce=0"
437
+ />
438
+
439
+ #### `Action` commitment
440
+
441
+ Action Commitment allows you to define specific actions that the AI can take during interactions. This can include things like posting on a social media platform, sending emails, creating calendar events, or interacting with your internal systems.
442
+
443
+
444
+ <img
445
+ alt="Paul Smith & Associés Book"
446
+ src="https://promptbook.studio/embed/book-preview.png?book=Paul%20Smith%20%26%20Associ%C3%A9s%0A%20%20%20%20%20%20%7C%20PERSONA%20You%20are%20a%20company%20lawyer.%0A%20%20%20%20%20%20%7C%20Your%20job%20is%20to%20provide%20legal%20advice%20and%20support%20to%20the%20company%20and%20its%20employees.%0A%20%20%20%20%20%20%7C%20You%20are%20knowledgeable%2C%20professional%2C%20and%20detail-oriented.%0A%20%20%20%20%20%20%7C%20RULE%20Always%20ensure%20compliance%20with%20laws%20and%20regulations.%0A%20%20%20%20%20%20%7C%20RULE%20Never%20provide%20legal%20advice%20outside%20your%20area%20of%20expertise.%0A%20%20%20%20%20%20%7C%20RULE%20Never%20provide%20legal%20advice%20about%20criminal%20law.%0A%20%20%20%20%20%20%7C%20KNOWLEDGE%20%20https%3A%2F%2Fcompany.com%2Fcompany-policies.pdf%0A%20%20%20%20%20%20%7C%20KNOWLEDGE%20https%3A%2F%2Fcompany.com%2Finternal-documents%2Femployee-handbook.docx%0A%20%20%20%20%20%20%7C%20ACTION%20When%20a%20user%20asks%20about%20an%20issue%20that%20could%20be%20treated%20as%20a%20crime%2C%20notify%20legal%40company.com.&width=800&height=450&nonce=0"
447
+ />
448
+
449
+ [Read more about the language](./BLUEPRINT.md)
450
+
451
+ <div style="page-break-after: always;"></div>
452
+
453
+ ### Where to use your AI agent in book
454
+
455
+ Books can be useful in various applications and scenarios. Here are some examples:
456
+
457
+ #### Chat apps:
458
+
459
+ Create your own chat shopping assistant and place it in your eShop.
460
+ You will be able to answer customer questions, help them find products, and provide personalized recommendations. Everything is tightly controlled by the book you have written.
461
+
462
+ #### Reply Agent:
463
+
464
+ Create your own AI agent, which will look at your emails and reply to them. It can even create drafts for you to review before sending.
465
+
466
+ #### Coding Agent:
467
+
468
+ Do you love Vibecoding, but the AI code is not always aligned with your coding style and architecture, rules, security, etc.? Create your own coding agent to help enforce your specific coding standards and practices.
469
+
470
+ This can be integrated to almost any Vibecoding platform, like GitHub Copilot, Amazon CodeWhisperer, Cursor, Cline, Kilocode, Roocode,...
471
+
472
+ They will work the same as you are used to, but with your specific rules written in book.
473
+
474
+ #### Internal Expertise
475
+
476
+ Do you have an app written in TypeScript, Python, C#, Java, or any other language, and you are integrating the AI.
477
+
478
+ You can avoid struggle with choosing the best model, its settings like temperature, max tokens, etc., by writing a book agent and using it as your AI expertise.
479
+
480
+ Doesn't matter if you do automations, data analysis, customer support, sentiment analysis, classification, or any other task. Your AI agent will be tailored to your specific needs and requirements.
481
+
482
+ Even works in no-code platforms!
483
+
484
+ <div style="page-break-after: always;"></div>
485
+
486
+ ### How to create your AI agent in book
487
+
488
+ Now you want to use it. There are several ways how to write your first book:
489
+
490
+ #### From scratch with help from Paul
491
+
492
+ We have written ai asistant in book who can help you with writing your first book.
493
+
494
+
495
+
496
+ #### Your AI twin
497
+
498
+ Copy your own behavior, personality, and knowledge into book and create your AI twin. It can help you with your work, personal life, or any other task.
499
+
500
+
501
+
502
+ #### AI persona workpool
503
+
504
+ Or you can pick from our library of pre-written books for various roles and tasks. You can find books for customer support, coding, marketing, sales, HR, legal, and many other roles.
394
505
 
395
506
 
396
507
 
@@ -505,80 +616,7 @@ Join our growing community of developers and users:
505
616
 
506
617
 
507
618
 
508
- ## 📘 Book Language Blueprint
509
-
510
- _A concise, Markdown-based DSL for crafting AI workflows and automations._
511
-
512
- ### Introduction
513
-
514
- 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.
515
-
516
- ### Example
517
-
518
- ```book
519
- # 🌟 My First Book
520
-
521
- - BOOK VERSION 1.0.0
522
- - URL https://promptbook.studio/hello.book
523
- - INPUT PARAMETER {topic}
524
- - OUTPUT PARAMETER {article}
525
-
526
- # Write an Article
527
-
528
- - PERSONA Jane, marketing specialist with prior experience in tech and AI writing
529
- - KNOWLEDGE https://wikipedia.org/
530
- - KNOWLEDGE ./journalist-ethics.pdf
531
- - EXPECT MIN 1 Sentence
532
- - EXPECT MAX 5 Pages
533
-
534
- > Write an article about {topic}
535
-
536
- → {article}
537
- ```
538
-
539
- Each part of the book defines one of three circles:
540
-
541
- ### **1. What:** Workflows, Tasks and Parameters
542
-
543
- 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.
544
-
545
- **Related commands:**
546
-
547
- - [PARAMETER](https://github.com/webgptorg/promptbook/blob/main/documents/commands/PARAMETER.md)
548
-
549
- ### **2. Who:** Personas
550
-
551
- 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.
552
-
553
- 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",...`.
554
-
555
- Personas can have access to different knowledge, tools and actions. They can also consult their work with other personas or user, if allowed.
556
-
557
- **Related commands:**
558
-
559
- - [PERSONA](https://github.com/webgptorg/promptbook/blob/main/documents/commands/PERSONA.md)
560
-
561
- ### **3. How:** Knowledge, Instruments and Actions
562
619
 
563
- The resources used by the personas are used to do the work.
564
-
565
- **Related commands:**
566
-
567
- - [KNOWLEDGE](https://github.com/webgptorg/promptbook/blob/main/documents/commands/KNOWLEDGE.md) of documents, websites, and other resources
568
- - [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.
569
- - [ACTION](https://github.com/webgptorg/promptbook/blob/main/documents/commands/ACTION.md) for actions like sending emails, creating files, ending a workflow, etc.
570
-
571
- ### General Principles
572
-
573
- 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.
574
-
575
- The file has a `.book` extension and uses UTF-8 encoding without BOM.
576
-
577
- Books have two variants: flat — just a prompt without structure, and full — with tasks, commands, and prompts.
578
-
579
- As it is source code, it can leverage all the features of version control systems like git and does not suffer from the problems of binary formats, proprietary formats, or no-code solutions.
580
-
581
- But unlike programming languages, it is designed to be understandable by non-programmers and non-technical people.
582
620
 
583
621
 
584
622
 
@@ -658,6 +696,8 @@ The following glossary is used to clarify certain concepts:
658
696
 
659
697
  _Note: This section is not a complete dictionary, more list of general AI / LLM terms that has connection with Promptbook_
660
698
 
699
+
700
+
661
701
  ### 💯 Core concepts
662
702
 
663
703
  - [📚 Collection of pipelines](https://github.com/webgptorg/promptbook/discussions/65)
package/esm/index.es.js CHANGED
@@ -19,7 +19,7 @@ const BOOK_LANGUAGE_VERSION = '1.0.0';
19
19
  * @generated
20
20
  * @see https://github.com/webgptorg/promptbook
21
21
  */
22
- const PROMPTBOOK_ENGINE_VERSION = '0.103.0-1';
22
+ const PROMPTBOOK_ENGINE_VERSION = '0.103.0-11';
23
23
  /**
24
24
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
25
25
  * Note: [💞] Ignore a discrepancy between file name and entity name