@promptbook/ollama 0.105.0-1 → 0.105.0-4
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 +36 -77
- package/esm/index.es.js +3 -2
- package/esm/index.es.js.map +1 -1
- package/esm/typings/src/_packages/core.index.d.ts +2 -0
- package/esm/typings/src/_packages/types.index.d.ts +4 -0
- package/esm/typings/src/book-2.0/agent-source/AgentBasicInformation.d.ts +10 -3
- package/esm/typings/src/book-2.0/agent-source/AgentModelRequirements.d.ts +11 -1
- package/esm/typings/src/book-2.0/agent-source/communication-samples.test.d.ts +1 -0
- package/esm/typings/src/book-2.0/agent-source/createAgentModelRequirementsWithCommitments.blocks.test.d.ts +1 -0
- package/esm/typings/src/book-2.0/agent-source/createAgentModelRequirementsWithCommitments.import.test.d.ts +1 -0
- package/esm/typings/src/book-2.0/agent-source/parseAgentSource.import.test.d.ts +1 -0
- package/esm/typings/src/book-2.0/agent-source/parseAgentSourceWithCommitments.blocks.test.d.ts +1 -0
- package/esm/typings/src/commitments/USE_TIME/USE_TIME.d.ts +40 -0
- package/esm/typings/src/commitments/USE_TIME/USE_TIME.test.d.ts +1 -0
- package/esm/typings/src/commitments/_base/BaseCommitmentDefinition.d.ts +8 -0
- package/esm/typings/src/commitments/_base/CommitmentDefinition.d.ts +8 -0
- package/esm/typings/src/commitments/index.d.ts +11 -2
- package/esm/typings/src/config.d.ts +1 -0
- package/esm/typings/src/import-plugins/$fileImportPlugins.d.ts +7 -0
- package/esm/typings/src/import-plugins/AgentFileImportPlugin.d.ts +7 -0
- package/esm/typings/src/import-plugins/FileImportPlugin.d.ts +24 -0
- package/esm/typings/src/import-plugins/JsonFileImportPlugin.d.ts +7 -0
- package/esm/typings/src/import-plugins/TextFileImportPlugin.d.ts +7 -0
- package/esm/typings/src/llm-providers/_common/utils/cache/cacheLlmTools.d.ts +2 -1
- package/esm/typings/src/llm-providers/_common/utils/count-total-usage/countUsage.d.ts +2 -2
- package/esm/typings/src/llm-providers/agent/Agent.d.ts +9 -2
- package/esm/typings/src/llm-providers/agent/AgentLlmExecutionTools.d.ts +3 -1
- package/esm/typings/src/llm-providers/openai/OpenAiAssistantExecutionTools.d.ts +10 -0
- package/esm/typings/src/llm-providers/remote/RemoteLlmExecutionTools.d.ts +1 -1
- package/esm/typings/src/scripting/javascript/JavascriptExecutionToolsOptions.d.ts +6 -1
- package/esm/typings/src/types/ModelRequirements.d.ts +6 -12
- package/esm/typings/src/utils/execCommand/$execCommandNormalizeOptions.d.ts +2 -3
- package/esm/typings/src/utils/execCommand/ExecCommandOptions.d.ts +7 -1
- package/esm/typings/src/utils/organization/keepImported.d.ts +9 -0
- package/esm/typings/src/utils/organization/keepTypeImported.d.ts +0 -1
- package/esm/typings/src/version.d.ts +1 -1
- package/package.json +2 -2
- package/umd/index.umd.js +3 -2
- package/umd/index.umd.js.map +1 -1
package/README.md
CHANGED
|
@@ -62,19 +62,20 @@ Rest of the documentation is common for **entire promptbook ecosystem**:
|
|
|
62
62
|
|
|
63
63
|
## 📖 The Book Whitepaper
|
|
64
64
|
|
|
65
|
-
|
|
65
|
+
Nowadays, the biggest challenge for most business applications isn't the raw capabilities of AI models. Large language models such as GPT-5.2 and Claude-4.5 are incredibly capable.
|
|
66
66
|
|
|
67
|
-
The main challenge
|
|
67
|
+
The main challenge lies in **managing the context**, providing rules and knowledge, and narrowing the personality.
|
|
68
68
|
|
|
69
|
-
Promptbook
|
|
69
|
+
In Promptbook, you can define your context **using simple Books** that are very explicit, easy to understand and write, reliable, and highly portable.
|
|
70
70
|
|
|
71
71
|
<table style="border: 1px solid #777; border-radius: 10px;"><tr><td>
|
|
72
72
|
|
|
73
|
-
**<ins>Paul Smith
|
|
73
|
+
**<ins>Paul Smith</ins>**<br/>
|
|
74
74
|
<br/>
|
|
75
75
|
**PERSONA** You are a company lawyer.<br/>
|
|
76
76
|
Your job is to provide legal advice and support to the company and its employees.<br/>
|
|
77
|
-
You are knowledgeable, professional, and detail-oriented.<br/>
|
|
77
|
+
**RULE** You are knowledgeable, professional, and detail-oriented.<br/>
|
|
78
|
+
TEAM You are part of the legal team of Paul Smith & Associés, you discuss with {Emily White}, the head of the compliance department. {George Brown} is expert in corporate law and {Sophia Black} is expert in labor law.<br/>
|
|
78
79
|
|
|
79
80
|
</td></tr></table>
|
|
80
81
|
|
|
@@ -84,7 +85,9 @@ You are knowledgeable, professional, and detail-oriented.<br/>
|
|
|
84
85
|
|
|
85
86
|
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.
|
|
86
87
|
|
|
87
|
-
You can look at it as prompting (or writing a system message), but decorated by **commitments**.
|
|
88
|
+
You can look at it as "prompting" _(or writing a system message)_, but decorated by **commitments**.
|
|
89
|
+
|
|
90
|
+
**Commitments** are special syntax elements that define contracts between you and the AI agent. They are transformed by Promptbook Engine into low-level parameters like which model to use, its temperature, system message, RAG index, MCP servers, and many other parameters. For some commitments _(for example `RULE` commitment)_ Promptbook Engine can even create adversary agents and extra checks to enforce the rules.
|
|
88
91
|
|
|
89
92
|
#### `Persona` commitment
|
|
90
93
|
|
|
@@ -95,8 +98,6 @@ Personas define the character of your AI persona, its role, and how it should in
|
|
|
95
98
|
**<ins>Paul Smith & Associés</ins>**<br/>
|
|
96
99
|
<br/>
|
|
97
100
|
**PERSONA** You are a company lawyer.<br/>
|
|
98
|
-
Your job is to provide legal advice and support to the company and its employees.<br/>
|
|
99
|
-
You are knowledgeable, professional, and detail-oriented.<br/>
|
|
100
101
|
|
|
101
102
|
</td></tr></table>
|
|
102
103
|
|
|
@@ -116,7 +117,7 @@ Promptbook Engine will automatically enforce this knowledge during interactions.
|
|
|
116
117
|
Your job is to provide legal advice and support to the company and its employees.<br/>
|
|
117
118
|
You are knowledgeable, professional, and detail-oriented.<br/>
|
|
118
119
|
<br/>
|
|
119
|
-
**KNOWLEDGE**
|
|
120
|
+
**KNOWLEDGE** https://company.com/company-policies.pdf<br/>
|
|
120
121
|
**KNOWLEDGE** https://company.com/internal-documents/employee-handbook.docx<br/>
|
|
121
122
|
|
|
122
123
|
</td></tr></table>
|
|
@@ -138,14 +139,14 @@ You are knowledgeable, professional, and detail-oriented.<br/>
|
|
|
138
139
|
**RULE** Always ensure compliance with laws and regulations.<br/>
|
|
139
140
|
**RULE** Never provide legal advice outside your area of expertise.<br/>
|
|
140
141
|
**RULE** Never provide legal advice about criminal law.<br/>
|
|
141
|
-
**KNOWLEDGE**
|
|
142
|
+
**KNOWLEDGE** https://company.com/company-policies.pdf<br/>
|
|
142
143
|
**KNOWLEDGE** https://company.com/internal-documents/employee-handbook.docx<br/>
|
|
143
144
|
|
|
144
145
|
</td></tr></table>
|
|
145
146
|
|
|
146
|
-
#### `
|
|
147
|
+
#### `Team` commitment
|
|
147
148
|
|
|
148
|
-
|
|
149
|
+
Team commitment allows you to define the team structure and advisory fellow members the AI can consult with. This allows the AI to simulate collaboration and consultation with other experts, enhancing the quality of its responses.
|
|
149
150
|
|
|
150
151
|
<table style="border: 1px solid #777; border-radius: 10px;"><tr><td>
|
|
151
152
|
|
|
@@ -158,81 +159,36 @@ You are knowledgeable, professional, and detail-oriented.<br/>
|
|
|
158
159
|
**RULE** Always ensure compliance with laws and regulations.<br/>
|
|
159
160
|
**RULE** Never provide legal advice outside your area of expertise.<br/>
|
|
160
161
|
**RULE** Never provide legal advice about criminal law.<br/>
|
|
161
|
-
**KNOWLEDGE**
|
|
162
|
+
**KNOWLEDGE** https://company.com/company-policies.pdf<br/>
|
|
162
163
|
**KNOWLEDGE** https://company.com/internal-documents/employee-handbook.docx<br/>
|
|
163
|
-
|
|
164
|
+
TEAM You are part of the legal team of Paul Smith & Associés, you discuss with {Emily White}, the head of the compliance department. {George Brown} is expert in corporate law and {Sophia Black} is expert in labor law.<br/>
|
|
164
165
|
|
|
165
166
|
</td></tr></table>
|
|
166
167
|
|
|
167
|
-
[Read more about the language](./BLUEPRINT.md)
|
|
168
|
-
|
|
169
|
-
<div style="page-break-after: always;"></div>
|
|
170
|
-
|
|
171
|
-
### Where to use your AI agent in book
|
|
172
|
-
|
|
173
|
-
Books can be useful in various applications and scenarios. Here are some examples:
|
|
174
|
-
|
|
175
|
-
#### Chat apps:
|
|
176
168
|
|
|
177
|
-
Create your own chat shopping assistant and place it in your eShop.
|
|
178
|
-
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.
|
|
179
169
|
|
|
180
|
-
|
|
170
|
+
### Promptbook Ecosystem
|
|
181
171
|
|
|
182
|
-
|
|
172
|
+
!!!@@@
|
|
183
173
|
|
|
184
|
-
####
|
|
185
|
-
|
|
186
|
-
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.
|
|
187
|
-
|
|
188
|
-
This can be integrated to almost any Vibecoding platform, like GitHub Copilot, Amazon CodeWhisperer, Cursor, Cline, Kilocode, Roocode,...
|
|
189
|
-
|
|
190
|
-
They will work the same as you are used to, but with your specific rules written in book.
|
|
191
|
-
|
|
192
|
-
#### Internal Expertise
|
|
193
|
-
|
|
194
|
-
Do you have an app written in TypeScript, Python, C#, Java, or any other language, and you are integrating the AI.
|
|
195
|
-
|
|
196
|
-
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.
|
|
197
|
-
|
|
198
|
-
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.
|
|
199
|
-
|
|
200
|
-
Even works in no-code platforms!
|
|
201
|
-
|
|
202
|
-
<div style="page-break-after: always;"></div>
|
|
174
|
+
#### Promptbook Server
|
|
203
175
|
|
|
204
|
-
|
|
176
|
+
!!!@@@
|
|
205
177
|
|
|
206
|
-
|
|
178
|
+
#### Promptbook Engine
|
|
207
179
|
|
|
208
|
-
|
|
180
|
+
!!!@@@
|
|
209
181
|
|
|
210
|
-
We have written ai asistant in book who can help you with writing your first book.
|
|
211
182
|
|
|
212
|
-
#### Your AI twin
|
|
213
183
|
|
|
214
|
-
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.
|
|
215
184
|
|
|
216
|
-
#### AI persona workpool
|
|
217
185
|
|
|
218
|
-
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.
|
|
219
186
|
|
|
220
187
|
|
|
221
188
|
|
|
222
189
|
|
|
223
190
|
|
|
224
191
|
|
|
225
|
-
## 🚀 Get started
|
|
226
|
-
|
|
227
|
-
Take a look at the simple starter kit with books integrated into the **Hello World** sample applications:
|
|
228
|
-
|
|
229
|
-
- [Hello Book](https://github.com/webgptorg/hello-world)
|
|
230
|
-
- [Hello Book in Node.js](https://github.com/webgptorg/hello-world-node-js)
|
|
231
|
-
- [Hello Book in Next.js](https://github.com/webgptorg/hello-world-next-js)
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
192
|
|
|
237
193
|
|
|
238
194
|
## 💜 The Promptbook Project
|
|
@@ -248,33 +204,32 @@ Promptbook project is ecosystem of multiple projects and tools, following is a l
|
|
|
248
204
|
</thead>
|
|
249
205
|
<tbody>
|
|
250
206
|
<tr>
|
|
251
|
-
<td><a href="https://
|
|
207
|
+
<td><a href="https://gallery.ptbk.io/">Agents Server</a></td>
|
|
252
208
|
<td>
|
|
253
|
-
|
|
254
|
-
<hr>
|
|
255
|
-
There is also <a href="https://github.com/webgptorg/book-extension">a plugin for VSCode</a> to support <code>.book</code> file extension
|
|
209
|
+
Place where you "AI agents live". It allows to create, manage, deploy, and interact with AI agents created in Book language.
|
|
256
210
|
</td>
|
|
257
211
|
</tr>
|
|
258
212
|
<tr>
|
|
259
|
-
<td><a href="https://github.com/webgptorg/
|
|
213
|
+
<td><a href="https://github.com/webgptorg/book">Book language</a></td>
|
|
260
214
|
<td>
|
|
261
|
-
|
|
215
|
+
Human-friendly, high-level language that abstracts away low-level details of AI. It allows to focus on personality, behavior, knowledge, and rules of AI agents rather than on models, parameters, and prompt engineering.
|
|
216
|
+
<hr>
|
|
217
|
+
There is also <a href="https://github.com/webgptorg/book-extension">a plugin for VSCode</a> to support <code>.book</code> file extension
|
|
262
218
|
</td>
|
|
263
219
|
</tr>
|
|
264
220
|
<tr>
|
|
265
|
-
<td><a href="https://promptbook
|
|
221
|
+
<td><a href="https://github.com/webgptorg/promptbook">Promptbook Engine</a></td>
|
|
266
222
|
<td>
|
|
267
|
-
Promptbook
|
|
223
|
+
Promptbook engine can run AI agents based on Book language.
|
|
224
|
+
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">Promptbook Agent Server as Docker Package</a>
|
|
225
|
+
Agent Server is based on Promptbook Engine.
|
|
268
226
|
</td>
|
|
269
227
|
</tr>
|
|
228
|
+
|
|
270
229
|
</tbody>
|
|
271
230
|
</table>
|
|
272
231
|
|
|
273
|
-
Hello world examples:
|
|
274
232
|
|
|
275
|
-
- [Hello world](https://github.com/webgptorg/hello-world)
|
|
276
|
-
- [Hello world in Node.js](https://github.com/webgptorg/hello-world-node-js)
|
|
277
|
-
- [Hello world in Next.js](https://github.com/webgptorg/hello-world-next-js)
|
|
278
233
|
|
|
279
234
|
### 🌐 Community & Social Media
|
|
280
235
|
|
|
@@ -332,6 +287,8 @@ Join our growing community of developers and users:
|
|
|
332
287
|
|
|
333
288
|
|
|
334
289
|
|
|
290
|
+
|
|
291
|
+
|
|
335
292
|
## 📚 Documentation
|
|
336
293
|
|
|
337
294
|
See detailed guides and API reference in the [docs](https://github.com/webgptorg/promptbook/discussions/categories/concepts) or [online](https://discord.gg/x3QWNaa89N).
|
|
@@ -408,6 +365,8 @@ The following glossary is used to clarify certain concepts:
|
|
|
408
365
|
|
|
409
366
|
_Note: This section is not a complete dictionary, more list of general AI / LLM terms that has connection with Promptbook_
|
|
410
367
|
|
|
368
|
+
|
|
369
|
+
|
|
411
370
|
### 💯 Core concepts
|
|
412
371
|
|
|
413
372
|
- [📚 Collection of pipelines](https://github.com/webgptorg/promptbook/discussions/65)
|
package/esm/index.es.js
CHANGED
|
@@ -18,7 +18,7 @@ const BOOK_LANGUAGE_VERSION = '2.0.0';
|
|
|
18
18
|
* @generated
|
|
19
19
|
* @see https://github.com/webgptorg/promptbook
|
|
20
20
|
*/
|
|
21
|
-
const PROMPTBOOK_ENGINE_VERSION = '0.105.0-
|
|
21
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.105.0-4';
|
|
22
22
|
/**
|
|
23
23
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
24
24
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
@@ -1094,6 +1094,7 @@ const PROMPTBOOK_COLOR = Color.fromString('promptbook');
|
|
|
1094
1094
|
SEPARATOR: Color.fromHex('#cccccc'),
|
|
1095
1095
|
COMMITMENT: Color.fromHex('#DA0F78'),
|
|
1096
1096
|
PARAMETER: Color.fromHex('#8e44ad'),
|
|
1097
|
+
CODE_BLOCK: Color.fromHex('#7700ffff'),
|
|
1097
1098
|
});
|
|
1098
1099
|
// <- TODO: [🧠][🈵] Using `Color` here increases the package size approx 3kb, maybe remove it
|
|
1099
1100
|
/**
|
|
@@ -3221,7 +3222,7 @@ class OpenAiCompatibleExecutionTools {
|
|
|
3221
3222
|
const args = ${functionArgs};
|
|
3222
3223
|
return await ${functionName}(args);
|
|
3223
3224
|
`,
|
|
3224
|
-
parameters:
|
|
3225
|
+
parameters: prompt.parameters,
|
|
3225
3226
|
});
|
|
3226
3227
|
}
|
|
3227
3228
|
catch (error) {
|