@promptbook/openai 0.103.0-0 → 0.103.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 CHANGED
@@ -1,8 +1,10 @@
1
1
  <!-- ⚠️ WARNING: This code has been generated so that any manual changes will be overwritten -->
2
2
 
3
- # ✨ Promptbook: AI apps in plain Language
3
+ # ✨ Promptbook: AI Agents
4
+
5
+ Turn your company's scattered knowledge into AI ready Books
6
+
4
7
 
5
- Write AI applications using plain human language across multiple models and platforms.
6
8
 
7
9
 
8
10
 
@@ -376,19 +378,130 @@ Rest of the documentation is common for **entire promptbook ecosystem**:
376
378
 
377
379
 
378
380
 
379
- ## 🤍 The Book Abstract
381
+ ## 📖 The Book Whitepaper
382
+
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
+
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
+
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
+
389
+
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
+ />
394
+
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.
380
477
 
381
- **It's time for a paradigm shift! The future of software is written in plain English, French, or Latin.**
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.
382
479
 
383
- 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**!
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.
384
481
 
385
- 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!
482
+ Even works in no-code platforms!
386
483
 
387
- 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.
484
+ <div style="page-break-after: always;"></div>
388
485
 
389
- This shift will happen whether we're ready or not. Our mission is to make it excellent, not just good.
486
+ ### How to create your AI agent in book
390
487
 
391
- **Join us in this journey!**
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.
392
505
 
393
506
 
394
507
 
@@ -503,80 +616,7 @@ Join our growing community of developers and users:
503
616
 
504
617
 
505
618
 
506
- ## 📘 Book Language Blueprint
507
-
508
- _A concise, Markdown-based DSL for crafting AI workflows and automations._
509
-
510
- ### Introduction
511
-
512
- 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.
513
-
514
- ### Example
515
-
516
- ```book
517
- # 🌟 My First Book
518
-
519
- - BOOK VERSION 1.0.0
520
- - URL https://promptbook.studio/hello.book
521
- - INPUT PARAMETER {topic}
522
- - OUTPUT PARAMETER {article}
523
-
524
- # Write an Article
525
-
526
- - PERSONA Jane, marketing specialist with prior experience in tech and AI writing
527
- - KNOWLEDGE https://wikipedia.org/
528
- - KNOWLEDGE ./journalist-ethics.pdf
529
- - EXPECT MIN 1 Sentence
530
- - EXPECT MAX 5 Pages
531
-
532
- > Write an article about {topic}
533
-
534
- → {article}
535
- ```
536
-
537
- Each part of the book defines one of three circles:
538
619
 
539
- ### **1. What:** Workflows, Tasks and Parameters
540
-
541
- 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.
542
-
543
- **Related commands:**
544
-
545
- - [PARAMETER](https://github.com/webgptorg/promptbook/blob/main/documents/commands/PARAMETER.md)
546
-
547
- ### **2. Who:** Personas
548
-
549
- 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.
550
-
551
- 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",...`.
552
-
553
- Personas can have access to different knowledge, tools and actions. They can also consult their work with other personas or user, if allowed.
554
-
555
- **Related commands:**
556
-
557
- - [PERSONA](https://github.com/webgptorg/promptbook/blob/main/documents/commands/PERSONA.md)
558
-
559
- ### **3. How:** Knowledge, Instruments and Actions
560
-
561
- The resources used by the personas are used to do the work.
562
-
563
- **Related commands:**
564
-
565
- - [KNOWLEDGE](https://github.com/webgptorg/promptbook/blob/main/documents/commands/KNOWLEDGE.md) of documents, websites, and other resources
566
- - [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.
567
- - [ACTION](https://github.com/webgptorg/promptbook/blob/main/documents/commands/ACTION.md) for actions like sending emails, creating files, ending a workflow, etc.
568
-
569
- ### General Principles
570
-
571
- 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.
572
-
573
- The file has a `.book` extension and uses UTF-8 encoding without BOM.
574
-
575
- Books have two variants: flat — just a prompt without structure, and full — with tasks, commands, and prompts.
576
-
577
- 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.
578
-
579
- But unlike programming languages, it is designed to be understandable by non-programmers and non-technical people.
580
620
 
581
621
 
582
622
 
@@ -656,6 +696,8 @@ The following glossary is used to clarify certain concepts:
656
696
 
657
697
  _Note: This section is not a complete dictionary, more list of general AI / LLM terms that has connection with Promptbook_
658
698
 
699
+
700
+
659
701
  ### 💯 Core concepts
660
702
 
661
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-0';
22
+ const PROMPTBOOK_ENGINE_VERSION = '0.103.0-10';
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