@promptbook/cli 0.70.0-1 → 0.72.0-0
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 +21 -57
- package/esm/index.es.js +310 -281
- package/esm/index.es.js.map +1 -1
- package/esm/typings/promptbook-collection/index.d.ts +0 -3
- package/esm/typings/src/_packages/core.index.d.ts +4 -2
- package/esm/typings/src/_packages/openai.index.d.ts +4 -0
- package/esm/typings/src/_packages/types.index.d.ts +2 -0
- package/esm/typings/src/cli/cli-commands/make.d.ts +1 -1
- package/esm/typings/src/collection/constructors/createCollectionFromUrl.d.ts +1 -1
- package/esm/typings/src/commands/FOREACH/ForeachCommand.d.ts +1 -6
- package/esm/typings/src/commands/FOREACH/foreachCommandParser.d.ts +1 -2
- package/esm/typings/src/commands/_common/types/CommandParser.d.ts +1 -16
- package/esm/typings/src/config.d.ts +2 -2
- package/esm/typings/src/conversion/pipelineStringToJsonSync.d.ts +1 -1
- package/esm/typings/src/conversion/validation/validatePipeline.d.ts +5 -5
- package/esm/typings/src/execution/createPipelineExecutor.d.ts +1 -1
- package/esm/typings/src/execution/translation/automatic-translate/automatic-translators/LindatAutomaticTranslator.d.ts +1 -1
- package/esm/typings/src/execution/utils/addUsage.d.ts +0 -56
- package/esm/typings/src/execution/utils/usage-constants.d.ts +127 -0
- package/esm/typings/src/knowledge/dialogs/callback/CallbackInterfaceTools.d.ts +1 -1
- package/esm/typings/src/knowledge/dialogs/simple-prompt/SimplePromptInterfaceTools.d.ts +1 -1
- package/esm/typings/src/knowledge/prepare-knowledge/markdown/prepareKnowledgeFromMarkdown.d.ts +1 -1
- package/esm/typings/src/knowledge/prepare-knowledge/pdf/prepareKnowledgeFromPdf.d.ts +1 -1
- package/esm/typings/src/llm-providers/_common/utils/cache/CacheItem.d.ts +1 -1
- package/esm/typings/src/llm-providers/anthropic-claude/AnthropicClaudeExecutionTools.d.ts +3 -2
- package/esm/typings/src/llm-providers/anthropic-claude/anthropic-claude-models.d.ts +1 -1
- package/esm/typings/src/llm-providers/anthropic-claude/createAnthropicClaudeExecutionTools.d.ts +2 -2
- package/esm/typings/src/llm-providers/anthropic-claude/playground/playground.d.ts +2 -2
- package/esm/typings/src/llm-providers/azure-openai/AzureOpenAiExecutionTools.d.ts +3 -2
- package/esm/typings/src/llm-providers/mocked/MockedEchoLlmExecutionTools.d.ts +1 -1
- package/esm/typings/src/llm-providers/mocked/MockedFackedLlmExecutionTools.d.ts +1 -1
- package/esm/typings/src/llm-providers/openai/OpenAiAssistantExecutionTools.d.ts +37 -0
- package/esm/typings/src/llm-providers/openai/OpenAiAssistantExecutionToolsOptions.d.ts +14 -0
- package/esm/typings/src/llm-providers/openai/OpenAiExecutionTools.d.ts +3 -2
- package/esm/typings/src/llm-providers/openai/playground/playground.d.ts +1 -1
- package/esm/typings/src/llm-providers/remote/RemoteLlmExecutionTools.d.ts +1 -1
- package/esm/typings/src/personas/preparePersona.d.ts +1 -1
- package/esm/typings/src/prepare/isPipelinePrepared.d.ts +1 -1
- package/esm/typings/src/prepare/prepareTemplates.d.ts +1 -1
- package/esm/typings/src/scripting/javascript/JavascriptEvalExecutionTools.d.ts +1 -1
- package/esm/typings/src/scripting/python/PythonExecutionTools.d.ts +1 -1
- package/esm/typings/src/scripting/typescript/TypescriptExecutionTools.d.ts +1 -1
- package/esm/typings/src/storage/files-storage/FilesStorage.d.ts +1 -1
- package/esm/typings/src/types/PipelineJson/PipelineJson.d.ts +1 -1
- package/esm/typings/src/types/typeAliases.d.ts +1 -1
- package/esm/typings/src/utils/serialization/checkSerializableAsJson.d.ts +1 -1
- package/esm/typings/src/utils/serialization/isSerializableAsJson.d.ts +1 -1
- package/package.json +1 -1
- package/umd/index.umd.js +310 -281
- package/umd/index.umd.js.map +1 -1
- package/esm/typings/src/personas/preparePersona.test.d.ts +0 -1
package/README.md
CHANGED
|
@@ -103,15 +103,21 @@ This will prettify all promptbooks in `promptbook` directory and adds Mermaid gr
|
|
|
103
103
|
|
|
104
104
|
Rest of the documentation is common for **entire promptbook ecosystem**:
|
|
105
105
|
|
|
106
|
+
# ✨ New Features
|
|
107
|
+
|
|
108
|
+
- ✨ **Support [OpenAI o1 model](https://openai.com/o1/)**
|
|
109
|
+
|
|
106
110
|
## 🤍 The Promptbook Whitepaper
|
|
107
111
|
|
|
112
|
+
|
|
113
|
+
|
|
108
114
|
If you have a simple, single prompt for ChatGPT, GPT-4, Anthropic Claude, Google Gemini, Llama 2, or whatever, it doesn't matter how you integrate it. Whether it's calling a REST API directly, using the SDK, hardcoding the prompt into the source code, or importing a text file, the process remains the same.
|
|
109
115
|
|
|
110
116
|
But often you will struggle with the limitations of LLMs, such as hallucinations, off-topic responses, poor quality output, language drift, word repetition repetition repetition repetition or misuse, lack of context, or just plain w𝒆𝐢rd responses. When this happens, you generally have three options:
|
|
111
117
|
|
|
112
118
|
1. **Fine-tune** the model to your specifications or even train your own.
|
|
113
119
|
2. **Prompt-engineer** the prompt to the best shape you can achieve.
|
|
114
|
-
3.
|
|
120
|
+
3. Orchestrate **multiple prompts** in a [pipeline](https://github.com/webgptorg/promptbook/discussions/64) to get the best result.
|
|
115
121
|
|
|
116
122
|
In all of these situations, but especially in 3., the Promptbook library can make your life easier.
|
|
117
123
|
|
|
@@ -123,7 +129,9 @@ In all of these situations, but especially in 3., the Promptbook library can mak
|
|
|
123
129
|
- Promptbook has built in versioning. You can test multiple **A/B versions** of pipelines and see which one works best.
|
|
124
130
|
- Promptbook is designed to do [**RAG** (Retrieval-Augmented Generation)](https://github.com/webgptorg/promptbook/discussions/41) and other advanced techniques. You can use **knowledge** to improve the quality of the output.
|
|
125
131
|
|
|
126
|
-
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
## 🧔 Pipeline _(for prompt-engeneers)_
|
|
127
135
|
|
|
128
136
|
**P**romp**t** **b**oo**k** markdown file (or `.ptbk.md` file) is document that describes a **pipeline** - a series of prompts that are chained together to form somewhat reciepe for transforming natural language input.
|
|
129
137
|
|
|
@@ -440,6 +448,8 @@ The following glossary is used to clarify certain concepts:
|
|
|
440
448
|
- When you want to **version** your prompts and **test multiple versions**
|
|
441
449
|
- When you want to **log** the execution of prompts and backtrace the issues
|
|
442
450
|
|
|
451
|
+
[See more](https://github.com/webgptorg/promptbook/discussions/111)
|
|
452
|
+
|
|
443
453
|
### ➖ When not to use
|
|
444
454
|
|
|
445
455
|
- When you have already implemented single simple prompt and it works fine for your job
|
|
@@ -449,6 +459,8 @@ The following glossary is used to clarify certain concepts:
|
|
|
449
459
|
- When your main focus is on something other than text - like images, audio, video, spreadsheets _(other media types may be added in the future, [see discussion](https://github.com/webgptorg/promptbook/discussions/103))_
|
|
450
460
|
- When you need to use recursion _([see the discussion](https://github.com/webgptorg/promptbook/discussions/38))_
|
|
451
461
|
|
|
462
|
+
[See more](https://github.com/webgptorg/promptbook/discussions/112)
|
|
463
|
+
|
|
452
464
|
## 🐜 Known issues
|
|
453
465
|
|
|
454
466
|
- [🤸♂️ Iterations not working yet](https://github.com/webgptorg/promptbook/discussions/55)
|
|
@@ -461,63 +473,15 @@ The following glossary is used to clarify certain concepts:
|
|
|
461
473
|
|
|
462
474
|
## ❔ FAQ
|
|
463
475
|
|
|
464
|
-
|
|
465
|
-
|
|
466
476
|
If you have a question [start a discussion](https://github.com/webgptorg/promptbook/discussions/), [open an issue](https://github.com/webgptorg/promptbook/issues) or [write me an email](https://www.pavolhejny.com/contact).
|
|
467
477
|
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
We are considering creating a bridge/converter between these two libraries.
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
### Promptbooks vs. OpenAI`s GPTs
|
|
481
|
-
|
|
482
|
-
GPTs are chat assistants that can be assigned to specific tasks and materials. But they are still chat assistants. Promptbooks are a way to orchestrate many more predefined tasks to have much tighter control over the process. Promptbooks are not a good technology for creating human-like chatbots, GPTs are not a good technology for creating outputs with specific requirements.
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
### Where should I store my promptbooks?
|
|
499
|
-
|
|
500
|
-
If you use raw SDKs, you just put prompts in the sourcecode, mixed in with typescript, javascript, python or whatever programming language you use.
|
|
501
|
-
|
|
502
|
-
If you use promptbooks, you can store them in several places, each with its own advantages and disadvantages:
|
|
503
|
-
|
|
504
|
-
1. As **source code**, typically git-committed. In this case you can use the versioning system and the promptbooks will be tightly coupled with the version of the application. You still get the power of promptbooks, as you separate the concerns of the prompt-engineer and the programmer.
|
|
505
|
-
|
|
506
|
-
2. As data in a **database** In this case, promptbooks are like posts / articles on the blog. They can be modified independently of the application. You don't need to redeploy the application to change the promptbooks. You can have multiple versions of promptbooks for each user. You can have a web interface for non-programmers to create and modify promptbooks. But you lose the versioning system and you still have to consider the interface between the promptbooks and the application _(= input and output parameters)_.
|
|
507
|
-
|
|
508
|
-
3. In a **configuration** in environment variables. This is a good way to store promptbooks if you have an application with multiple deployments and you want to have different but simple promptbooks for each deployment and you don't need to change them often.
|
|
509
|
-
|
|
510
|
-
### What should I do when I need same promptbook in multiple human languages?
|
|
511
|
-
|
|
512
|
-
A single promptbook can be written for several _(human)_ languages at once. However, we recommend that you have separate promptbooks for each language.
|
|
513
|
-
|
|
514
|
-
In large language models, you will get better results if you have prompts in the same language as the user input.
|
|
515
|
-
|
|
516
|
-
The best way to manage this is to have suffixed promptbooks like `write-website-content.en.ptbk.md` and `write-website-content.cs.ptbk.md` for each supported language.
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
478
|
+
- [❔ Why not just use the OpenAI SDK / Anthropic Claude SDK / ...?](https://github.com/webgptorg/promptbook/discussions/114)
|
|
479
|
+
- [❔ How is it different from the OpenAI`s GPTs?](https://github.com/webgptorg/promptbook/discussions/118)
|
|
480
|
+
- [❔ How is it different from the Langchain?](https://github.com/webgptorg/promptbook/discussions/115)
|
|
481
|
+
- [❔ How is it different from the DSPy?](https://github.com/webgptorg/promptbook/discussions/117)
|
|
482
|
+
- [❔ How is it different from _anything_?](https://github.com/webgptorg/promptbook/discussions?discussions_q=is%3Aopen+label%3A%22Promptbook+vs%22)
|
|
483
|
+
- [❔ Is Promptbook using RAG _(Retrieval-Augmented Generation)_?](https://github.com/webgptorg/promptbook/discussions/123)
|
|
484
|
+
- [❔ Is Promptbook using function calling?](https://github.com/webgptorg/promptbook/discussions/124)
|
|
521
485
|
|
|
522
486
|
## ⌚ Changelog
|
|
523
487
|
|