@promptbook/pdf 0.86.0-8 โ†’ 0.86.6

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
@@ -5,8 +5,8 @@
5
5
 
6
6
 
7
7
 
8
- [![NPM Version of ![Promptbook logo - cube with letters P and B](./other/design/logo-h1.png) Promptbook](https://badge.fury.io/js/promptbook.svg)](https://www.npmjs.com/package/promptbook)
9
- [![Quality of package ![Promptbook logo - cube with letters P and B](./other/design/logo-h1.png) Promptbook](https://packagequality.com/shield/promptbook.svg)](https://packagequality.com/#?package=promptbook)
8
+ [![NPM Version of ![Promptbook logo - cube with letters P and B](./design/logo-h1.png) Promptbook](https://badge.fury.io/js/promptbook.svg)](https://www.npmjs.com/package/promptbook)
9
+ [![Quality of package ![Promptbook logo - cube with letters P and B](./design/logo-h1.png) Promptbook](https://packagequality.com/shield/promptbook.svg)](https://packagequality.com/#?package=promptbook)
10
10
  [![Known Vulnerabilities](https://snyk.io/test/github/webgptorg/promptbook/badge.svg)](https://snyk.io/test/github/webgptorg/promptbook)
11
11
  [![Issues](https://img.shields.io/github/issues/webgptorg/promptbook.svg?style=flat)](https://github.com/webgptorg/promptbook/issues)
12
12
 
@@ -17,18 +17,12 @@
17
17
  ## ๐ŸŒŸ New Features
18
18
 
19
19
  - ๐Ÿ“‚ We have plugin for [VSCode](https://github.com/webgptorg/book-extension) to support `.book` file extension
20
+ - ๐Ÿณ Available [Docker image](https://hub.docker.com/r/hejny/promptbook/)
20
21
  - ๐Ÿ’ซ Support of [`o3-mini` model by OpenAI](https://openai.com/index/openai-o3-mini/)
21
22
  - ๐Ÿ‹ **Support of [DeepSeek models](https://www.npmjs.com/package/@promptbook/deepseek)**
22
- - ๐Ÿ’™ Working [the **Book** language v1.0.0](https://github.com/webgptorg/book)
23
- - ๐Ÿ–ค Run books from CLI - `npx ptbk run path/to/your/book`
24
- - ๐Ÿ“š Support of `.docx`, `.doc` and `.pdf` documents as knowledge
25
23
 
26
24
 
27
25
 
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>
31
-
32
26
  ## ๐Ÿ“ฆ Package `@promptbook/pdf`
33
27
 
34
28
  - Promptbooks are [divided into several](#-packages) packages, all are published from [single monorepo](https://github.com/webgptorg/promptbook).
@@ -62,6 +56,8 @@ Rest of the documentation is common for **entire promptbook ecosystem**:
62
56
 
63
57
  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**!
64
58
 
59
+
60
+
65
61
  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!
66
62
 
67
63
  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.
@@ -98,17 +94,22 @@ Promptbook project is ecosystem of multiple projects and tools, following is a l
98
94
  <tr>
99
95
  <td><a href="https://github.com/webgptorg/book">Book language</a></td>
100
96
  <td>
101
- Book is a markdown-like language to define core entities like personas, knowledge, tasks,.... It is designed to be understandable by non-programmers and non-technical people<hr>
97
+ Book is a human-understandable markup language for writing AI applications such as chatbots, knowledge bases, agents, avarars, translators, automations and more.
98
+ <hr>
102
99
  There is also <a href="https://github.com/webgptorg/book-extension">a plugin for VSCode</a> to support <code>.book</code> file extension
103
100
  </td>
104
101
  </tr>
105
102
  <tr>
106
103
  <td><a href="https://github.com/webgptorg/promptbook">Promptbook Engine</a></td>
107
- <td>Promptbook implementation in TypeScript released as <a href="https://www.npmjs.com/package/@promptbook/core#-packages-for-developers">multiple NPM packages</a> and <a href="https://hub.docker.com/r/hejny/promptbook">Docker HUB</a></td>
104
+ <td>
105
+ Promptbook engine can run applications written in Book language. It is released as <a href="https://www.npmjs.com/package/@promptbook/core#-packages-for-developers">multiple NPM packages</a> and <a href="https://hub.docker.com/r/hejny/promptbook">Docker HUB</a>
106
+ </td>
108
107
  </tr>
109
108
  <tr>
110
109
  <td><a href="https://promptbook.studio">Promptbook Studio</a></td>
111
- <td>Studio to write Books and instantly publish them as miniapps</td>
110
+ <td>
111
+ Promptbook.studio is a web-based editor and runner for book applications. It is still in the experimental MVP stage.
112
+ </td>
112
113
  </tr>
113
114
  </tbody>
114
115
  </table>
@@ -119,16 +120,21 @@ We also have a community of developers and users of **Promptbook**:
119
120
  - [Landing page `ptbk.io`](https://ptbk.io)
120
121
  - [Github discussions](https://github.com/webgptorg/promptbook/discussions)
121
122
  - [LinkedIn `Promptbook`](https://linkedin.com/company/promptbook)
122
- - [Facebook `Promptbook`](https://www.facebook.com/61560776453536)
123
+ - [Facebook `Promptbook`](https://www.facebook.com/61560776453536)
123
124
 
124
125
  And **Promptbook.studio** branded socials:
125
126
 
127
+
128
+
126
129
  - [Instagram `@promptbook.studio`](https://www.instagram.com/promptbook.studio/)
127
130
 
128
131
  And **Promptujeme** sub-brand:
129
132
 
130
133
  _/Subbrand for Czech clients/_
131
134
 
135
+
136
+
137
+
132
138
  - [Promptujeme.cz](https://www.promptujeme.cz/)
133
139
  - [Facebook `Promptujeme`](https://www.facebook.com/promptujeme/)
134
140
 
@@ -137,16 +143,18 @@ And **Promptbook.city** branded socials:
137
143
  _/Sub-brand for images and graphics generated via Promptbook prompting/_
138
144
 
139
145
  - [Instagram `@promptbook.city`](https://www.instagram.com/promptbook.city/)
140
- - [Facebook `Promptbook City`](https://www.facebook.com/61565718625569)
146
+ - [Facebook `Promptbook City`](https://www.facebook.com/61565718625569)
147
+
148
+ ##
149
+
141
150
 
142
151
 
143
152
 
144
- ## ๐Ÿ’™ Book language _(for prompt-engineer)_
145
153
 
146
154
 
155
+ ## ๐Ÿ’™ The Book language
147
156
 
148
157
 
149
- ## ๐Ÿ’™ The blueprint of book language
150
158
 
151
159
  Following is the documentation and blueprint of the Book language.
152
160
 
@@ -155,6 +163,11 @@ Following is the documentation and blueprint of the Book language.
155
163
  ```markdown
156
164
  # ๐ŸŒŸ My first Book
157
165
 
166
+ - BOOK VERSION 1.0.0
167
+ - URL https://promptbook.studio/my-first-book/
168
+
169
+ # Write an article
170
+
158
171
  - PERSONA Jane, marketing specialist with prior experience in writing articles about technology and artificial intelligence
159
172
  - KNOWLEDGE https://ptbk.io
160
173
  - KNOWLEDGE ./promptbook.pdf
@@ -167,59 +180,31 @@ Following is the documentation and blueprint of the Book language.
167
180
  -> {article}
168
181
  ```
169
182
 
170
- ### Goals and principles of book language
183
+ ### **What:** Workflows, Tasks and Parameters
171
184
 
172
- File is designed to be easy to read and write. It is strict subset of markdown. It is designed to be understandable by both humans and machines and without specific knowledge of the language.
173
-
174
- It has file with `.book.md` or `.book` extension with `UTF-8` non BOM encoding.
175
-
176
- 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.
177
-
178
- But unlike programming languages, it is designed to be understandable by non-programmers and non-technical people.
185
+ - [PARAMETER](https://github.com/webgptorg/promptbook/blob/main/documents/commands/PARAMETER.md)
179
186
 
180
- ### Structure
187
+ ### **Who:** Personas
181
188
 
182
- Book is divided into sections. Each section starts with heading. The language itself is not sensitive to the type of heading _(`h1`, `h2`, `h3`, ...)_ but it is recommended to use `h1` for header section and `h2` for other sections.
189
+ - [PERSONA](https://github.com/webgptorg/promptbook/blob/main/documents/commands/PERSONA.md)
183
190
 
184
- ### Header
191
+ ### **How:** Knowledge, Instruments and Actions
185
192
 
186
- Header is the first section of the book. It contains metadata about the pipeline. It is recommended to use `h1` heading for header section but it is not required.
193
+ - [KNOWLEDGE](https://github.com/webgptorg/promptbook/blob/main/documents/commands/KNOWLEDGE.md)
194
+ - [INSTRUMENT](https://github.com/webgptorg/promptbook/blob/main/documents/commands/INSTRUMENT.md)
195
+ - [ACTION](https://github.com/webgptorg/promptbook/blob/main/documents/commands/ACTION.md)
187
196
 
188
- ### Parameter
197
+ ### General principles of book language
189
198
 
190
- Foo bar
199
+ 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.
191
200
 
192
- #### Parameter names
201
+ The file has `.book` extension. It uses `UTF-8` non BOM encoding.
193
202
 
194
- Reserved words:
203
+ Book has two variants: flat - which is just a prompt with no structure, and full - which has a structure with tasks, commands and prompts.
195
204
 
196
- - _each command_ like `PERSONA`, `EXPECT`, `KNOWLEDGE`, etc.
197
- - `content`
198
- - `context`
199
- - `knowledge`
200
- - `examples`
201
- - `modelName`
202
- - `currentDate`
203
-
204
- #### Parameter notation
205
-
206
- ### Task
207
-
208
- ### Task type
209
-
210
- Todo todo
211
-
212
- ### Command
213
-
214
- Todo todo
215
-
216
- ### Block
217
-
218
- Todo todo
219
-
220
- ### Return parameter
205
+ 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.
221
206
 
222
- ### Examples
207
+ But unlike programming languages, it is designed to be understandable by non-programmers and non-technical people.
223
208
 
224
209
 
225
210
 
@@ -265,6 +250,7 @@ Or you can install them separately:
265
250
  - **[@promptbook/templates](https://www.npmjs.com/package/@promptbook/templates)** - Usefull templates and examples of books which can be used as a starting point
266
251
  - **[@promptbook/types](https://www.npmjs.com/package/@promptbook/types)** - Just typescript types used in the library
267
252
  - โญ **[@promptbook/cli](https://www.npmjs.com/package/@promptbook/cli)** - Command line interface utilities for promptbooks
253
+ - ๐Ÿ‹ **[Docker image](https://hub.docker.com/r/hejny/promptbook/)** - Promptbook server
268
254
 
269
255
 
270
256
 
@@ -273,6 +259,11 @@ Or you can install them separately:
273
259
 
274
260
  ## ๐Ÿ“š Dictionary
275
261
 
262
+
263
+
264
+
265
+
266
+
276
267
  ### ๐Ÿ“š Dictionary
277
268
 
278
269
  The following glossary is used to clarify certain concepts:
@@ -288,6 +279,8 @@ The following glossary is used to clarify certain concepts:
288
279
  - **Retrieval-augmented generation** is a machine learning paradigm where a model generates text by retrieving relevant information from a large database of text. This approach combines the benefits of generative models and retrieval models.
289
280
  - **Longtail** refers to non-common or rare events, items, or entities that are not well-represented in the training data of machine learning models. Longtail items are often challenging for models to predict accurately.
290
281
 
282
+
283
+
291
284
  _Note: Thos section is not complete dictionary, more list of general AI / LLM terms that has connection with Promptbook_
292
285
 
293
286
  #### Promptbook core
@@ -348,6 +341,8 @@ _Note: Thos section is not complete dictionary, more list of general AI / LLM te
348
341
  - [๐Ÿ‘ฎ Agent adversary expectations](https://github.com/webgptorg/promptbook/discussions/39)
349
342
  - [view more](https://github.com/webgptorg/promptbook/discussions/categories/concepts)
350
343
 
344
+
345
+
351
346
  ### Terms specific to Promptbook TypeScript implementation
352
347
 
353
348
  - Anonymous mode
@@ -427,7 +422,7 @@ See [TODO.md](./TODO.md)
427
422
  <div style="display: flex; align-items: center; gap: 20px;">
428
423
 
429
424
  <a href="https://promptbook.studio/">
430
- <img src="./other/design/promptbook-studio-logo.png" alt="Partner 3" height="100">
425
+ <img src="./design/promptbook-studio-logo.png" alt="Partner 3" height="100">
431
426
  </a>
432
427
 
433
428
  <a href="https://technologickainkubace.org/en/about-technology-incubation/about-the-project/">
package/esm/index.es.js CHANGED
@@ -26,7 +26,7 @@ var BOOK_LANGUAGE_VERSION = '1.0.0';
26
26
  * @generated
27
27
  * @see https://github.com/webgptorg/promptbook
28
28
  */
29
- var PROMPTBOOK_ENGINE_VERSION = '0.86.0-7';
29
+ var PROMPTBOOK_ENGINE_VERSION = '0.86.6';
30
30
  /**
31
31
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
32
32
  * Note: [๐Ÿ’ž] Ignore a discrepancy between file name and entity name
@@ -1097,7 +1097,7 @@ function capitalize(word) {
1097
1097
  * Converts promptbook in JSON format to string format
1098
1098
  *
1099
1099
  * @deprecated TODO: [๐Ÿฅ][๐Ÿง ] Backup original files in `PipelineJson` same as in Promptbook.studio
1100
- * @param pipelineJson Promptbook in JSON format (.book.json)
1100
+ * @param pipelineJson Promptbook in JSON format (.bookc)
1101
1101
  * @returns Promptbook in string format (.book.md)
1102
1102
  * @public exported from `@promptbook/core`
1103
1103
  */
@@ -3907,7 +3907,9 @@ function prepareTasks(pipeline, tools, options) {
3907
3907
  return __generator(this, function (_a) {
3908
3908
  dependentParameterNames = task.dependentParameterNames;
3909
3909
  preparedContent = undefined;
3910
- if (knowledgePiecesCount > 0 && !dependentParameterNames.includes('knowledge')) {
3910
+ if (task.taskType === 'PROMPT_TASK' &&
3911
+ knowledgePiecesCount > 0 &&
3912
+ !dependentParameterNames.includes('knowledge')) {
3911
3913
  preparedContent = spaceTrim$1("\n {content}\n\n ## Knowledge\n\n {knowledge}\n ");
3912
3914
  // <- TODO: [๐Ÿง ][๐Ÿงป] Cutomize shape/language/formatting of the addition to the prompt
3913
3915
  dependentParameterNames = __spreadArray(__spreadArray([], __read(dependentParameterNames), false), [