@promptbook/types 0.92.0-9 → 0.93.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 +141 -89
- package/esm/typings/src/_packages/browser.index.d.ts +2 -0
- package/esm/typings/src/_packages/core.index.d.ts +26 -14
- package/esm/typings/src/_packages/types.index.d.ts +6 -2
- package/esm/typings/src/collection/PipelineCollection.d.ts +0 -2
- package/esm/typings/src/collection/SimplePipelineCollection.d.ts +1 -1
- package/esm/typings/src/commands/FOREACH/ForeachJson.d.ts +6 -6
- package/esm/typings/src/commands/FOREACH/foreachCommandParser.d.ts +0 -2
- package/esm/typings/src/commands/FORMFACTOR/formfactorCommandParser.d.ts +1 -1
- package/esm/typings/src/commands/_BOILERPLATE/boilerplateCommandParser.d.ts +1 -1
- package/esm/typings/src/commands/_common/types/CommandParser.d.ts +36 -28
- package/esm/typings/src/config.d.ts +41 -11
- package/esm/typings/src/constants.d.ts +43 -2
- package/esm/typings/src/conversion/parsePipeline.d.ts +2 -2
- package/esm/typings/src/errors/0-BoilerplateError.d.ts +2 -2
- package/esm/typings/src/errors/CollectionError.d.ts +1 -1
- package/esm/typings/src/executables/$provideExecutablesForNode.d.ts +1 -1
- package/esm/typings/src/executables/apps/locateLibreoffice.d.ts +2 -1
- package/esm/typings/src/executables/apps/locatePandoc.d.ts +2 -1
- package/esm/typings/src/executables/locateApp.d.ts +2 -2
- package/esm/typings/src/executables/platforms/locateAppOnLinux.d.ts +2 -1
- package/esm/typings/src/executables/platforms/locateAppOnMacOs.d.ts +2 -1
- package/esm/typings/src/executables/platforms/locateAppOnWindows.d.ts +2 -1
- package/esm/typings/src/execution/AbstractTaskResult.d.ts +1 -1
- package/esm/typings/src/execution/CommonToolsOptions.d.ts +3 -3
- package/esm/typings/src/execution/ExecutionTask.d.ts +19 -1
- package/esm/typings/src/execution/LlmExecutionToolsConstructor.d.ts +2 -1
- package/esm/typings/src/execution/PipelineExecutorResult.d.ts +4 -2
- package/esm/typings/src/execution/PromptbookFetch.d.ts +1 -1
- package/esm/typings/src/execution/ScriptExecutionTools.d.ts +1 -1
- package/esm/typings/src/execution/createPipelineExecutor/$OngoingTaskResult.d.ts +12 -9
- package/esm/typings/src/execution/createPipelineExecutor/10-executePipeline.d.ts +13 -10
- package/esm/typings/src/execution/createPipelineExecutor/20-executeTask.d.ts +12 -9
- package/esm/typings/src/execution/createPipelineExecutor/30-executeFormatSubvalues.d.ts +15 -3
- package/esm/typings/src/execution/createPipelineExecutor/40-executeAttempts.d.ts +21 -15
- package/esm/typings/src/execution/createPipelineExecutor/computeCosineSimilarity.d.ts +13 -0
- package/esm/typings/src/execution/createPipelineExecutor/filterJustOutputParameters.d.ts +7 -6
- package/esm/typings/src/execution/createPipelineExecutor/getContextForTask.d.ts +5 -1
- package/esm/typings/src/execution/createPipelineExecutor/getExamplesForTask.d.ts +1 -1
- package/esm/typings/src/execution/createPipelineExecutor/getKnowledgeForTask.d.ts +12 -9
- package/esm/typings/src/execution/createPipelineExecutor/getReservedParametersForTask.d.ts +18 -5
- package/esm/typings/src/execution/createPipelineExecutor/knowledgePiecesToString.d.ts +9 -0
- package/esm/typings/src/execution/execution-report/ExecutionReportJson.d.ts +1 -1
- package/esm/typings/src/execution/execution-report/ExecutionReportString.d.ts +1 -1
- package/esm/typings/src/execution/translation/automatic-translate/automatic-translators/LindatAutomaticTranslator.d.ts +4 -4
- package/esm/typings/src/execution/utils/checkExpectations.d.ts +3 -3
- package/esm/typings/src/execution/utils/uncertainNumber.d.ts +3 -2
- package/esm/typings/src/execution/utils/usageToWorktime.d.ts +1 -1
- package/esm/typings/src/formats/_common/{FormatDefinition.d.ts → FormatParser.d.ts} +8 -6
- package/esm/typings/src/formats/_common/FormatSubvalueParser.d.ts +66 -0
- package/esm/typings/src/formats/csv/CsvFormatParser.d.ts +17 -0
- package/esm/typings/src/formats/csv/CsvSettings.d.ts +2 -2
- package/esm/typings/src/formats/csv/utils/csvParse.d.ts +12 -0
- package/esm/typings/src/formats/csv/utils/isValidCsvString.d.ts +1 -1
- package/esm/typings/src/formats/index.d.ts +2 -2
- package/esm/typings/src/formats/json/JsonFormatParser.d.ts +19 -0
- package/esm/typings/src/formats/json/utils/isValidJsonString.d.ts +1 -1
- package/esm/typings/src/formats/json/utils/jsonParse.d.ts +0 -3
- package/esm/typings/src/formats/text/{TextFormatDefinition.d.ts → TextFormatParser.d.ts} +7 -7
- package/esm/typings/src/formats/xml/XmlFormatParser.d.ts +19 -0
- package/esm/typings/src/formats/xml/utils/isValidXmlString.d.ts +1 -1
- package/esm/typings/src/formfactors/_boilerplate/BoilerplateFormfactorDefinition.d.ts +3 -2
- package/esm/typings/src/formfactors/_common/AbstractFormfactorDefinition.d.ts +16 -7
- package/esm/typings/src/formfactors/_common/FormfactorDefinition.d.ts +3 -1
- package/esm/typings/src/formfactors/_common/string_formfactor_name.d.ts +2 -1
- package/esm/typings/src/formfactors/chatbot/ChatbotFormfactorDefinition.d.ts +2 -2
- package/esm/typings/src/formfactors/completion/CompletionFormfactorDefinition.d.ts +29 -0
- package/esm/typings/src/formfactors/generator/GeneratorFormfactorDefinition.d.ts +2 -1
- package/esm/typings/src/formfactors/generic/GenericFormfactorDefinition.d.ts +2 -2
- package/esm/typings/src/formfactors/index.d.ts +33 -8
- package/esm/typings/src/formfactors/matcher/MatcherFormfactorDefinition.d.ts +4 -2
- package/esm/typings/src/formfactors/sheets/SheetsFormfactorDefinition.d.ts +3 -2
- package/esm/typings/src/formfactors/translator/TranslatorFormfactorDefinition.d.ts +3 -2
- package/esm/typings/src/high-level-abstractions/index.d.ts +2 -2
- package/esm/typings/src/llm-providers/_common/register/$llmToolsMetadataRegister.d.ts +3 -3
- package/esm/typings/src/llm-providers/_common/register/$llmToolsRegister.d.ts +3 -3
- package/esm/typings/src/llm-providers/_common/register/$provideLlmToolsConfigurationFromEnv.d.ts +4 -4
- package/esm/typings/src/llm-providers/_common/register/$provideLlmToolsForTestingAndScriptsAndPlayground.d.ts +4 -3
- package/esm/typings/src/llm-providers/_common/register/$provideLlmToolsFromEnv.d.ts +18 -5
- package/esm/typings/src/llm-providers/_common/register/LlmToolsConfiguration.d.ts +11 -4
- package/esm/typings/src/llm-providers/_common/register/LlmToolsMetadata.d.ts +21 -42
- package/esm/typings/src/llm-providers/_common/register/LlmToolsOptions.d.ts +9 -2
- package/esm/typings/src/llm-providers/_common/register/createLlmToolsFromConfiguration.d.ts +13 -4
- package/esm/typings/src/llm-providers/_common/utils/cache/CacheItem.d.ts +10 -5
- package/esm/typings/src/llm-providers/_common/utils/cache/CacheLlmToolsOptions.d.ts +11 -3
- package/esm/typings/src/llm-providers/_common/utils/cache/cacheLlmTools.d.ts +3 -3
- package/esm/typings/src/llm-providers/_common/utils/count-total-usage/limitTotalUsage.d.ts +5 -5
- package/esm/typings/src/llm-providers/anthropic-claude/AnthropicClaudeExecutionTools.d.ts +6 -0
- package/esm/typings/src/llm-providers/anthropic-claude/anthropic-claude-models.d.ts +1 -1
- package/esm/typings/src/llm-providers/azure-openai/AzureOpenAiExecutionTools.d.ts +1 -1
- package/esm/typings/src/llm-providers/azure-openai/AzureOpenAiExecutionToolsOptions.d.ts +4 -4
- package/esm/typings/src/llm-providers/deepseek/deepseek-models.d.ts +1 -1
- package/esm/typings/src/llm-providers/google/google-models.d.ts +1 -1
- package/esm/typings/src/llm-providers/openai/OpenAiAssistantExecutionTools.d.ts +1 -1
- package/esm/typings/src/llm-providers/openai/openai-models.d.ts +1 -1
- package/esm/typings/src/llm-providers/openai/register-configuration.d.ts +2 -2
- package/esm/typings/src/llm-providers/openai/register-constructor.d.ts +2 -2
- package/esm/typings/src/migrations/migratePipeline.d.ts +9 -0
- package/esm/typings/src/other/templates/getBookTemplates.d.ts +2 -2
- package/esm/typings/src/pipeline/PipelineInterface/PipelineInterface.d.ts +3 -3
- package/esm/typings/src/pipeline/PipelineInterface/constants.d.ts +1 -1
- package/esm/typings/src/pipeline/PipelineInterface/getPipelineInterface.d.ts +1 -1
- package/esm/typings/src/pipeline/PipelineInterface/isPipelineImplementingInterface.d.ts +5 -4
- package/esm/typings/src/pipeline/PipelineInterface/isPipelineInterfacesEqual.d.ts +1 -1
- package/esm/typings/src/pipeline/PipelineJson/CommonTaskJson.d.ts +10 -7
- package/esm/typings/src/pipeline/PipelineJson/ParameterJson.d.ts +1 -1
- package/esm/typings/src/pipeline/PipelineJson/PipelineJson.d.ts +3 -2
- package/esm/typings/src/pipeline/PipelineString.d.ts +3 -1
- package/esm/typings/src/pipeline/book-notation.d.ts +2 -2
- package/esm/typings/src/postprocessing/utils/extractBlock.d.ts +1 -1
- package/esm/typings/src/postprocessing/utils/extractJsonBlock.d.ts +2 -2
- package/esm/typings/src/prepare/prepareTasks.d.ts +8 -5
- package/esm/typings/src/remote-server/openapi.d.ts +1 -1
- package/esm/typings/src/remote-server/socket-types/listModels/PromptbookServer_ListModels_Response.d.ts +1 -1
- package/esm/typings/src/remote-server/startRemoteServer.d.ts +1 -1
- package/esm/typings/src/remote-server/types/RemoteServerOptions.d.ts +7 -6
- package/esm/typings/src/scrapers/_boilerplate/BoilerplateScraper.d.ts +3 -3
- package/esm/typings/src/scrapers/_boilerplate/createBoilerplateScraper.d.ts +1 -1
- package/esm/typings/src/scrapers/_boilerplate/register-metadata.d.ts +1 -1
- package/esm/typings/src/scrapers/_common/Converter.d.ts +3 -1
- package/esm/typings/src/scrapers/_common/Scraper.d.ts +4 -3
- package/esm/typings/src/scrapers/_common/ScraperIntermediateSource.d.ts +4 -2
- package/esm/typings/src/scrapers/_common/prepareKnowledgePieces.d.ts +2 -2
- package/esm/typings/src/scrapers/_common/register/$provideFilesystemForNode.d.ts +2 -1
- package/esm/typings/src/scrapers/_common/register/$provideScrapersForBrowser.d.ts +6 -3
- package/esm/typings/src/scrapers/_common/register/$provideScrapersForNode.d.ts +3 -5
- package/esm/typings/src/scrapers/_common/register/$scrapersMetadataRegister.d.ts +3 -3
- package/esm/typings/src/scrapers/_common/register/$scrapersRegister.d.ts +3 -2
- package/esm/typings/src/scrapers/_common/register/ScraperAndConverterMetadata.d.ts +8 -5
- package/esm/typings/src/scrapers/_common/register/ScraperConstructor.d.ts +2 -1
- package/esm/typings/src/scrapers/_common/utils/getScraperIntermediateSource.d.ts +6 -5
- package/esm/typings/src/scrapers/_common/utils/makeKnowledgeSourceHandler.d.ts +3 -1
- package/esm/typings/src/scrapers/document/createDocumentScraper.d.ts +1 -1
- package/esm/typings/src/scrapers/document-legacy/createLegacyDocumentScraper.d.ts +2 -1
- package/esm/typings/src/scrapers/markdown/createMarkdownScraper.d.ts +4 -1
- package/esm/typings/src/scrapers/markitdown/MarkitdownScraper.d.ts +1 -1
- package/esm/typings/src/scrapers/pdf/createPdfScraper.d.ts +2 -1
- package/esm/typings/src/scrapers/website/createWebsiteScraper.d.ts +3 -4
- package/esm/typings/src/scripting/javascript/JavascriptExecutionTools.d.ts +1 -1
- package/esm/typings/src/scripting/javascript/postprocessing-functions.d.ts +5 -1
- package/esm/typings/src/scripting/javascript/utils/preserve.d.ts +1 -1
- package/esm/typings/src/storage/_common/PromptbookStorage.d.ts +1 -1
- package/esm/typings/src/storage/file-cache-storage/FileCacheStorage.d.ts +12 -5
- package/esm/typings/src/storage/file-cache-storage/FileCacheStorageOptions.d.ts +4 -2
- package/esm/typings/src/storage/file-cache-storage/utils/nameToSubfolderPath.d.ts +2 -1
- package/esm/typings/src/storage/local-storage/getIndexedDbStorage.d.ts +11 -0
- package/esm/typings/src/storage/local-storage/utils/IndexedDbStorageOptions.d.ts +14 -0
- package/esm/typings/src/storage/local-storage/utils/makePromptbookStorageFromIndexedDb.d.ts +8 -0
- package/esm/typings/src/storage/local-storage/utils/makePromptbookStorageFromWebStorage.d.ts +2 -1
- package/esm/typings/src/types/IntermediateFilesStrategy.d.ts +2 -1
- package/esm/typings/src/types/ModelRequirements.d.ts +2 -2
- package/esm/typings/src/types/ModelVariant.d.ts +5 -5
- package/esm/typings/src/types/typeAliases.d.ts +22 -19
- package/esm/typings/src/utils/$Register.d.ts +8 -7
- package/esm/typings/src/utils/editable/edit-pipeline-string/addPipelineCommand.d.ts +2 -2
- package/esm/typings/src/utils/editable/edit-pipeline-string/deflatePipeline.d.ts +4 -1
- package/esm/typings/src/utils/editable/utils/isFlatPipeline.d.ts +2 -1
- package/esm/typings/src/utils/editable/utils/stringifyPipelineJson.d.ts +1 -1
- package/esm/typings/src/utils/environment/$getGlobalScope.d.ts +2 -1
- package/esm/typings/src/utils/expectation-counters/index.d.ts +1 -1
- package/esm/typings/src/utils/markdown/extractAllBlocksFromMarkdown.d.ts +2 -2
- package/esm/typings/src/utils/markdown/extractAllListItemsFromMarkdown.d.ts +1 -1
- package/esm/typings/src/utils/markdown/extractOneBlockFromMarkdown.d.ts +2 -2
- package/esm/typings/src/utils/normalization/nameToUriPart.d.ts +4 -4
- package/esm/typings/src/utils/normalization/nameToUriParts.d.ts +4 -4
- package/esm/typings/src/utils/normalization/normalize-to-kebab-case.d.ts +3 -3
- package/esm/typings/src/utils/normalization/normalizeTo_SCREAMING_CASE.d.ts +3 -3
- package/esm/typings/src/utils/normalization/normalizeTo_camelCase.d.ts +4 -4
- package/esm/typings/src/utils/normalization/normalizeTo_snake_case.d.ts +3 -3
- package/esm/typings/src/utils/normalization/removeDiacritics.d.ts +3 -3
- package/esm/typings/src/utils/normalization/searchKeywords.d.ts +4 -1
- package/esm/typings/src/utils/normalization/titleToName.d.ts +4 -4
- package/esm/typings/src/utils/organization/TODO_USE.d.ts +1 -1
- package/esm/typings/src/utils/organization/empty_object.d.ts +2 -2
- package/esm/typings/src/utils/organization/just.d.ts +1 -1
- package/esm/typings/src/utils/organization/just_empty_object.d.ts +4 -4
- package/esm/typings/src/utils/organization/keepUnused.d.ts +1 -1
- package/esm/typings/src/utils/parameters/mapAvailableToExpectedParameters.d.ts +7 -7
- package/esm/typings/src/utils/removeQuotes.d.ts +2 -2
- package/esm/typings/src/utils/serialization/clonePipeline.d.ts +4 -3
- package/esm/typings/src/utils/serialization/deepClone.d.ts +5 -1
- package/esm/typings/src/utils/trimCodeBlock.d.ts +1 -1
- package/esm/typings/src/utils/trimEndOfCodeBlock.d.ts +1 -1
- package/esm/typings/src/utils/unwrapResult.d.ts +2 -2
- package/esm/typings/src/utils/validators/javascriptName/isValidJavascriptName.d.ts +3 -3
- package/esm/typings/src/utils/validators/parameterName/validateParameterName.d.ts +5 -4
- package/esm/typings/src/utils/validators/semanticVersion/isValidPromptbookVersion.d.ts +1 -1
- package/esm/typings/src/utils/validators/semanticVersion/isValidSemanticVersion.d.ts +1 -1
- package/esm/typings/src/utils/validators/url/isHostnameOnPrivateNetwork.d.ts +1 -1
- package/esm/typings/src/utils/validators/url/isUrlOnPrivateNetwork.d.ts +1 -1
- package/esm/typings/src/utils/validators/url/isValidPipelineUrl.d.ts +1 -1
- package/esm/typings/src/utils/validators/url/isValidUrl.d.ts +1 -1
- package/esm/typings/src/version.d.ts +2 -1
- package/esm/typings/src/wizzard/wizzard.d.ts +1 -1
- package/package.json +15 -3
- package/esm/typings/src/formats/_common/FormatSubvalueDefinition.d.ts +0 -31
- package/esm/typings/src/formats/csv/CsvFormatDefinition.d.ts +0 -17
- package/esm/typings/src/formats/json/JsonFormatDefinition.d.ts +0 -19
- package/esm/typings/src/formats/xml/XmlFormatDefinition.d.ts +0 -19
- /package/esm/typings/src/llm-providers/{multiple → _multiple}/MultipleLlmExecutionTools.d.ts +0 -0
- /package/esm/typings/src/llm-providers/{multiple → _multiple}/joinLlmExecutionTools.d.ts +0 -0
- /package/esm/typings/src/llm-providers/{multiple → _multiple}/playground/playground.d.ts +0 -0
package/README.md
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
<!-- ⚠️ WARNING: This code has been generated so that any manual changes will be overwritten -->
|
|
2
2
|
|
|
3
|
-
# ✨ Promptbook
|
|
3
|
+
# ✨ Promptbook: AI apps in plain Language
|
|
4
|
+
|
|
5
|
+
Write AI applications using plain human language across multiple models and platforms.
|
|
4
6
|
|
|
5
7
|
|
|
6
8
|
|
|
@@ -8,24 +10,20 @@
|
|
|
8
10
|
[ Promptbook](https://badge.fury.io/js/promptbook.svg)](https://www.npmjs.com/package/promptbook)
|
|
9
11
|
[ Promptbook](https://packagequality.com/shield/promptbook.svg)](https://packagequality.com/#?package=promptbook)
|
|
10
12
|
[](https://snyk.io/test/github/webgptorg/promptbook)
|
|
13
|
+
[](https://github.com/webgptorg/promptbook/actions)
|
|
14
|
+
[](https://coveralls.io/github/webgptorg/promptbook?branch=main)
|
|
11
15
|
[](https://github.com/webgptorg/promptbook/issues)
|
|
12
16
|
|
|
13
17
|
|
|
14
18
|
|
|
15
|
-
|
|
16
|
-
|
|
17
19
|
## 🌟 New Features
|
|
18
20
|
|
|
19
|
-
-
|
|
20
|
-
- 🐳
|
|
21
|
-
-
|
|
22
|
-
-
|
|
23
|
-
|
|
21
|
+
- 💡 VS Code support for `.book` files with syntax highlighting and IntelliSense
|
|
22
|
+
- 🐳 Official Docker image (`hejny/promptbook`) for seamless containerized usage
|
|
23
|
+
- 🔥 Native support for OpenAI `o3-mini`, GPT-4 and other leading LLMs
|
|
24
|
+
- 🔍 DeepSeek integration for advanced knowledge search
|
|
24
25
|
|
|
25
26
|
|
|
26
|
-
<blockquote style="color: #ff8811">
|
|
27
|
-
<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>.
|
|
28
|
-
</blockquote>
|
|
29
27
|
|
|
30
28
|
## 📦 Package `@promptbook/types`
|
|
31
29
|
|
|
@@ -41,7 +39,7 @@ npm i ptbk
|
|
|
41
39
|
npm i -D @promptbook/types
|
|
42
40
|
```
|
|
43
41
|
|
|
44
|
-
This package is
|
|
42
|
+
This package is useful when you want to explicitly define types in your code.
|
|
45
43
|
|
|
46
44
|
```typescript
|
|
47
45
|
import type { PipelineJson } from '@promptbook/types';
|
|
@@ -152,65 +150,92 @@ Hello world examples:
|
|
|
152
150
|
- [Hello world in Node.js](https://github.com/webgptorg/hello-world-node-js)
|
|
153
151
|
- [Hello world in Next.js](https://github.com/webgptorg/hello-world-next-js)
|
|
154
152
|
|
|
153
|
+
### 🌐 Community & Social Media
|
|
155
154
|
|
|
155
|
+
Join our growing community of developers and users:
|
|
156
156
|
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
157
|
+
<table>
|
|
158
|
+
<thead>
|
|
159
|
+
<tr>
|
|
160
|
+
<th>Platform</th>
|
|
161
|
+
<th>Description</th>
|
|
162
|
+
</tr>
|
|
163
|
+
</thead>
|
|
164
|
+
<tbody>
|
|
165
|
+
<tr>
|
|
166
|
+
<td><a href="https://discord.gg/x3QWNaa89N">💬 Discord</a></td>
|
|
167
|
+
<td>Join our active developer community for discussions and support</td>
|
|
168
|
+
</tr>
|
|
169
|
+
<tr>
|
|
170
|
+
<td><a href="https://github.com/webgptorg/promptbook/discussions">🗣️ GitHub Discussions</a></td>
|
|
171
|
+
<td>Technical discussions, feature requests, and community Q&A</td>
|
|
172
|
+
</tr>
|
|
173
|
+
<tr>
|
|
174
|
+
<td><a href="https://linkedin.com/company/promptbook">👔 LinkedIn</a></td>
|
|
175
|
+
<td>Professional updates and industry insights</td>
|
|
176
|
+
</tr>
|
|
177
|
+
<tr>
|
|
178
|
+
<td><a href="https://www.facebook.com/61560776453536">📱 Facebook</a></td>
|
|
179
|
+
<td>General announcements and community engagement</td>
|
|
180
|
+
</tr>
|
|
181
|
+
<tr>
|
|
182
|
+
<td><a href="https://ptbk.io">🔗 ptbk.io</a></td>
|
|
183
|
+
<td>Official landing page with project information</td>
|
|
184
|
+
</tr>
|
|
185
|
+
</tbody>
|
|
186
|
+
</table>
|
|
176
187
|
|
|
188
|
+
### 🖼️ Product & Brand Channels
|
|
177
189
|
|
|
178
|
-
|
|
179
|
-
- [Facebook `Promptujeme`](https://www.facebook.com/promptujeme/)
|
|
190
|
+
#### Promptbook.studio
|
|
180
191
|
|
|
181
|
-
|
|
192
|
+
<table>
|
|
193
|
+
<tbody>
|
|
194
|
+
<tr>
|
|
195
|
+
<td><a href="https://www.instagram.com/promptbook.studio/">📸 Instagram @promptbook.studio</a></td>
|
|
196
|
+
<td>Visual updates, UI showcases, and design inspiration</td>
|
|
197
|
+
</tr>
|
|
198
|
+
|
|
199
|
+
</tbody>
|
|
200
|
+
</table>
|
|
182
201
|
|
|
183
|
-
_/Sub-brand for images and graphics generated via Promptbook prompting/_
|
|
184
202
|
|
|
185
|
-
- [Instagram `@promptbook.city`](https://www.instagram.com/promptbook.city/)
|
|
186
|
-
- [Facebook `Promptbook City`](https://www.facebook.com/61565718625569)
|
|
187
203
|
|
|
188
204
|
|
|
189
205
|
|
|
190
206
|
|
|
207
|
+
## 📘 Book Language Blueprint
|
|
191
208
|
|
|
209
|
+
_A concise, Markdown-based DSL for crafting AI workflows and automations._
|
|
192
210
|
|
|
193
|
-
|
|
211
|
+
---
|
|
194
212
|
|
|
213
|
+
### 📑 Table of Contents
|
|
195
214
|
|
|
215
|
+
- [Introduction](#introduction)
|
|
216
|
+
- [Example](#example)
|
|
217
|
+
- [1. What: Workflows, Tasks & Parameters](#1-what-workflows-tasks--parameters)
|
|
218
|
+
- [2. Who: Personas](#2-who-personas)
|
|
219
|
+
- [3. How: Knowledge, Instruments & Actions](#3-how-knowledge-instruments-and-actions)
|
|
220
|
+
- [General Principles](#general-principles)
|
|
196
221
|
|
|
197
|
-
|
|
222
|
+
### Introduction
|
|
198
223
|
|
|
199
|
-
Book is a language that
|
|
224
|
+
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.
|
|
200
225
|
|
|
201
226
|
### Example
|
|
202
227
|
|
|
203
|
-
```
|
|
204
|
-
# 🌟 My
|
|
228
|
+
```book
|
|
229
|
+
# 🌟 My First Book
|
|
205
230
|
|
|
206
231
|
- BOOK VERSION 1.0.0
|
|
207
232
|
- URL https://promptbook.studio/hello.book
|
|
208
233
|
- INPUT PARAMETER {topic}
|
|
209
234
|
- OUTPUT PARAMETER {article}
|
|
210
235
|
|
|
211
|
-
# Write an
|
|
236
|
+
# Write an Article
|
|
212
237
|
|
|
213
|
-
- PERSONA Jane, marketing specialist with prior experience in
|
|
238
|
+
- PERSONA Jane, marketing specialist with prior experience in tech and AI writing
|
|
214
239
|
- KNOWLEDGE https://wikipedia.org/
|
|
215
240
|
- KNOWLEDGE ./journalist-ethics.pdf
|
|
216
241
|
- EXPECT MIN 1 Sentence
|
|
@@ -218,20 +243,20 @@ Book is a language that can be used to write AI applications, agents, workflows,
|
|
|
218
243
|
|
|
219
244
|
> Write an article about {topic}
|
|
220
245
|
|
|
221
|
-
|
|
246
|
+
→ {article}
|
|
222
247
|
```
|
|
223
248
|
|
|
224
249
|
Each part of the book defines one of 3 circles:
|
|
225
250
|
|
|
226
|
-
### **What:** Workflows, Tasks and Parameters
|
|
251
|
+
### **1. What:** Workflows, Tasks and Parameters
|
|
227
252
|
|
|
228
|
-
What work needs to be done. Each book defines a [workflow
|
|
253
|
+
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.
|
|
229
254
|
|
|
230
255
|
**Related commands:**
|
|
231
256
|
|
|
232
257
|
- [PARAMETER](https://github.com/webgptorg/promptbook/blob/main/documents/commands/PARAMETER.md)
|
|
233
258
|
|
|
234
|
-
### **Who:** Personas
|
|
259
|
+
### **2. Who:** Personas
|
|
235
260
|
|
|
236
261
|
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.
|
|
237
262
|
|
|
@@ -245,7 +270,7 @@ Personas can have access to different knowledge, tools and actions. They can als
|
|
|
245
270
|
|
|
246
271
|
|
|
247
272
|
|
|
248
|
-
### **How:** Knowledge, Instruments and Actions
|
|
273
|
+
### **3. How:** Knowledge, Instruments and Actions
|
|
249
274
|
|
|
250
275
|
The resources used by the personas are used to do the work.
|
|
251
276
|
|
|
@@ -255,7 +280,7 @@ The resources used by the personas are used to do the work.
|
|
|
255
280
|
- [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.
|
|
256
281
|
- [ACTION](https://github.com/webgptorg/promptbook/blob/main/documents/commands/ACTION.md) for actions like sending emails, creating files, ending a workflow, etc.
|
|
257
282
|
|
|
258
|
-
### General
|
|
283
|
+
### General Principles
|
|
259
284
|
|
|
260
285
|
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.
|
|
261
286
|
|
|
@@ -269,6 +294,10 @@ But unlike programming languages, it is designed to be understandable by non-pro
|
|
|
269
294
|
|
|
270
295
|
|
|
271
296
|
|
|
297
|
+
## 📚 Documentation
|
|
298
|
+
|
|
299
|
+
See detailed guides and API reference in the [docs](https://github.com/webgptorg/promptbook/discussions/categories/concepts) or [online](https://discord.gg/x3QWNaa89N).
|
|
300
|
+
|
|
272
301
|
## 🔒 Security
|
|
273
302
|
|
|
274
303
|
For information on reporting security vulnerabilities, see our [Security Policy](./SECURITY.md).
|
|
@@ -312,7 +341,7 @@ Or you can install them separately:
|
|
|
312
341
|
- **[@promptbook/legacy-documents](https://www.npmjs.com/package/@promptbook/legacy-documents)** - Read knowledge from legacy documents like `.doc`, `.rtf`,…
|
|
313
342
|
- **[@promptbook/website-crawler](https://www.npmjs.com/package/@promptbook/website-crawler)** - Crawl knowledge from the web
|
|
314
343
|
- **[@promptbook/editable](https://www.npmjs.com/package/@promptbook/editable)** - Editable book as native javascript object with imperative object API
|
|
315
|
-
- **[@promptbook/templates](https://www.npmjs.com/package/@promptbook/templates)** -
|
|
344
|
+
- **[@promptbook/templates](https://www.npmjs.com/package/@promptbook/templates)** - Useful templates and examples of books which can be used as a starting point
|
|
316
345
|
- **[@promptbook/types](https://www.npmjs.com/package/@promptbook/types)** - Just typescript types used in the library
|
|
317
346
|
- ⭐ **[@promptbook/cli](https://www.npmjs.com/package/@promptbook/cli)** - Command line interface utilities for promptbooks
|
|
318
347
|
- 🐋 **[Docker image](https://hub.docker.com/r/hejny/promptbook/)** - Promptbook server
|
|
@@ -349,25 +378,56 @@ _Note: This section is not complete dictionary, more list of general AI / LLM te
|
|
|
349
378
|
- [🤼 Personas](https://github.com/webgptorg/promptbook/discussions/22)
|
|
350
379
|
- [⭕ Parameters](https://github.com/webgptorg/promptbook/discussions/83)
|
|
351
380
|
- [🚀 Pipeline execution](https://github.com/webgptorg/promptbook/discussions/84)
|
|
352
|
-
- [🧪 Expectations](https://github.com/webgptorg/promptbook/discussions/30)
|
|
353
|
-
- [✂️ Postprocessing](https://github.com/webgptorg/promptbook/discussions/31)
|
|
354
|
-
- [🔣 Words not tokens](https://github.com/webgptorg/promptbook/discussions/29)
|
|
355
|
-
- [☯ Separation of concerns](https://github.com/webgptorg/promptbook/discussions/32)
|
|
381
|
+
- [🧪 Expectations](https://github.com/webgptorg/promptbook/discussions/30) - Define what outputs should look like and how they're validated
|
|
382
|
+
- [✂️ Postprocessing](https://github.com/webgptorg/promptbook/discussions/31) - How outputs are refined after generation
|
|
383
|
+
- [🔣 Words not tokens](https://github.com/webgptorg/promptbook/discussions/29) - The human-friendly way to think about text generation
|
|
384
|
+
- [☯ Separation of concerns](https://github.com/webgptorg/promptbook/discussions/32) - How Book language organizes different aspects of AI workflows
|
|
356
385
|
|
|
357
|
-
|
|
386
|
+
### Advanced concepts
|
|
387
|
+
|
|
388
|
+
<table>
|
|
389
|
+
<tr>
|
|
390
|
+
<th>Data & Knowledge Management</th>
|
|
391
|
+
<th>Pipeline Control</th>
|
|
392
|
+
</tr>
|
|
393
|
+
<tr>
|
|
394
|
+
<td>
|
|
395
|
+
<ul>
|
|
396
|
+
<li><a href="https://github.com/webgptorg/promptbook/discussions/41">📚 Knowledge (RAG)</a> - Retrieve and use external information</li>
|
|
397
|
+
<li><a href="https://github.com/webgptorg/promptbook/discussions/54">📽 Media handling</a> - Working with images, audio, video, spreadsheets</li>
|
|
398
|
+
<li><a href="https://github.com/webgptorg/promptbook/discussions/40">🔴 Anomaly detection</a> - Identifying unusual patterns or outputs</li>
|
|
399
|
+
</ul>
|
|
400
|
+
</td>
|
|
401
|
+
<td>
|
|
402
|
+
<ul>
|
|
403
|
+
<li><a href="https://github.com/webgptorg/promptbook/discussions/89">🌏 Remote server</a> - Executing workflows on remote infrastructure</li>
|
|
404
|
+
<li><a href="https://github.com/webgptorg/promptbook/discussions/66">🃏 Jokers (conditions)</a> - Adding conditional logic to workflows</li>
|
|
405
|
+
<li><a href="https://github.com/webgptorg/promptbook/discussions/35">🔳 Metaprompting</a> - Creating prompts that generate other prompts</li>
|
|
406
|
+
</ul>
|
|
407
|
+
</td>
|
|
408
|
+
</tr>
|
|
409
|
+
<tr>
|
|
410
|
+
<th>Language & Output Control</th>
|
|
411
|
+
<th>Advanced Generation</th>
|
|
412
|
+
</tr>
|
|
413
|
+
<tr>
|
|
414
|
+
<td>
|
|
415
|
+
<ul>
|
|
416
|
+
<li><a href="https://github.com/webgptorg/promptbook/discussions/53">🌏 Linguistically typed languages</a> - Type systems for natural language</li>
|
|
417
|
+
<li><a href="https://github.com/webgptorg/promptbook/discussions/42">🌍 Auto-Translations</a> - Automatic multilingual support</li>
|
|
418
|
+
<li><a href="https://github.com/webgptorg/promptbook/discussions/39">👮 Agent adversary expectations</a> - Safety and control mechanisms</li>
|
|
419
|
+
</ul>
|
|
420
|
+
</td>
|
|
421
|
+
<td>
|
|
422
|
+
<ul>
|
|
423
|
+
<li><a href="https://github.com/webgptorg/promptbook/discussions/37">🔙 Expectation-aware generation</a> - Outputs that meet defined criteria</li>
|
|
424
|
+
<li><a href="https://github.com/webgptorg/promptbook/discussions/33">⏳ Just-in-time fine-tuning</a> - Dynamic model adaptation</li>
|
|
425
|
+
</ul>
|
|
426
|
+
</td>
|
|
427
|
+
</tr>
|
|
428
|
+
</table>
|
|
358
429
|
|
|
359
|
-
|
|
360
|
-
- [🌏 Remote server](https://github.com/webgptorg/promptbook/discussions/89)
|
|
361
|
-
- [🃏 Jokers (conditions)](https://github.com/webgptorg/promptbook/discussions/66)
|
|
362
|
-
- [🔳 Metaprompting](https://github.com/webgptorg/promptbook/discussions/35)
|
|
363
|
-
- [🌏 Linguistically typed languages](https://github.com/webgptorg/promptbook/discussions/53)
|
|
364
|
-
- [🌍 Auto-Translations](https://github.com/webgptorg/promptbook/discussions/42)
|
|
365
|
-
- [📽 Images, audio, video, spreadsheets](https://github.com/webgptorg/promptbook/discussions/54)
|
|
366
|
-
- [🔙 Expectation-aware generation](https://github.com/webgptorg/promptbook/discussions/37)
|
|
367
|
-
- [⏳ Just-in-time fine-tuning](https://github.com/webgptorg/promptbook/discussions/33)
|
|
368
|
-
- [🔴 Anomaly detection](https://github.com/webgptorg/promptbook/discussions/40)
|
|
369
|
-
- [👮 Agent adversary expectations](https://github.com/webgptorg/promptbook/discussions/39)
|
|
370
|
-
- [view more](https://github.com/webgptorg/promptbook/discussions/categories/concepts)
|
|
430
|
+
<p align="center"><a href="https://github.com/webgptorg/promptbook/discussions/categories/concepts">🔍 View more concepts</a></p>
|
|
371
431
|
|
|
372
432
|
|
|
373
433
|
|
|
@@ -422,36 +482,28 @@ If you have a question [start a discussion](https://github.com/webgptorg/promptb
|
|
|
422
482
|
- [❔ Is Promptbook using RAG _(Retrieval-Augmented Generation)_?](https://github.com/webgptorg/promptbook/discussions/123)
|
|
423
483
|
- [❔ Is Promptbook using function calling?](https://github.com/webgptorg/promptbook/discussions/124)
|
|
424
484
|
|
|
425
|
-
##
|
|
485
|
+
## 📅 Changelog
|
|
426
486
|
|
|
427
487
|
See [CHANGELOG.md](./CHANGELOG.md)
|
|
428
488
|
|
|
429
489
|
## 📜 License
|
|
430
490
|
|
|
431
|
-
|
|
491
|
+
This project is licensed under [BUSL 1.1](./LICENSE.md).
|
|
432
492
|
|
|
433
|
-
##
|
|
493
|
+
## 🤝 Contributing
|
|
434
494
|
|
|
435
|
-
See [
|
|
495
|
+
We welcome contributions! See [CONTRIBUTING.md](./CONTRIBUTING.md) for guidelines.
|
|
436
496
|
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
<div style="display: flex; align-items: center; gap: 20px;">
|
|
440
|
-
|
|
441
|
-
<a href="https://promptbook.studio/">
|
|
442
|
-
<img src="./design/promptbook-studio-logo.png" alt="Partner 3" height="70">
|
|
443
|
-
</a>
|
|
444
|
-
|
|
445
|
-
<a href="https://technologickainkubace.org/en/about-technology-incubation/about-the-project/">
|
|
446
|
-
<img src="./other/partners/CI-Technology-Incubation.png" alt="Technology Incubation" height="70">
|
|
447
|
-
</a>
|
|
448
|
-
|
|
449
|
-
</div>
|
|
497
|
+
You can also ⭐ star the project, [follow us on GitHub](https://github.com/hejny) or [various other social networks](https://www.pavolhejny.com/contact/).We are open to [pull requests, feedback, and suggestions](./CONTRIBUTING.md).
|
|
450
498
|
|
|
451
|
-
##
|
|
499
|
+
## 🆘 Support & Community
|
|
452
500
|
|
|
453
|
-
|
|
501
|
+
Need help with Book language? We're here for you!
|
|
454
502
|
|
|
455
|
-
|
|
503
|
+
- 💬 [Join our Discord community](https://discord.gg/x3QWNaa89N) for real-time support
|
|
504
|
+
- 📝 [Browse our GitHub discussions](https://github.com/webgptorg/promptbook/discussions) for FAQs and community knowledge
|
|
505
|
+
- 🐛 [Report issues](https://github.com/webgptorg/book/issues) for bugs or feature requests
|
|
506
|
+
- 📚 Visit [ptbk.io](https://ptbk.io) for more resources and documentation
|
|
507
|
+
- 📧 Contact us directly through the channels listed in our [signpost](./SIGNPOST.md)
|
|
456
508
|
|
|
457
|
-
|
|
509
|
+
We welcome contributions and feedback to make Book language better for everyone!
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { BOOK_LANGUAGE_VERSION, PROMPTBOOK_ENGINE_VERSION } from '../version';
|
|
2
2
|
import { SimplePromptInterfaceTools } from '../dialogs/simple-prompt/SimplePromptInterfaceTools';
|
|
3
3
|
import { $provideScrapersForBrowser } from '../scrapers/_common/register/$provideScrapersForBrowser';
|
|
4
|
+
import { getIndexedDbStorage } from '../storage/local-storage/getIndexedDbStorage';
|
|
4
5
|
import { getLocalStorage } from '../storage/local-storage/getLocalStorage';
|
|
5
6
|
import { getSessionStorage } from '../storage/local-storage/getSessionStorage';
|
|
6
7
|
export { BOOK_LANGUAGE_VERSION, PROMPTBOOK_ENGINE_VERSION };
|
|
7
8
|
export { SimplePromptInterfaceTools };
|
|
8
9
|
export { $provideScrapersForBrowser };
|
|
10
|
+
export { getIndexedDbStorage };
|
|
9
11
|
export { getLocalStorage };
|
|
10
12
|
export { getSessionStorage };
|
|
@@ -13,6 +13,9 @@ import { DEFAULT_TASK_TITLE } from '../config';
|
|
|
13
13
|
import { DEFAULT_PROMPT_TASK_TITLE } from '../config';
|
|
14
14
|
import { DEFAULT_BOOK_OUTPUT_PARAMETER_NAME } from '../config';
|
|
15
15
|
import { DEFAULT_MAX_FILE_SIZE } from '../config';
|
|
16
|
+
import { BIG_DATASET_TRESHOLD } from '../config';
|
|
17
|
+
import { FAILED_VALUE_PLACEHOLDER } from '../config';
|
|
18
|
+
import { PENDING_VALUE_PLACEHOLDER } from '../config';
|
|
16
19
|
import { MAX_FILENAME_LENGTH } from '../config';
|
|
17
20
|
import { DEFAULT_INTERMEDIATE_FILES_STRATEGY } from '../config';
|
|
18
21
|
import { DEFAULT_MAX_PARALLEL_COUNT } from '../config';
|
|
@@ -32,6 +35,9 @@ import { DEFAULT_IS_VERBOSE } from '../config';
|
|
|
32
35
|
import { SET_IS_VERBOSE } from '../config';
|
|
33
36
|
import { DEFAULT_IS_AUTO_INSTALLED } from '../config';
|
|
34
37
|
import { DEFAULT_GET_PIPELINE_COLLECTION_FUNCTION_NAME } from '../config';
|
|
38
|
+
import { DEFAULT_MAX_REQUESTS_PER_MINUTE } from '../config';
|
|
39
|
+
import { MODEL_TRUST_LEVELS } from '../constants';
|
|
40
|
+
import { MODEL_ORDERS } from '../constants';
|
|
35
41
|
import { ORDER_OF_PIPELINE_JSON } from '../constants';
|
|
36
42
|
import { RESERVED_PARAMETER_NAMES } from '../constants';
|
|
37
43
|
import { compilePipeline } from '../conversion/compilePipeline';
|
|
@@ -62,6 +68,7 @@ import { PromptbookFetchError } from '../errors/PromptbookFetchError';
|
|
|
62
68
|
import { UnexpectedError } from '../errors/UnexpectedError';
|
|
63
69
|
import { WrappedError } from '../errors/WrappedError';
|
|
64
70
|
import { createPipelineExecutor } from '../execution/createPipelineExecutor/00-createPipelineExecutor';
|
|
71
|
+
import { computeCosineSimilarity } from '../execution/createPipelineExecutor/computeCosineSimilarity';
|
|
65
72
|
import { embeddingVectorToString } from '../execution/embeddingVectorToString';
|
|
66
73
|
import { executionReportJsonToString } from '../execution/execution-report/executionReportJsonToString';
|
|
67
74
|
import type { ExecutionReportStringOptions } from '../execution/execution-report/ExecutionReportStringOptions';
|
|
@@ -74,12 +81,13 @@ import { ZERO_USAGE } from '../execution/utils/usage-constants';
|
|
|
74
81
|
import { UNCERTAIN_USAGE } from '../execution/utils/usage-constants';
|
|
75
82
|
import { usageToHuman } from '../execution/utils/usageToHuman';
|
|
76
83
|
import { usageToWorktime } from '../execution/utils/usageToWorktime';
|
|
77
|
-
import { CsvFormatDefinition } from '../formats/csv/CsvFormatDefinition';
|
|
78
84
|
import { CsvFormatError } from '../formats/csv/CsvFormatError';
|
|
85
|
+
import { CsvFormatParser } from '../formats/csv/CsvFormatParser';
|
|
79
86
|
import { MANDATORY_CSV_SETTINGS } from '../formats/csv/CsvSettings';
|
|
80
|
-
import {
|
|
87
|
+
import { TextFormatParser } from '../formats/text/TextFormatParser';
|
|
81
88
|
import { BoilerplateFormfactorDefinition } from '../formfactors/_boilerplate/BoilerplateFormfactorDefinition';
|
|
82
89
|
import { ChatbotFormfactorDefinition } from '../formfactors/chatbot/ChatbotFormfactorDefinition';
|
|
90
|
+
import { CompletionFormfactorDefinition } from '../formfactors/completion/CompletionFormfactorDefinition';
|
|
83
91
|
import { GeneratorFormfactorDefinition } from '../formfactors/generator/GeneratorFormfactorDefinition';
|
|
84
92
|
import { GenericFormfactorDefinition } from '../formfactors/generic/GenericFormfactorDefinition';
|
|
85
93
|
import { ImageGeneratorFormfactorDefinition } from '../formfactors/image-generator/ImageGeneratorFormfactorDefinition';
|
|
@@ -91,19 +99,18 @@ import { filterModels } from '../llm-providers/_common/filterModels';
|
|
|
91
99
|
import { $llmToolsMetadataRegister } from '../llm-providers/_common/register/$llmToolsMetadataRegister';
|
|
92
100
|
import { $llmToolsRegister } from '../llm-providers/_common/register/$llmToolsRegister';
|
|
93
101
|
import { createLlmToolsFromConfiguration } from '../llm-providers/_common/register/createLlmToolsFromConfiguration';
|
|
94
|
-
import { MODEL_TRUST_LEVEL } from '../llm-providers/_common/register/LlmToolsMetadata';
|
|
95
|
-
import { MODEL_ORDER } from '../llm-providers/_common/register/LlmToolsMetadata';
|
|
96
102
|
import { cacheLlmTools } from '../llm-providers/_common/utils/cache/cacheLlmTools';
|
|
97
103
|
import { countUsage } from '../llm-providers/_common/utils/count-total-usage/countUsage';
|
|
98
104
|
import { limitTotalUsage } from '../llm-providers/_common/utils/count-total-usage/limitTotalUsage';
|
|
105
|
+
import { joinLlmExecutionTools } from '../llm-providers/_multiple/joinLlmExecutionTools';
|
|
106
|
+
import { MultipleLlmExecutionTools } from '../llm-providers/_multiple/MultipleLlmExecutionTools';
|
|
99
107
|
import { _AnthropicClaudeMetadataRegistration } from '../llm-providers/anthropic-claude/register-configuration';
|
|
100
108
|
import { _AzureOpenAiMetadataRegistration } from '../llm-providers/azure-openai/register-configuration';
|
|
101
109
|
import { _DeepseekMetadataRegistration } from '../llm-providers/deepseek/register-configuration';
|
|
102
110
|
import { _GoogleMetadataRegistration } from '../llm-providers/google/register-configuration';
|
|
103
|
-
import { joinLlmExecutionTools } from '../llm-providers/multiple/joinLlmExecutionTools';
|
|
104
|
-
import { MultipleLlmExecutionTools } from '../llm-providers/multiple/MultipleLlmExecutionTools';
|
|
105
111
|
import { _OpenAiMetadataRegistration } from '../llm-providers/openai/register-configuration';
|
|
106
112
|
import { _OpenAiAssistantMetadataRegistration } from '../llm-providers/openai/register-configuration';
|
|
113
|
+
import { migratePipeline } from '../migrations/migratePipeline';
|
|
107
114
|
import { preparePersona } from '../personas/preparePersona';
|
|
108
115
|
import { book } from '../pipeline/book-notation';
|
|
109
116
|
import { isValidPipelineString } from '../pipeline/isValidPipelineString';
|
|
@@ -115,7 +122,6 @@ import { EXPECTATION_UNITS } from '../pipeline/PipelineJson/Expectations';
|
|
|
115
122
|
import { validatePipelineString } from '../pipeline/validatePipelineString';
|
|
116
123
|
import { isPipelinePrepared } from '../prepare/isPipelinePrepared';
|
|
117
124
|
import { preparePipeline } from '../prepare/preparePipeline';
|
|
118
|
-
import { prepareTasks } from '../prepare/prepareTasks';
|
|
119
125
|
import { unpreparePipeline } from '../prepare/unpreparePipeline';
|
|
120
126
|
import { identificationToPromptbookToken } from '../remote-server/socket-types/_subtypes/identificationToPromptbookToken';
|
|
121
127
|
import { promptbookTokenToIdentification } from '../remote-server/socket-types/_subtypes/promptbookTokenToIdentification';
|
|
@@ -154,6 +160,9 @@ export { DEFAULT_TASK_TITLE };
|
|
|
154
160
|
export { DEFAULT_PROMPT_TASK_TITLE };
|
|
155
161
|
export { DEFAULT_BOOK_OUTPUT_PARAMETER_NAME };
|
|
156
162
|
export { DEFAULT_MAX_FILE_SIZE };
|
|
163
|
+
export { BIG_DATASET_TRESHOLD };
|
|
164
|
+
export { FAILED_VALUE_PLACEHOLDER };
|
|
165
|
+
export { PENDING_VALUE_PLACEHOLDER };
|
|
157
166
|
export { MAX_FILENAME_LENGTH };
|
|
158
167
|
export { DEFAULT_INTERMEDIATE_FILES_STRATEGY };
|
|
159
168
|
export { DEFAULT_MAX_PARALLEL_COUNT };
|
|
@@ -173,6 +182,9 @@ export { DEFAULT_IS_VERBOSE };
|
|
|
173
182
|
export { SET_IS_VERBOSE };
|
|
174
183
|
export { DEFAULT_IS_AUTO_INSTALLED };
|
|
175
184
|
export { DEFAULT_GET_PIPELINE_COLLECTION_FUNCTION_NAME };
|
|
185
|
+
export { DEFAULT_MAX_REQUESTS_PER_MINUTE };
|
|
186
|
+
export { MODEL_TRUST_LEVELS };
|
|
187
|
+
export { MODEL_ORDERS };
|
|
176
188
|
export { ORDER_OF_PIPELINE_JSON };
|
|
177
189
|
export { RESERVED_PARAMETER_NAMES };
|
|
178
190
|
export { compilePipeline };
|
|
@@ -203,6 +215,7 @@ export { PromptbookFetchError };
|
|
|
203
215
|
export { UnexpectedError };
|
|
204
216
|
export { WrappedError };
|
|
205
217
|
export { createPipelineExecutor };
|
|
218
|
+
export { computeCosineSimilarity };
|
|
206
219
|
export { embeddingVectorToString };
|
|
207
220
|
export { executionReportJsonToString };
|
|
208
221
|
export type { ExecutionReportStringOptions };
|
|
@@ -215,12 +228,13 @@ export { ZERO_USAGE };
|
|
|
215
228
|
export { UNCERTAIN_USAGE };
|
|
216
229
|
export { usageToHuman };
|
|
217
230
|
export { usageToWorktime };
|
|
218
|
-
export { CsvFormatDefinition };
|
|
219
231
|
export { CsvFormatError };
|
|
232
|
+
export { CsvFormatParser };
|
|
220
233
|
export { MANDATORY_CSV_SETTINGS };
|
|
221
|
-
export {
|
|
234
|
+
export { TextFormatParser };
|
|
222
235
|
export { BoilerplateFormfactorDefinition };
|
|
223
236
|
export { ChatbotFormfactorDefinition };
|
|
237
|
+
export { CompletionFormfactorDefinition };
|
|
224
238
|
export { GeneratorFormfactorDefinition };
|
|
225
239
|
export { GenericFormfactorDefinition };
|
|
226
240
|
export { ImageGeneratorFormfactorDefinition };
|
|
@@ -232,19 +246,18 @@ export { filterModels };
|
|
|
232
246
|
export { $llmToolsMetadataRegister };
|
|
233
247
|
export { $llmToolsRegister };
|
|
234
248
|
export { createLlmToolsFromConfiguration };
|
|
235
|
-
export { MODEL_TRUST_LEVEL };
|
|
236
|
-
export { MODEL_ORDER };
|
|
237
249
|
export { cacheLlmTools };
|
|
238
250
|
export { countUsage };
|
|
239
251
|
export { limitTotalUsage };
|
|
252
|
+
export { joinLlmExecutionTools };
|
|
253
|
+
export { MultipleLlmExecutionTools };
|
|
240
254
|
export { _AnthropicClaudeMetadataRegistration };
|
|
241
255
|
export { _AzureOpenAiMetadataRegistration };
|
|
242
256
|
export { _DeepseekMetadataRegistration };
|
|
243
257
|
export { _GoogleMetadataRegistration };
|
|
244
|
-
export { joinLlmExecutionTools };
|
|
245
|
-
export { MultipleLlmExecutionTools };
|
|
246
258
|
export { _OpenAiMetadataRegistration };
|
|
247
259
|
export { _OpenAiAssistantMetadataRegistration };
|
|
260
|
+
export { migratePipeline };
|
|
248
261
|
export { preparePersona };
|
|
249
262
|
export { book };
|
|
250
263
|
export { isValidPipelineString };
|
|
@@ -256,7 +269,6 @@ export { EXPECTATION_UNITS };
|
|
|
256
269
|
export { validatePipelineString };
|
|
257
270
|
export { isPipelinePrepared };
|
|
258
271
|
export { preparePipeline };
|
|
259
|
-
export { prepareTasks };
|
|
260
272
|
export { unpreparePipeline };
|
|
261
273
|
export { identificationToPromptbookToken };
|
|
262
274
|
export { promptbookTokenToIdentification };
|
|
@@ -61,7 +61,8 @@ import type { Usage } from '../execution/Usage';
|
|
|
61
61
|
import type { UsageCounts } from '../execution/Usage';
|
|
62
62
|
import type { UserInterfaceTools } from '../execution/UserInterfaceTools';
|
|
63
63
|
import type { UserInterfaceToolsPromptDialogOptions } from '../execution/UserInterfaceTools';
|
|
64
|
-
import type {
|
|
64
|
+
import type { FormatSubvalueParser } from '../formats/_common/FormatSubvalueParser';
|
|
65
|
+
import type { FormatSubvalueParserMapValuesOptions } from '../formats/_common/FormatSubvalueParser';
|
|
65
66
|
import type { CsvSettings } from '../formats/csv/CsvSettings';
|
|
66
67
|
import type { AbstractFormfactorDefinition } from '../formfactors/_common/AbstractFormfactorDefinition';
|
|
67
68
|
import type { FormfactorDefinition } from '../formfactors/_common/FormfactorDefinition';
|
|
@@ -133,6 +134,7 @@ import type { JavascriptExecutionToolsOptions } from '../scripting/javascript/Ja
|
|
|
133
134
|
import type { PostprocessingFunction } from '../scripting/javascript/JavascriptExecutionToolsOptions';
|
|
134
135
|
import type { PromptbookStorage } from '../storage/_common/PromptbookStorage';
|
|
135
136
|
import type { FileCacheStorageOptions } from '../storage/file-cache-storage/FileCacheStorageOptions';
|
|
137
|
+
import type { IndexedDbStorageOptions } from '../storage/local-storage/utils/IndexedDbStorageOptions';
|
|
136
138
|
import type { IntermediateFilesStrategy } from '../types/IntermediateFilesStrategy';
|
|
137
139
|
import type { ModelRequirements } from '../types/ModelRequirements';
|
|
138
140
|
import type { CompletionModelRequirements } from '../types/ModelRequirements';
|
|
@@ -357,7 +359,8 @@ export type { Usage };
|
|
|
357
359
|
export type { UsageCounts };
|
|
358
360
|
export type { UserInterfaceTools };
|
|
359
361
|
export type { UserInterfaceToolsPromptDialogOptions };
|
|
360
|
-
export type {
|
|
362
|
+
export type { FormatSubvalueParser };
|
|
363
|
+
export type { FormatSubvalueParserMapValuesOptions };
|
|
361
364
|
export type { CsvSettings };
|
|
362
365
|
export type { AbstractFormfactorDefinition };
|
|
363
366
|
export type { FormfactorDefinition };
|
|
@@ -429,6 +432,7 @@ export type { JavascriptExecutionToolsOptions };
|
|
|
429
432
|
export type { PostprocessingFunction };
|
|
430
433
|
export type { PromptbookStorage };
|
|
431
434
|
export type { FileCacheStorageOptions };
|
|
435
|
+
export type { IndexedDbStorageOptions };
|
|
432
436
|
export type { IntermediateFilesStrategy };
|
|
433
437
|
export type { ModelRequirements };
|
|
434
438
|
export type { CompletionModelRequirements };
|
|
@@ -4,8 +4,6 @@ import type { Prompt } from '../types/Prompt';
|
|
|
4
4
|
import type { string_pipeline_url } from '../types/typeAliases';
|
|
5
5
|
/**
|
|
6
6
|
* Collection that groups together pipelines, knowledge, personas, tools and actions
|
|
7
|
-
*
|
|
8
|
-
* @see @@@ https://github.com/webgptorg/pipeline#pipeline-collection
|
|
9
7
|
*/
|
|
10
8
|
export type PipelineCollection = {
|
|
11
9
|
/**
|
|
@@ -14,7 +14,7 @@ export declare class SimplePipelineCollection implements PipelineCollection {
|
|
|
14
14
|
/**
|
|
15
15
|
* Constructs a pipeline collection from pipelines
|
|
16
16
|
*
|
|
17
|
-
* @param pipelines
|
|
17
|
+
* @param pipelines Array of pipeline JSON objects to include in the collection
|
|
18
18
|
*
|
|
19
19
|
* Note: During the construction logic of all pipelines are validated
|
|
20
20
|
* Note: It is not recommended to use this constructor directly, use `createCollectionFromJson` *(or other variant)* instead
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
import type { string_parameter_name } from '../../types/typeAliases';
|
|
2
2
|
import type { TODO_string } from '../../utils/organization/TODO_string';
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* Information for the FOREACH command, describing how to iterate over a parameter's subvalues in a pipeline task.
|
|
5
5
|
*/
|
|
6
6
|
export type ForeachJson = {
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
8
|
+
* The name of the format to use for parsing the parameter (e.g., 'CSV').
|
|
9
9
|
*/
|
|
10
10
|
readonly formatName: TODO_string;
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
12
|
+
* The name of the subformat to use (e.g., CSV Rows).
|
|
13
13
|
*/
|
|
14
14
|
readonly subformatName: TODO_string;
|
|
15
15
|
/**
|
|
16
|
-
*
|
|
16
|
+
* The name of the parameter to iterate over.
|
|
17
17
|
*/
|
|
18
18
|
readonly parameterName: string_parameter_name;
|
|
19
19
|
/**
|
|
20
|
-
*
|
|
20
|
+
* The names of the subparameters (e.g., name of the CSV rows)
|
|
21
21
|
*/
|
|
22
22
|
readonly inputSubparameterNames: Array<string_parameter_name>;
|
|
23
23
|
/**
|
|
24
|
-
*
|
|
24
|
+
* The name of the subparameters (e.g., name of the CSV rows)
|
|
25
25
|
*/
|
|
26
26
|
readonly outputSubparameterName: string_parameter_name;
|
|
27
27
|
};
|
|
@@ -3,8 +3,6 @@ import type { ForeachCommand } from './ForeachCommand';
|
|
|
3
3
|
/**
|
|
4
4
|
* Parses the foreach command
|
|
5
5
|
*
|
|
6
|
-
* Note: @@@ This command is used as foreach for new commands - it should NOT be used in any `.book` file
|
|
7
|
-
*
|
|
8
6
|
* @see `documentationUrl` for more details
|
|
9
7
|
* @public exported from `@promptbook/editable`
|
|
10
8
|
*/
|
|
@@ -3,7 +3,7 @@ import type { FormfactorCommand } from './FormfactorCommand';
|
|
|
3
3
|
/**
|
|
4
4
|
* Parses the formfactor command
|
|
5
5
|
*
|
|
6
|
-
* Note:
|
|
6
|
+
* Note: This command is used as a formfactor for new commands and defines the app type format - it should NOT be used in any `.book` file
|
|
7
7
|
*
|
|
8
8
|
* @see `documentationUrl` for more details
|
|
9
9
|
* @public exported from `@promptbook/editable`
|