@promptbook/openai 0.94.0 → 0.95.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 +4 -12
- package/esm/index.es.js +6 -6
- package/esm/typings/src/_packages/types.index.d.ts +2 -2
- package/esm/typings/src/_packages/{wizzard.index.d.ts → wizard.index.d.ts} +2 -2
- package/esm/typings/src/cli/cli-commands/prettify.d.ts +1 -1
- package/esm/typings/src/cli/cli-commands/test-command.d.ts +1 -1
- package/esm/typings/src/conversion/archive/loadArchive.d.ts +1 -1
- package/esm/typings/src/conversion/archive/saveArchive.d.ts +2 -2
- package/esm/typings/src/conversion/prettify/renderPipelineMermaidOptions.d.ts +1 -1
- package/esm/typings/src/dialogs/callback/CallbackInterfaceTools.d.ts +1 -1
- package/esm/typings/src/execution/AbstractTaskResult.d.ts +2 -2
- package/esm/typings/src/execution/createPipelineExecutor/00-CreatePipelineExecutorOptions.d.ts +1 -1
- package/esm/typings/src/execution/execution-report/ExecutionPromptReportJson.d.ts +2 -2
- package/esm/typings/src/execution/translation/automatic-translate/translateMessages.d.ts +1 -1
- package/esm/typings/src/llm-providers/_common/register/{$provideLlmToolsForWizzardOrCli.d.ts → $provideLlmToolsForWizardOrCli.d.ts} +2 -2
- package/esm/typings/src/llm-providers/anthropic-claude/register-configuration.d.ts +1 -1
- package/esm/typings/src/llm-providers/anthropic-claude/register-constructor.d.ts +1 -1
- package/esm/typings/src/llm-providers/azure-openai/register-configuration.d.ts +1 -1
- package/esm/typings/src/llm-providers/azure-openai/register-constructor.d.ts +1 -1
- package/esm/typings/src/llm-providers/deepseek/register-configuration.d.ts +1 -1
- package/esm/typings/src/llm-providers/deepseek/register-constructor.d.ts +1 -1
- package/esm/typings/src/llm-providers/google/register-configuration.d.ts +1 -1
- package/esm/typings/src/llm-providers/google/register-constructor.d.ts +1 -1
- package/esm/typings/src/llm-providers/ollama/register-configuration.d.ts +1 -1
- package/esm/typings/src/llm-providers/ollama/register-constructor.d.ts +1 -1
- package/esm/typings/src/llm-providers/openai/OpenAiAssistantExecutionTools.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/remote-server/socket-types/listModels/PromptbookServer_ListModels_Request.d.ts +1 -1
- package/esm/typings/src/scrapers/_boilerplate/createBoilerplateScraper.d.ts +1 -1
- package/esm/typings/src/scrapers/_boilerplate/register-constructor.d.ts +1 -1
- package/esm/typings/src/scrapers/_boilerplate/register-metadata.d.ts +2 -2
- package/esm/typings/src/scrapers/_common/prepareKnowledgePieces.d.ts +1 -1
- package/esm/typings/src/scrapers/_common/register/ScraperAndConverterMetadata.d.ts +1 -1
- package/esm/typings/src/scrapers/document/createDocumentScraper.d.ts +1 -1
- package/esm/typings/src/scrapers/document/register-constructor.d.ts +1 -1
- package/esm/typings/src/scrapers/document/register-metadata.d.ts +2 -2
- package/esm/typings/src/scrapers/document-legacy/createLegacyDocumentScraper.d.ts +1 -1
- package/esm/typings/src/scrapers/document-legacy/register-constructor.d.ts +1 -1
- package/esm/typings/src/scrapers/document-legacy/register-metadata.d.ts +2 -2
- package/esm/typings/src/scrapers/markdown/createMarkdownScraper.d.ts +1 -4
- package/esm/typings/src/scrapers/markdown/register-constructor.d.ts +1 -1
- package/esm/typings/src/scrapers/markdown/register-metadata.d.ts +2 -2
- package/esm/typings/src/scrapers/markitdown/createMarkitdownScraper.d.ts +1 -1
- package/esm/typings/src/scrapers/markitdown/register-constructor.d.ts +1 -1
- package/esm/typings/src/scrapers/markitdown/register-metadata.d.ts +2 -2
- package/esm/typings/src/scrapers/pdf/createPdfScraper.d.ts +1 -1
- package/esm/typings/src/scrapers/pdf/register-constructor.d.ts +1 -1
- package/esm/typings/src/scrapers/pdf/register-metadata.d.ts +2 -2
- package/esm/typings/src/scrapers/website/createWebsiteScraper.d.ts +1 -1
- package/esm/typings/src/scrapers/website/register-constructor.d.ts +1 -1
- package/esm/typings/src/scrapers/website/register-metadata.d.ts +2 -2
- package/esm/typings/src/types/typeAliases.d.ts +1 -1
- package/esm/typings/src/utils/files/listAllFiles.d.ts +1 -1
- package/esm/typings/src/version.d.ts +1 -1
- package/esm/typings/src/{wizzard → wizard}/$getCompiledBook.d.ts +2 -2
- package/esm/typings/src/{wizzard/wizzard.d.ts → wizard/wizard.d.ts} +6 -6
- package/package.json +2 -14
- package/umd/index.umd.js +6 -6
package/README.md
CHANGED
|
@@ -108,11 +108,11 @@ console.info(outputParameters);
|
|
|
108
108
|
Run books without any settings, boilerplate or struggle in Node.js:
|
|
109
109
|
|
|
110
110
|
```typescript
|
|
111
|
-
import {
|
|
111
|
+
import { wizard } from '@promptbook/wizard';
|
|
112
112
|
|
|
113
113
|
const {
|
|
114
114
|
outputParameters: { joke },
|
|
115
|
-
} = await
|
|
115
|
+
} = await wizard.execute(`https://github.com/webgptorg/book/blob/main/books/templates/generic.book`, {
|
|
116
116
|
topic: 'Prague',
|
|
117
117
|
});
|
|
118
118
|
|
|
@@ -259,8 +259,6 @@ Rest of the documentation is common for **entire promptbook ecosystem**:
|
|
|
259
259
|
|
|
260
260
|
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**!
|
|
261
261
|
|
|
262
|
-
|
|
263
|
-
|
|
264
262
|
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!
|
|
265
263
|
|
|
266
264
|
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.
|
|
@@ -386,8 +384,6 @@ Join our growing community of developers and users:
|
|
|
386
384
|
|
|
387
385
|
_A concise, Markdown-based DSL for crafting AI workflows and automations._
|
|
388
386
|
|
|
389
|
-
|
|
390
|
-
|
|
391
387
|
### Introduction
|
|
392
388
|
|
|
393
389
|
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.
|
|
@@ -437,8 +433,6 @@ Personas can have access to different knowledge, tools and actions. They can als
|
|
|
437
433
|
|
|
438
434
|
- [PERSONA](https://github.com/webgptorg/promptbook/blob/main/documents/commands/PERSONA.md)
|
|
439
435
|
|
|
440
|
-
|
|
441
|
-
|
|
442
436
|
### **3. How:** Knowledge, Instruments and Actions
|
|
443
437
|
|
|
444
438
|
The resources used by the personas are used to do the work.
|
|
@@ -486,13 +480,13 @@ Or you can install them separately:
|
|
|
486
480
|
|
|
487
481
|
- ⭐ **[ptbk](https://www.npmjs.com/package/ptbk)** - Bundle of all packages, when you want to install everything and you don't care about the size
|
|
488
482
|
- **[promptbook](https://www.npmjs.com/package/promptbook)** - Same as `ptbk`
|
|
489
|
-
- ⭐🧙♂️ **[@promptbook/
|
|
483
|
+
- ⭐🧙♂️ **[@promptbook/wizard](https://www.npmjs.com/package/@promptbook/wizard)** - Wizard to just run the books in node without any struggle
|
|
490
484
|
- **[@promptbook/core](https://www.npmjs.com/package/@promptbook/core)** - Core of the library, it contains the main logic for promptbooks
|
|
491
485
|
- **[@promptbook/node](https://www.npmjs.com/package/@promptbook/node)** - Core of the library for Node.js environment
|
|
492
486
|
- **[@promptbook/browser](https://www.npmjs.com/package/@promptbook/browser)** - Core of the library for browser environment
|
|
493
487
|
- ⭐ **[@promptbook/utils](https://www.npmjs.com/package/@promptbook/utils)** - Utility functions used in the library but also useful for individual use in preprocessing and postprocessing LLM inputs and outputs
|
|
494
488
|
- **[@promptbook/markdown-utils](https://www.npmjs.com/package/@promptbook/markdown-utils)** - Utility functions used for processing markdown
|
|
495
|
-
- _(Not finished)_ **[@promptbook/
|
|
489
|
+
- _(Not finished)_ **[@promptbook/wizard](https://www.npmjs.com/package/@promptbook/wizard)** - Wizard for creating+running promptbooks in single line
|
|
496
490
|
- **[@promptbook/javascript](https://www.npmjs.com/package/@promptbook/javascript)** - Execution tools for javascript inside promptbooks
|
|
497
491
|
- **[@promptbook/openai](https://www.npmjs.com/package/@promptbook/openai)** - Execution tools for OpenAI API, wrapper around OpenAI SDK
|
|
498
492
|
- **[@promptbook/anthropic-claude](https://www.npmjs.com/package/@promptbook/anthropic-claude)** - Execution tools for Anthropic Claude API, wrapper around Anthropic Claude SDK
|
|
@@ -538,8 +532,6 @@ The following glossary is used to clarify certain concepts:
|
|
|
538
532
|
|
|
539
533
|
_Note: This section is not a complete dictionary, more list of general AI / LLM terms that has connection with Promptbook_
|
|
540
534
|
|
|
541
|
-
|
|
542
|
-
|
|
543
535
|
### 💯 Core concepts
|
|
544
536
|
|
|
545
537
|
- [📚 Collection of pipelines](https://github.com/webgptorg/promptbook/discussions/65)
|
package/esm/index.es.js
CHANGED
|
@@ -18,7 +18,7 @@ const BOOK_LANGUAGE_VERSION = '1.0.0';
|
|
|
18
18
|
* @generated
|
|
19
19
|
* @see https://github.com/webgptorg/promptbook
|
|
20
20
|
*/
|
|
21
|
-
const PROMPTBOOK_ENGINE_VERSION = '0.
|
|
21
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.95.0';
|
|
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
|
|
@@ -514,7 +514,7 @@ function checkSerializableAsJson(options) {
|
|
|
514
514
|
else {
|
|
515
515
|
for (const [subName, subValue] of Object.entries(value)) {
|
|
516
516
|
if (subValue === undefined) {
|
|
517
|
-
// Note: undefined in object is serializable - it is just
|
|
517
|
+
// Note: undefined in object is serializable - it is just omitted
|
|
518
518
|
continue;
|
|
519
519
|
}
|
|
520
520
|
checkSerializableAsJson({ name: `${name}.${subName}`, value: subValue, message });
|
|
@@ -2237,7 +2237,7 @@ class OpenAiAssistantExecutionTools extends OpenAiExecutionTools {
|
|
|
2237
2237
|
});
|
|
2238
2238
|
const rawRequest = {
|
|
2239
2239
|
// TODO: [👨👨👧👧] ...modelSettings,
|
|
2240
|
-
// TODO: [👨👨👧👧][🧠] What about system message for assistants, does it make
|
|
2240
|
+
// TODO: [👨👨👧👧][🧠] What about system message for assistants, does it make sense - combination of OpenAI assistants with Promptbook Personas
|
|
2241
2241
|
assistant_id: this.assistantId,
|
|
2242
2242
|
thread: {
|
|
2243
2243
|
messages: [
|
|
@@ -2325,7 +2325,7 @@ class OpenAiAssistantExecutionTools extends OpenAiExecutionTools {
|
|
|
2325
2325
|
}
|
|
2326
2326
|
}
|
|
2327
2327
|
/**
|
|
2328
|
-
* TODO: [🧠][🧙♂️] Maybe there can be some
|
|
2328
|
+
* TODO: [🧠][🧙♂️] Maybe there can be some wizard for those who want to use just OpenAI
|
|
2329
2329
|
* TODO: Maybe make custom OpenAiError
|
|
2330
2330
|
* TODO: [🧠][🈁] Maybe use `isDeterministic` from options
|
|
2331
2331
|
* TODO: [🧠][🌰] Allow to pass `title` for tracking purposes
|
|
@@ -2518,7 +2518,7 @@ const $llmToolsRegister = new $Register('llm_execution_tools_constructors');
|
|
|
2518
2518
|
* Warning: This is not useful for the end user, it is just a side effect of the mechanism that handles all available LLM tools
|
|
2519
2519
|
*
|
|
2520
2520
|
* @public exported from `@promptbook/openai`
|
|
2521
|
-
* @public exported from `@promptbook/
|
|
2521
|
+
* @public exported from `@promptbook/wizard`
|
|
2522
2522
|
* @public exported from `@promptbook/cli`
|
|
2523
2523
|
*/
|
|
2524
2524
|
const _OpenAiRegistration = $llmToolsRegister.register(createOpenAiExecutionTools);
|
|
@@ -2528,7 +2528,7 @@ const _OpenAiRegistration = $llmToolsRegister.register(createOpenAiExecutionTool
|
|
|
2528
2528
|
* Note: [🏐] Configurations registrations are done in register-constructor.ts BUT constructor register-constructor.ts
|
|
2529
2529
|
*
|
|
2530
2530
|
* @public exported from `@promptbook/openai`
|
|
2531
|
-
* @public exported from `@promptbook/
|
|
2531
|
+
* @public exported from `@promptbook/wizard`
|
|
2532
2532
|
* @public exported from `@promptbook/cli`
|
|
2533
2533
|
*/
|
|
2534
2534
|
const _OpenAiAssistantRegistration = $llmToolsRegister.register(createOpenAiAssistantExecutionTools);
|
|
@@ -262,7 +262,7 @@ import type { number_percent } from '../types/typeAliases';
|
|
|
262
262
|
import type { number_model_temperature } from '../types/typeAliases';
|
|
263
263
|
import type { number_seed } from '../types/typeAliases';
|
|
264
264
|
import type { number_likeness } from '../types/typeAliases';
|
|
265
|
-
import type {
|
|
265
|
+
import type { number_milliseconds } from '../types/typeAliases';
|
|
266
266
|
import type { number_seconds } from '../types/typeAliases';
|
|
267
267
|
import type { number_minutes } from '../types/typeAliases';
|
|
268
268
|
import type { number_hours } from '../types/typeAliases';
|
|
@@ -561,7 +561,7 @@ export type { number_percent };
|
|
|
561
561
|
export type { number_model_temperature };
|
|
562
562
|
export type { number_seed };
|
|
563
563
|
export type { number_likeness };
|
|
564
|
-
export type {
|
|
564
|
+
export type { number_milliseconds };
|
|
565
565
|
export type { number_seconds };
|
|
566
566
|
export type { number_minutes };
|
|
567
567
|
export type { number_hours };
|
|
@@ -27,7 +27,7 @@ import { _PdfScraperRegistration } from '../scrapers/pdf/register-constructor';
|
|
|
27
27
|
import { _PdfScraperMetadataRegistration } from '../scrapers/pdf/register-metadata';
|
|
28
28
|
import { _WebsiteScraperRegistration } from '../scrapers/website/register-constructor';
|
|
29
29
|
import { _WebsiteScraperMetadataRegistration } from '../scrapers/website/register-metadata';
|
|
30
|
-
import {
|
|
30
|
+
import { wizard } from '../wizard/wizard';
|
|
31
31
|
export { BOOK_LANGUAGE_VERSION, PROMPTBOOK_ENGINE_VERSION };
|
|
32
32
|
export { _AnthropicClaudeMetadataRegistration };
|
|
33
33
|
export { _AnthropicClaudeRegistration };
|
|
@@ -57,4 +57,4 @@ export { _PdfScraperRegistration };
|
|
|
57
57
|
export { _PdfScraperMetadataRegistration };
|
|
58
58
|
export { _WebsiteScraperRegistration };
|
|
59
59
|
export { _WebsiteScraperMetadataRegistration };
|
|
60
|
-
export {
|
|
60
|
+
export { wizard };
|
|
@@ -8,7 +8,7 @@ import type { Command as Program } from 'commander';
|
|
|
8
8
|
*/
|
|
9
9
|
export declare function $initializePrettifyCommand(program: Program): void;
|
|
10
10
|
/**
|
|
11
|
-
* TODO: [😶] Unite
|
|
11
|
+
* TODO: [😶] Unite folder listing
|
|
12
12
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
13
13
|
* Note: [🟡] Code in this file should never be published outside of `@promptbook/cli`
|
|
14
14
|
* TODO: [🖇] What about symlinks? Maybe flag --follow-symlinks
|
|
@@ -8,7 +8,7 @@ import type { Command as Program } from 'commander';
|
|
|
8
8
|
*/
|
|
9
9
|
export declare function $initializeTestCommand(program: Program): void;
|
|
10
10
|
/**
|
|
11
|
-
* TODO: [😶] Unite
|
|
11
|
+
* TODO: [😶] Unite folder listing
|
|
12
12
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
13
13
|
* Note: [🟡] Code in this file should never be published outside of `@promptbook/cli`
|
|
14
14
|
* TODO: [🖇] What about symlinks? Maybe flag --follow-symlinks
|
|
@@ -8,7 +8,7 @@ import type { string_filename } from '../../types/typeAliases';
|
|
|
8
8
|
* @param fs Filesystem tools
|
|
9
9
|
* @returns Pipelines loaded from the archive
|
|
10
10
|
*
|
|
11
|
-
* @private utility of
|
|
11
|
+
* @private utility of Promptbook
|
|
12
12
|
*/
|
|
13
13
|
export declare function loadArchive(filePath: string_filename, fs: FilesystemTools): Promise<ReadonlyArray<PipelineJson>>;
|
|
14
14
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import type { FilesystemTools } from '../../execution/FilesystemTools';
|
|
1
2
|
import type { PipelineJson } from '../../pipeline/PipelineJson/PipelineJson';
|
|
2
3
|
import type { string_filename } from '../../types/typeAliases';
|
|
3
|
-
import type { FilesystemTools } from '../../execution/FilesystemTools';
|
|
4
4
|
/**
|
|
5
5
|
* Saves the given books into an archive file with `.bookc` extension
|
|
6
6
|
*
|
|
@@ -8,7 +8,7 @@ import type { FilesystemTools } from '../../execution/FilesystemTools';
|
|
|
8
8
|
* @param books Pipelines to be saved in the archive
|
|
9
9
|
* @param fs Filesystem tools
|
|
10
10
|
*
|
|
11
|
-
* @private utility of
|
|
11
|
+
* @private utility of Promptbook
|
|
12
12
|
*/
|
|
13
13
|
export declare function saveArchive(filePath: string_filename, collectionJson: ReadonlyArray<PipelineJson>, fs: FilesystemTools): Promise<void>;
|
|
14
14
|
/**
|
|
@@ -2,7 +2,7 @@ import type { PipelineJson } from '../../pipeline/PipelineJson/PipelineJson';
|
|
|
2
2
|
import type { TaskJson } from '../../pipeline/PipelineJson/TaskJson';
|
|
3
3
|
import type { string_href } from '../../types/typeAliases';
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* Additional options for rendering Mermaid graph
|
|
6
6
|
*/
|
|
7
7
|
export type renderPipelineMermaidOptions = {
|
|
8
8
|
/**
|
|
@@ -2,7 +2,7 @@ import type { UserInterfaceTools } from '../../execution/UserInterfaceTools';
|
|
|
2
2
|
import type { UserInterfaceToolsPromptDialogOptions } from '../../execution/UserInterfaceTools';
|
|
3
3
|
import type { CallbackInterfaceToolsOptions } from './CallbackInterfaceToolsOptions';
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* Delegates the user interaction to a async callback function
|
|
6
6
|
* You need to provide your own implementation of this callback function and its bind to UI.
|
|
7
7
|
*
|
|
8
8
|
* @public exported from `@promptbook/core`
|
|
@@ -11,11 +11,11 @@ export type AbstractTaskResult = {
|
|
|
11
11
|
*/
|
|
12
12
|
readonly isSuccessful: boolean;
|
|
13
13
|
/**
|
|
14
|
-
* Errors that
|
|
14
|
+
* Errors that occurred during the execution, details are available in `executionReport`
|
|
15
15
|
*/
|
|
16
16
|
readonly errors: ReadonlyDeep<ReadonlyArray<ErrorJson>>;
|
|
17
17
|
/**
|
|
18
|
-
* Warnings that
|
|
18
|
+
* Warnings that occurred during the execution, details are available in `executionReport`
|
|
19
19
|
*/
|
|
20
20
|
readonly warnings: ReadonlyDeep<ReadonlyArray<ErrorJson>>;
|
|
21
21
|
};
|
package/esm/typings/src/execution/createPipelineExecutor/00-CreatePipelineExecutorOptions.d.ts
CHANGED
|
@@ -35,7 +35,7 @@ export type CreatePipelineExecutorOptions = PrepareAndScrapeOptions & {
|
|
|
35
35
|
*
|
|
36
36
|
* @default false
|
|
37
37
|
*/
|
|
38
|
-
readonly
|
|
38
|
+
readonly isNotPreparedWarningSuppressed?: boolean;
|
|
39
39
|
};
|
|
40
40
|
/**
|
|
41
41
|
* TODO: [🧎][🧠] Move `csvSettings` to some better place
|
|
@@ -8,7 +8,7 @@ import type { PromptResult } from '../PromptResult';
|
|
|
8
8
|
*/
|
|
9
9
|
export type ExecutionPromptReportJson = {
|
|
10
10
|
/**
|
|
11
|
-
* The prompt
|
|
11
|
+
* The prompt which was executed
|
|
12
12
|
*/
|
|
13
13
|
readonly prompt: Omit<Prompt, 'pipelineUrl'>;
|
|
14
14
|
/**
|
|
@@ -16,7 +16,7 @@ export type ExecutionPromptReportJson = {
|
|
|
16
16
|
*/
|
|
17
17
|
readonly result?: PromptResult;
|
|
18
18
|
/**
|
|
19
|
-
* The error which
|
|
19
|
+
* The error which occurred during LLM execution or during postprocessing or expectation checking
|
|
20
20
|
*
|
|
21
21
|
* Note: It makes sense to have both error and result defined, for example when the result not pass expectations
|
|
22
22
|
*/
|
|
@@ -7,6 +7,6 @@ export declare function translateMessages({ automaticTranslator, from, to, }: {
|
|
|
7
7
|
automaticTranslator: AutomaticTranslator;
|
|
8
8
|
} & TranslatorOptions): Promise<void>;
|
|
9
9
|
/**
|
|
10
|
-
* TODO: [😶] Unite
|
|
10
|
+
* TODO: [😶] Unite folder listing
|
|
11
11
|
* Note: [🟢] Code in this file should never be never released in packages that could be imported into browser environment
|
|
12
12
|
*/
|
|
@@ -5,7 +5,7 @@ import type { string_url } from '../../../types/typeAliases';
|
|
|
5
5
|
import type { really_any } from '../../../utils/organization/really_any';
|
|
6
6
|
import type { CacheLlmToolsOptions } from '../utils/cache/CacheLlmToolsOptions';
|
|
7
7
|
import type { LlmExecutionToolsWithTotalUsage } from '../utils/count-total-usage/LlmExecutionToolsWithTotalUsage';
|
|
8
|
-
type
|
|
8
|
+
type ProvideLlmToolsForWizardOrCliOptions = {
|
|
9
9
|
/**
|
|
10
10
|
* If true, user will be always prompted for login
|
|
11
11
|
*
|
|
@@ -48,7 +48,7 @@ type ProvideLlmToolsForWizzardOrCliOptions = {
|
|
|
48
48
|
*
|
|
49
49
|
* @private within the repository - for CLI utils
|
|
50
50
|
*/
|
|
51
|
-
export declare function $
|
|
51
|
+
export declare function $provideLlmToolsForWizardOrCli(options?: ProvideLlmToolsForWizardOrCliOptions): Promise<LlmExecutionToolsWithTotalUsage>;
|
|
52
52
|
export {};
|
|
53
53
|
/**
|
|
54
54
|
* Note: [🟢] Code in this file should never be never released in packages that could be imported into browser environment
|
|
@@ -5,7 +5,7 @@ import type { Registration } from '../../utils/$Register';
|
|
|
5
5
|
* Warning: This is not useful for the end user, it is just a side effect of the mechanism that handles all available LLM tools
|
|
6
6
|
*
|
|
7
7
|
* @public exported from `@promptbook/core`
|
|
8
|
-
* @public exported from `@promptbook/
|
|
8
|
+
* @public exported from `@promptbook/wizard`
|
|
9
9
|
* @public exported from `@promptbook/cli`
|
|
10
10
|
*/
|
|
11
11
|
export declare const _AnthropicClaudeMetadataRegistration: Registration;
|
|
@@ -5,7 +5,7 @@ import type { Registration } from '../../utils/$Register';
|
|
|
5
5
|
* Warning: This is not useful for the end user, it is just a side effect of the mechanism that handles all available LLM tools
|
|
6
6
|
*
|
|
7
7
|
* @public exported from `@promptbook/anthropic-claude`
|
|
8
|
-
* @public exported from `@promptbook/
|
|
8
|
+
* @public exported from `@promptbook/wizard`
|
|
9
9
|
* @public exported from `@promptbook/cli`
|
|
10
10
|
*
|
|
11
11
|
*/
|
|
@@ -5,7 +5,7 @@ import type { Registration } from '../../utils/$Register';
|
|
|
5
5
|
* Warning: This is not useful for the end user, it is just a side effect of the mechanism that handles all available LLM tools
|
|
6
6
|
*
|
|
7
7
|
* @public exported from `@promptbook/core`
|
|
8
|
-
* @public exported from `@promptbook/
|
|
8
|
+
* @public exported from `@promptbook/wizard`
|
|
9
9
|
* @public exported from `@promptbook/cli`
|
|
10
10
|
*/
|
|
11
11
|
export declare const _AzureOpenAiMetadataRegistration: Registration;
|
|
@@ -5,7 +5,7 @@ import type { Registration } from '../../utils/$Register';
|
|
|
5
5
|
* Warning: This is not useful for the end user, it is just a side effect of the mechanism that handles all available LLM tools
|
|
6
6
|
*
|
|
7
7
|
* @public exported from `@promptbook/azure-openai`
|
|
8
|
-
* @public exported from `@promptbook/
|
|
8
|
+
* @public exported from `@promptbook/wizard`
|
|
9
9
|
* @public exported from `@promptbook/cli`
|
|
10
10
|
*/
|
|
11
11
|
export declare const _AzureOpenAiRegistration: Registration;
|
|
@@ -5,7 +5,7 @@ import type { Registration } from '../../utils/$Register';
|
|
|
5
5
|
* Warning: This is not useful for the end user, it is just a side effect of the mechanism that handles all available LLM tools
|
|
6
6
|
*
|
|
7
7
|
* @public exported from `@promptbook/core`
|
|
8
|
-
* @public exported from `@promptbook/
|
|
8
|
+
* @public exported from `@promptbook/wizard`
|
|
9
9
|
* @public exported from `@promptbook/cli`
|
|
10
10
|
*/
|
|
11
11
|
export declare const _DeepseekMetadataRegistration: Registration;
|
|
@@ -5,7 +5,7 @@ import type { Registration } from '../../utils/$Register';
|
|
|
5
5
|
* Warning: This is not useful for the end user, it is just a side effect of the mechanism that handles all available LLM tools
|
|
6
6
|
*
|
|
7
7
|
* @public exported from `@promptbook/deepseek`
|
|
8
|
-
* @public exported from `@promptbook/
|
|
8
|
+
* @public exported from `@promptbook/wizard`
|
|
9
9
|
* @public exported from `@promptbook/cli`
|
|
10
10
|
*/
|
|
11
11
|
export declare const _DeepseekRegistration: Registration;
|
|
@@ -5,7 +5,7 @@ import type { Registration } from '../../utils/$Register';
|
|
|
5
5
|
* Warning: This is not useful for the end user, it is just a side effect of the mechanism that handles all available LLM tools
|
|
6
6
|
*
|
|
7
7
|
* @public exported from `@promptbook/core`
|
|
8
|
-
* @public exported from `@promptbook/
|
|
8
|
+
* @public exported from `@promptbook/wizard`
|
|
9
9
|
* @public exported from `@promptbook/cli`
|
|
10
10
|
*/
|
|
11
11
|
export declare const _GoogleMetadataRegistration: Registration;
|
|
@@ -5,7 +5,7 @@ import type { Registration } from '../../utils/$Register';
|
|
|
5
5
|
* Warning: This is not useful for the end user, it is just a side effect of the mechanism that handles all available LLM tools
|
|
6
6
|
*
|
|
7
7
|
* @public exported from `@promptbook/google`
|
|
8
|
-
* @public exported from `@promptbook/
|
|
8
|
+
* @public exported from `@promptbook/wizard`
|
|
9
9
|
* @public exported from `@promptbook/cli`
|
|
10
10
|
*/
|
|
11
11
|
export declare const _GoogleRegistration: Registration;
|
|
@@ -5,7 +5,7 @@ import type { Registration } from '../../utils/$Register';
|
|
|
5
5
|
* Warning: This is not useful for the end user, it is just a side effect of the mechanism that handles all available LLM tools
|
|
6
6
|
*
|
|
7
7
|
* @public exported from `@promptbook/core`
|
|
8
|
-
* @public exported from `@promptbook/
|
|
8
|
+
* @public exported from `@promptbook/wizard`
|
|
9
9
|
* @public exported from `@promptbook/cli`
|
|
10
10
|
*/
|
|
11
11
|
export declare const _OllamaMetadataRegistration: Registration;
|
|
@@ -5,7 +5,7 @@ import type { Registration } from '../../utils/$Register';
|
|
|
5
5
|
* Warning: This is not useful for the end user, it is just a side effect of the mechanism that handles all available LLM tools
|
|
6
6
|
*
|
|
7
7
|
* @public exported from `@promptbook/ollama`
|
|
8
|
-
* @public exported from `@promptbook/
|
|
8
|
+
* @public exported from `@promptbook/wizard`
|
|
9
9
|
* @public exported from `@promptbook/cli`
|
|
10
10
|
*/
|
|
11
11
|
export declare const _OllamaRegistration: Registration;
|
|
@@ -29,7 +29,7 @@ export declare class OpenAiAssistantExecutionTools extends OpenAiExecutionTools
|
|
|
29
29
|
callChatModel(prompt: Pick<Prompt, 'content' | 'parameters' | 'modelRequirements' | 'format'>): Promise<ChatPromptResult>;
|
|
30
30
|
}
|
|
31
31
|
/**
|
|
32
|
-
* TODO: [🧠][🧙♂️] Maybe there can be some
|
|
32
|
+
* TODO: [🧠][🧙♂️] Maybe there can be some wizard for those who want to use just OpenAI
|
|
33
33
|
* TODO: Maybe make custom OpenAiError
|
|
34
34
|
* TODO: [🧠][🈁] Maybe use `isDeterministic` from options
|
|
35
35
|
* TODO: [🧠][🌰] Allow to pass `title` for tracking purposes
|
|
@@ -5,7 +5,7 @@ import type { Registration } from '../../utils/$Register';
|
|
|
5
5
|
* Warning: This is not useful for the end user, it is just a side effect of the mechanism that handles all available LLM tools
|
|
6
6
|
*
|
|
7
7
|
* @public exported from `@promptbook/core`
|
|
8
|
-
* @public exported from `@promptbook/
|
|
8
|
+
* @public exported from `@promptbook/wizard`
|
|
9
9
|
* @public exported from `@promptbook/cli`
|
|
10
10
|
*/
|
|
11
11
|
export declare const _OpenAiMetadataRegistration: Registration;
|
|
@@ -15,7 +15,7 @@ export declare const _OpenAiMetadataRegistration: Registration;
|
|
|
15
15
|
* Note: [🏐] Configurations registrations are done in the metadata registration section, but the constructor registration is handled separately.
|
|
16
16
|
*
|
|
17
17
|
* @public exported from `@promptbook/core`
|
|
18
|
-
* @public exported from `@promptbook/
|
|
18
|
+
* @public exported from `@promptbook/wizard`
|
|
19
19
|
* @public exported from `@promptbook/cli`
|
|
20
20
|
*/
|
|
21
21
|
export declare const _OpenAiAssistantMetadataRegistration: Registration;
|
|
@@ -5,7 +5,7 @@ import type { Registration } from '../../utils/$Register';
|
|
|
5
5
|
* Warning: This is not useful for the end user, it is just a side effect of the mechanism that handles all available LLM tools
|
|
6
6
|
*
|
|
7
7
|
* @public exported from `@promptbook/openai`
|
|
8
|
-
* @public exported from `@promptbook/
|
|
8
|
+
* @public exported from `@promptbook/wizard`
|
|
9
9
|
* @public exported from `@promptbook/cli`
|
|
10
10
|
*/
|
|
11
11
|
export declare const _OpenAiRegistration: Registration;
|
|
@@ -15,7 +15,7 @@ export declare const _OpenAiRegistration: Registration;
|
|
|
15
15
|
* Note: [🏐] Configurations registrations are done in register-constructor.ts BUT constructor register-constructor.ts
|
|
16
16
|
*
|
|
17
17
|
* @public exported from `@promptbook/openai`
|
|
18
|
-
* @public exported from `@promptbook/
|
|
18
|
+
* @public exported from `@promptbook/wizard`
|
|
19
19
|
* @public exported from `@promptbook/cli`
|
|
20
20
|
*/
|
|
21
21
|
export declare const _OpenAiAssistantRegistration: Registration;
|
|
@@ -13,5 +13,5 @@ export type PromptbookServer_ListModels_Request<TCustomOptions> = {
|
|
|
13
13
|
readonly identification: Identification<TCustomOptions>;
|
|
14
14
|
};
|
|
15
15
|
/**
|
|
16
|
-
* TODO: [🧠] Listing models inanonymous mode does not make
|
|
16
|
+
* TODO: [🧠] Listing models inanonymous mode does not make sense - keeping only to preserve consistency
|
|
17
17
|
*/
|
|
@@ -12,7 +12,7 @@ export declare const createBoilerplateScraper: ((tools: Pick<ExecutionTools, 'll
|
|
|
12
12
|
className: string;
|
|
13
13
|
mimeTypes: string[];
|
|
14
14
|
documentationUrl: "https://github.com/webgptorg/promptbook/discussions/@@";
|
|
15
|
-
|
|
15
|
+
isAvailableInBrowser: false;
|
|
16
16
|
requiredExecutables: never[];
|
|
17
17
|
}>;
|
|
18
18
|
/**
|
|
@@ -5,7 +5,7 @@ import type { Registration } from '../../utils/$Register';
|
|
|
5
5
|
* Warning: This is not useful for the end user, it is just a side effect of the mechanism that handles all available known scrapers
|
|
6
6
|
*
|
|
7
7
|
* @public exported from `@promptbook/boilerplate`
|
|
8
|
-
* @public exported from `@promptbook/
|
|
8
|
+
* @public exported from `@promptbook/wizard`
|
|
9
9
|
* @public exported from `@promptbook/cli`
|
|
10
10
|
*/
|
|
11
11
|
export declare const _BoilerplateScraperRegistration: Registration;
|
|
@@ -10,7 +10,7 @@ export declare const boilerplateScraperMetadata: import("type-fest/source/readon
|
|
|
10
10
|
className: string;
|
|
11
11
|
mimeTypes: string[];
|
|
12
12
|
documentationUrl: "https://github.com/webgptorg/promptbook/discussions/@@";
|
|
13
|
-
|
|
13
|
+
isAvailableInBrowser: false;
|
|
14
14
|
requiredExecutables: never[];
|
|
15
15
|
}>;
|
|
16
16
|
/**
|
|
@@ -19,7 +19,7 @@ export declare const boilerplateScraperMetadata: import("type-fest/source/readon
|
|
|
19
19
|
* Warning: This is not useful for the end user, it is just a side effect of the mechanism that handles all available known scrapers
|
|
20
20
|
*
|
|
21
21
|
* @public exported from `@promptbook/core`
|
|
22
|
-
* @public exported from `@promptbook/
|
|
22
|
+
* @public exported from `@promptbook/wizard`
|
|
23
23
|
* @public exported from `@promptbook/cli`
|
|
24
24
|
*/
|
|
25
25
|
export declare const _BoilerplateScraperMetadataRegistration: Registration;
|
|
@@ -12,7 +12,7 @@ export declare function prepareKnowledgePieces(knowledgeSources: ReadonlyArray<K
|
|
|
12
12
|
/**
|
|
13
13
|
* TODO: [🧊] In future one preparation can take data from previous preparation and save tokens and time
|
|
14
14
|
* Put `knowledgePieces` into `PrepareKnowledgeOptions`
|
|
15
|
-
* TODO: [🪂] More than max things can run in parallel by
|
|
15
|
+
* TODO: [🪂] More than max things can run in parallel by accident [1,[2a,2b,_],[3a,3b,_]]
|
|
16
16
|
* TODO: [🧠][❎] Do here proper M:N mapping
|
|
17
17
|
* [x] One source can make multiple pieces
|
|
18
18
|
* [ ] One piece can have multiple sources
|
|
@@ -33,7 +33,7 @@ export type ScraperAndConverterMetadata = Registered & {
|
|
|
33
33
|
*
|
|
34
34
|
* Note: [🌏] Only `MarkdownScraper` makes sense to be available in the browser, for scraping non-markdown sources in the browser use a remote server
|
|
35
35
|
*/
|
|
36
|
-
readonly
|
|
36
|
+
readonly isAvailableInBrowser: boolean;
|
|
37
37
|
/**
|
|
38
38
|
* List of executables required by this scraper or converter to function properly.
|
|
39
39
|
* For example, PDF scrapers may require 'pandoc' to be installed on the system.
|
|
@@ -12,7 +12,7 @@ export declare const createDocumentScraper: ((tools: Pick<ExecutionTools, 'llm'>
|
|
|
12
12
|
className: string;
|
|
13
13
|
mimeTypes: string[];
|
|
14
14
|
documentationUrl: "https://github.com/webgptorg/promptbook/discussions/@@";
|
|
15
|
-
|
|
15
|
+
isAvailableInBrowser: false;
|
|
16
16
|
requiredExecutables: "Pandoc"[];
|
|
17
17
|
}>;
|
|
18
18
|
/**
|
|
@@ -5,7 +5,7 @@ import type { Registration } from '../../utils/$Register';
|
|
|
5
5
|
* Warning: This is not useful for the end user, it is just a side effect of the mechanism that handles all available known scrapers
|
|
6
6
|
*
|
|
7
7
|
* @public exported from `@promptbook/documents`
|
|
8
|
-
* @public exported from `@promptbook/
|
|
8
|
+
* @public exported from `@promptbook/wizard`
|
|
9
9
|
* @public exported from `@promptbook/cli`
|
|
10
10
|
*/
|
|
11
11
|
export declare const _DocumentScraperRegistration: Registration;
|
|
@@ -10,7 +10,7 @@ export declare const documentScraperMetadata: import("type-fest/source/readonly-
|
|
|
10
10
|
className: string;
|
|
11
11
|
mimeTypes: string[];
|
|
12
12
|
documentationUrl: "https://github.com/webgptorg/promptbook/discussions/@@";
|
|
13
|
-
|
|
13
|
+
isAvailableInBrowser: false;
|
|
14
14
|
requiredExecutables: "Pandoc"[];
|
|
15
15
|
}>;
|
|
16
16
|
/**
|
|
@@ -19,7 +19,7 @@ export declare const documentScraperMetadata: import("type-fest/source/readonly-
|
|
|
19
19
|
* Warning: This is not useful for the end user, it is just a side effect of the mechanism that handles all available known scrapers
|
|
20
20
|
*
|
|
21
21
|
* @public exported from `@promptbook/core`
|
|
22
|
-
* @public exported from `@promptbook/
|
|
22
|
+
* @public exported from `@promptbook/wizard`
|
|
23
23
|
* @public exported from `@promptbook/cli`
|
|
24
24
|
*/
|
|
25
25
|
export declare const _DocumentScraperMetadataRegistration: Registration;
|
|
@@ -13,7 +13,7 @@ export declare const createLegacyDocumentScraper: ((tools: Pick<ExecutionTools,
|
|
|
13
13
|
className: string;
|
|
14
14
|
mimeTypes: string[];
|
|
15
15
|
documentationUrl: "https://github.com/webgptorg/promptbook/discussions/@@";
|
|
16
|
-
|
|
16
|
+
isAvailableInBrowser: false;
|
|
17
17
|
requiredExecutables: ("Pandoc" | "LibreOffice")[];
|
|
18
18
|
}>;
|
|
19
19
|
/**
|
|
@@ -5,7 +5,7 @@ import type { Registration } from '../../utils/$Register';
|
|
|
5
5
|
* Warning: This is not useful for the end user, it is just a side effect of the mechanism that handles all available known scrapers
|
|
6
6
|
*
|
|
7
7
|
* @public exported from `@promptbook/legacy-documents`
|
|
8
|
-
* @public exported from `@promptbook/
|
|
8
|
+
* @public exported from `@promptbook/wizard`
|
|
9
9
|
* @public exported from `@promptbook/cli`
|
|
10
10
|
*/
|
|
11
11
|
export declare const _LegacyDocumentScraperRegistration: Registration;
|
|
@@ -10,7 +10,7 @@ export declare const legacyDocumentScraperMetadata: import("type-fest/source/rea
|
|
|
10
10
|
className: string;
|
|
11
11
|
mimeTypes: string[];
|
|
12
12
|
documentationUrl: "https://github.com/webgptorg/promptbook/discussions/@@";
|
|
13
|
-
|
|
13
|
+
isAvailableInBrowser: false;
|
|
14
14
|
requiredExecutables: ("Pandoc" | "LibreOffice")[];
|
|
15
15
|
}>;
|
|
16
16
|
/**
|
|
@@ -19,7 +19,7 @@ export declare const legacyDocumentScraperMetadata: import("type-fest/source/rea
|
|
|
19
19
|
* Warning: This is not useful for the end user, it is just a side effect of the mechanism that handles all available known scrapers
|
|
20
20
|
*
|
|
21
21
|
* @public exported from `@promptbook/core`
|
|
22
|
-
* @public exported from `@promptbook/
|
|
22
|
+
* @public exported from `@promptbook/wizard`
|
|
23
23
|
* @public exported from `@promptbook/cli`
|
|
24
24
|
*/
|
|
25
25
|
export declare const _LegacyDocumentScraperMetadataRegistration: Registration;
|
|
@@ -12,10 +12,7 @@ export declare const createMarkdownScraper: ((tools: Pick<ExecutionTools, 'llm'>
|
|
|
12
12
|
className: string;
|
|
13
13
|
mimeTypes: string[];
|
|
14
14
|
documentationUrl: "https://github.com/webgptorg/promptbook/discussions/@@";
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* TODO: [🎶] Naming "constructor" vs "creator" vs "factory"
|
|
18
|
-
*/
|
|
15
|
+
isAvailableInBrowser: true;
|
|
19
16
|
requiredExecutables: never[];
|
|
20
17
|
}>;
|
|
21
18
|
/**
|
|
@@ -5,7 +5,7 @@ import type { Registration } from '../../utils/$Register';
|
|
|
5
5
|
* Warning: This is not useful for the end user, it is just a side effect of the mechanism that handles all available known scrapers
|
|
6
6
|
*
|
|
7
7
|
* @public exported from `@promptbook/markdown-utils`
|
|
8
|
-
* @public exported from `@promptbook/
|
|
8
|
+
* @public exported from `@promptbook/wizard`
|
|
9
9
|
* @public exported from `@promptbook/cli`
|
|
10
10
|
*/
|
|
11
11
|
export declare const _MarkdownScraperRegistration: Registration;
|
|
@@ -10,7 +10,7 @@ export declare const markdownScraperMetadata: import("type-fest/source/readonly-
|
|
|
10
10
|
className: string;
|
|
11
11
|
mimeTypes: string[];
|
|
12
12
|
documentationUrl: "https://github.com/webgptorg/promptbook/discussions/@@";
|
|
13
|
-
|
|
13
|
+
isAvailableInBrowser: true;
|
|
14
14
|
requiredExecutables: never[];
|
|
15
15
|
}>;
|
|
16
16
|
/**
|
|
@@ -19,7 +19,7 @@ export declare const markdownScraperMetadata: import("type-fest/source/readonly-
|
|
|
19
19
|
* Warning: This is not useful for the end user, it is just a side effect of the mechanism that handles all available known scrapers
|
|
20
20
|
*
|
|
21
21
|
* @public exported from `@promptbook/core`
|
|
22
|
-
* @public exported from `@promptbook/
|
|
22
|
+
* @public exported from `@promptbook/wizard`
|
|
23
23
|
* @public exported from `@promptbook/cli`
|
|
24
24
|
*/
|
|
25
25
|
export declare const _MarkdownScraperMetadataRegistration: Registration;
|
|
@@ -13,7 +13,7 @@ export declare const createMarkitdownScraper: ((tools: Pick<ExecutionTools, 'llm
|
|
|
13
13
|
className: string;
|
|
14
14
|
mimeTypes: string[];
|
|
15
15
|
documentationUrl: "https://github.com/webgptorg/promptbook/discussions/@@";
|
|
16
|
-
|
|
16
|
+
isAvailableInBrowser: false;
|
|
17
17
|
requiredExecutables: never[];
|
|
18
18
|
}>;
|
|
19
19
|
/**
|
|
@@ -6,7 +6,7 @@ import type { Registration } from '../../utils/$Register';
|
|
|
6
6
|
*
|
|
7
7
|
* @public exported from `@promptbook/markitdown`
|
|
8
8
|
* @public exported from `@promptbook/pdf`
|
|
9
|
-
* @public exported from `@promptbook/
|
|
9
|
+
* @public exported from `@promptbook/wizard`
|
|
10
10
|
* @public exported from `@promptbook/cli`
|
|
11
11
|
*/
|
|
12
12
|
export declare const _MarkitdownScraperRegistration: Registration;
|
|
@@ -10,7 +10,7 @@ export declare const markitdownScraperMetadata: import("type-fest/source/readonl
|
|
|
10
10
|
className: string;
|
|
11
11
|
mimeTypes: string[];
|
|
12
12
|
documentationUrl: "https://github.com/webgptorg/promptbook/discussions/@@";
|
|
13
|
-
|
|
13
|
+
isAvailableInBrowser: false;
|
|
14
14
|
requiredExecutables: never[];
|
|
15
15
|
}>;
|
|
16
16
|
/**
|
|
@@ -19,7 +19,7 @@ export declare const markitdownScraperMetadata: import("type-fest/source/readonl
|
|
|
19
19
|
* Warning: This is not useful for the end user, it is just a side effect of the mechanism that handles all available known scrapers
|
|
20
20
|
*
|
|
21
21
|
* @public exported from `@promptbook/core`
|
|
22
|
-
* @public exported from `@promptbook/
|
|
22
|
+
* @public exported from `@promptbook/wizard`
|
|
23
23
|
* @public exported from `@promptbook/cli`
|
|
24
24
|
*/
|
|
25
25
|
export declare const _MarkitdownScraperMetadataRegistration: Registration;
|
|
@@ -13,7 +13,7 @@ export declare const createPdfScraper: ((tools: Pick<ExecutionTools, 'llm'>, opt
|
|
|
13
13
|
className: string;
|
|
14
14
|
mimeTypes: string[];
|
|
15
15
|
documentationUrl: "https://github.com/webgptorg/promptbook/discussions/@@";
|
|
16
|
-
|
|
16
|
+
isAvailableInBrowser: false;
|
|
17
17
|
requiredExecutables: never[];
|
|
18
18
|
}>;
|
|
19
19
|
/**
|
|
@@ -5,7 +5,7 @@ import type { Registration } from '../../utils/$Register';
|
|
|
5
5
|
* Warning: This is not useful for the end user, it is just a side effect of the mechanism that handles all available known scrapers
|
|
6
6
|
*
|
|
7
7
|
* @public exported from `@promptbook/pdf`
|
|
8
|
-
* @public exported from `@promptbook/
|
|
8
|
+
* @public exported from `@promptbook/wizard`
|
|
9
9
|
* @public exported from `@promptbook/cli`
|
|
10
10
|
*/
|
|
11
11
|
export declare const _PdfScraperRegistration: Registration;
|
|
@@ -10,7 +10,7 @@ export declare const pdfScraperMetadata: import("type-fest/source/readonly-deep"
|
|
|
10
10
|
className: string;
|
|
11
11
|
mimeTypes: string[];
|
|
12
12
|
documentationUrl: "https://github.com/webgptorg/promptbook/discussions/@@";
|
|
13
|
-
|
|
13
|
+
isAvailableInBrowser: false;
|
|
14
14
|
requiredExecutables: never[];
|
|
15
15
|
}>;
|
|
16
16
|
/**
|
|
@@ -19,7 +19,7 @@ export declare const pdfScraperMetadata: import("type-fest/source/readonly-deep"
|
|
|
19
19
|
* Warning: This is not useful for the end user, it is just a side effect of the mechanism that handles all available known scrapers
|
|
20
20
|
*
|
|
21
21
|
* @public exported from `@promptbook/core`
|
|
22
|
-
* @public exported from `@promptbook/
|
|
22
|
+
* @public exported from `@promptbook/wizard`
|
|
23
23
|
* @public exported from `@promptbook/cli`
|
|
24
24
|
*/
|
|
25
25
|
export declare const _PdfScraperMetadataRegistration: Registration;
|
|
@@ -13,7 +13,7 @@ export declare const createWebsiteScraper: ((tools: Pick<ExecutionTools, 'llm'>,
|
|
|
13
13
|
className: string;
|
|
14
14
|
mimeTypes: string[];
|
|
15
15
|
documentationUrl: "https://github.com/webgptorg/promptbook/discussions/@@";
|
|
16
|
-
|
|
16
|
+
isAvailableInBrowser: false;
|
|
17
17
|
requiredExecutables: never[];
|
|
18
18
|
}>;
|
|
19
19
|
/**
|
|
@@ -5,7 +5,7 @@ import type { Registration } from '../../utils/$Register';
|
|
|
5
5
|
* Warning: This is not useful for the end user, it is just a side effect of the mechanism that handles all available known scrapers
|
|
6
6
|
*
|
|
7
7
|
* @public exported from `@promptbook/website-crawler`
|
|
8
|
-
* @public exported from `@promptbook/
|
|
8
|
+
* @public exported from `@promptbook/wizard`
|
|
9
9
|
* @public exported from `@promptbook/cli`
|
|
10
10
|
*/
|
|
11
11
|
export declare const _WebsiteScraperRegistration: Registration;
|
|
@@ -10,7 +10,7 @@ export declare const websiteScraperMetadata: import("type-fest/source/readonly-d
|
|
|
10
10
|
className: string;
|
|
11
11
|
mimeTypes: string[];
|
|
12
12
|
documentationUrl: "https://github.com/webgptorg/promptbook/discussions/@@";
|
|
13
|
-
|
|
13
|
+
isAvailableInBrowser: false;
|
|
14
14
|
requiredExecutables: never[];
|
|
15
15
|
}>;
|
|
16
16
|
/**
|
|
@@ -19,7 +19,7 @@ export declare const websiteScraperMetadata: import("type-fest/source/readonly-d
|
|
|
19
19
|
* Warning: This is not useful for the end user, it is just a side effect of the mechanism that handles all available known scrapers
|
|
20
20
|
*
|
|
21
21
|
* @public exported from `@promptbook/core`
|
|
22
|
-
* @public exported from `@promptbook/
|
|
22
|
+
* @public exported from `@promptbook/wizard`
|
|
23
23
|
* @public exported from `@promptbook/cli`
|
|
24
24
|
*/
|
|
25
25
|
export declare const _WebsiteScraperMetadataRegistration: Registration;
|
|
@@ -658,7 +658,7 @@ export type number_seed = number_percent;
|
|
|
658
658
|
* - ❤ is equivalent to more than 1
|
|
659
659
|
*/
|
|
660
660
|
export type number_likeness = number;
|
|
661
|
-
export type
|
|
661
|
+
export type number_milliseconds = number_integer;
|
|
662
662
|
export type number_seconds = number;
|
|
663
663
|
export type number_minutes = number;
|
|
664
664
|
export type number_hours = number;
|
|
@@ -11,7 +11,7 @@ import type { string_filename } from '../../types/typeAliases';
|
|
|
11
11
|
*/
|
|
12
12
|
export declare function listAllFiles(path: string_dirname, isRecursive: boolean, fs: FilesystemTools): Promise<Array<string_filename>>;
|
|
13
13
|
/**
|
|
14
|
-
* TODO: [😶] Unite
|
|
14
|
+
* TODO: [😶] Unite folder listing
|
|
15
15
|
* Note: Not [~🟢~] because it is not directly dependent on `fs
|
|
16
16
|
* TODO: [🖇] What about symlinks?
|
|
17
17
|
*/
|
|
@@ -15,7 +15,7 @@ export declare const BOOK_LANGUAGE_VERSION: string_semantic_version;
|
|
|
15
15
|
export declare const PROMPTBOOK_ENGINE_VERSION: string_promptbook_version;
|
|
16
16
|
/**
|
|
17
17
|
* Represents the version string of the Promptbook engine.
|
|
18
|
-
* It follows semantic versioning (e.g., `0.94.0
|
|
18
|
+
* It follows semantic versioning (e.g., `0.94.0`).
|
|
19
19
|
*
|
|
20
20
|
* @generated
|
|
21
21
|
*/
|
|
@@ -5,9 +5,9 @@ import type { PrepareAndScrapeOptions } from '../prepare/PrepareAndScrapeOptions
|
|
|
5
5
|
import type { string_filename } from '../types/typeAliases';
|
|
6
6
|
import type { string_pipeline_url } from '../types/typeAliases';
|
|
7
7
|
/**
|
|
8
|
-
* @see ./
|
|
8
|
+
* @see ./wizard.ts `getPipeline` method
|
|
9
9
|
*
|
|
10
|
-
* @private usable through `ptbk run` and `@
|
|
10
|
+
* @private usable through `ptbk run` and `@promptbook/wizard`
|
|
11
11
|
*/
|
|
12
12
|
export declare function $getCompiledBook(tools: Required<Pick<ExecutionTools, 'fs' | 'fetch'>>, pipelineSource: string_filename | string_pipeline_url | PipelineString, options?: PrepareAndScrapeOptions): Promise<PipelineJson>;
|
|
13
13
|
/**
|
|
@@ -7,14 +7,14 @@ import type { string_filename } from '../types/typeAliases';
|
|
|
7
7
|
import type { string_parameter_value } from '../types/typeAliases';
|
|
8
8
|
import type { string_pipeline_url } from '../types/typeAliases';
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
11
|
-
* Look at `
|
|
10
|
+
* Wizard for simple usage of the Promptbook
|
|
11
|
+
* Look at `wizard` for more details
|
|
12
12
|
*
|
|
13
13
|
* Note: This works only in Node.js environment and looks for the configuration, environment, tools and cache in the Node.js environment
|
|
14
14
|
*
|
|
15
15
|
* @private just for single instance
|
|
16
16
|
*/
|
|
17
|
-
declare class
|
|
17
|
+
declare class Wizard {
|
|
18
18
|
/**
|
|
19
19
|
* Run the book
|
|
20
20
|
*
|
|
@@ -53,14 +53,14 @@ declare class Wizzard {
|
|
|
53
53
|
getCompiledBook(pipelineSource: string_filename | string_pipeline_url | PipelineString): Promise<PipelineJson>;
|
|
54
54
|
}
|
|
55
55
|
/**
|
|
56
|
-
*
|
|
56
|
+
* Wizard for simple usage of the Promptbook
|
|
57
57
|
*
|
|
58
58
|
* Note: This works only in Node.js environment and looks for the configuration, environment, tools and cache in the Node.js environment
|
|
59
59
|
*
|
|
60
60
|
* @singleton
|
|
61
|
-
* @public exported from `@promptbook/
|
|
61
|
+
* @public exported from `@promptbook/wizard`
|
|
62
62
|
*/
|
|
63
|
-
export declare const
|
|
63
|
+
export declare const wizard: Wizard;
|
|
64
64
|
export {};
|
|
65
65
|
/**
|
|
66
66
|
* TODO: [🧠] Maybe some way how to handle the progress and streaming?
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@promptbook/openai",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.95.0",
|
|
4
4
|
"description": "Promptbook: Run AI apps in plain human language across multiple models and platforms",
|
|
5
5
|
"private": false,
|
|
6
6
|
"sideEffects": false,
|
|
@@ -70,23 +70,11 @@
|
|
|
70
70
|
"node": ">=16.0.0",
|
|
71
71
|
"npm": ">=8.0.0"
|
|
72
72
|
},
|
|
73
|
-
"cspell": {
|
|
74
|
-
"version": "0.2",
|
|
75
|
-
"language": "en",
|
|
76
|
-
"ignorePaths": [
|
|
77
|
-
"node_modules",
|
|
78
|
-
".next",
|
|
79
|
-
"coverage",
|
|
80
|
-
"dist",
|
|
81
|
-
".git"
|
|
82
|
-
],
|
|
83
|
-
"words": []
|
|
84
|
-
},
|
|
85
73
|
"main": "./umd/index.umd.js",
|
|
86
74
|
"module": "./esm/index.es.js",
|
|
87
75
|
"typings": "./esm/typings/src/_packages/openai.index.d.ts",
|
|
88
76
|
"peerDependencies": {
|
|
89
|
-
"@promptbook/core": "0.
|
|
77
|
+
"@promptbook/core": "0.95.0"
|
|
90
78
|
},
|
|
91
79
|
"dependencies": {
|
|
92
80
|
"bottleneck": "^2.19.5",
|
package/umd/index.umd.js
CHANGED
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
* @generated
|
|
26
26
|
* @see https://github.com/webgptorg/promptbook
|
|
27
27
|
*/
|
|
28
|
-
const PROMPTBOOK_ENGINE_VERSION = '0.
|
|
28
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.95.0';
|
|
29
29
|
/**
|
|
30
30
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
31
31
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
@@ -521,7 +521,7 @@
|
|
|
521
521
|
else {
|
|
522
522
|
for (const [subName, subValue] of Object.entries(value)) {
|
|
523
523
|
if (subValue === undefined) {
|
|
524
|
-
// Note: undefined in object is serializable - it is just
|
|
524
|
+
// Note: undefined in object is serializable - it is just omitted
|
|
525
525
|
continue;
|
|
526
526
|
}
|
|
527
527
|
checkSerializableAsJson({ name: `${name}.${subName}`, value: subValue, message });
|
|
@@ -2244,7 +2244,7 @@
|
|
|
2244
2244
|
});
|
|
2245
2245
|
const rawRequest = {
|
|
2246
2246
|
// TODO: [👨👨👧👧] ...modelSettings,
|
|
2247
|
-
// TODO: [👨👨👧👧][🧠] What about system message for assistants, does it make
|
|
2247
|
+
// TODO: [👨👨👧👧][🧠] What about system message for assistants, does it make sense - combination of OpenAI assistants with Promptbook Personas
|
|
2248
2248
|
assistant_id: this.assistantId,
|
|
2249
2249
|
thread: {
|
|
2250
2250
|
messages: [
|
|
@@ -2332,7 +2332,7 @@
|
|
|
2332
2332
|
}
|
|
2333
2333
|
}
|
|
2334
2334
|
/**
|
|
2335
|
-
* TODO: [🧠][🧙♂️] Maybe there can be some
|
|
2335
|
+
* TODO: [🧠][🧙♂️] Maybe there can be some wizard for those who want to use just OpenAI
|
|
2336
2336
|
* TODO: Maybe make custom OpenAiError
|
|
2337
2337
|
* TODO: [🧠][🈁] Maybe use `isDeterministic` from options
|
|
2338
2338
|
* TODO: [🧠][🌰] Allow to pass `title` for tracking purposes
|
|
@@ -2525,7 +2525,7 @@
|
|
|
2525
2525
|
* Warning: This is not useful for the end user, it is just a side effect of the mechanism that handles all available LLM tools
|
|
2526
2526
|
*
|
|
2527
2527
|
* @public exported from `@promptbook/openai`
|
|
2528
|
-
* @public exported from `@promptbook/
|
|
2528
|
+
* @public exported from `@promptbook/wizard`
|
|
2529
2529
|
* @public exported from `@promptbook/cli`
|
|
2530
2530
|
*/
|
|
2531
2531
|
const _OpenAiRegistration = $llmToolsRegister.register(createOpenAiExecutionTools);
|
|
@@ -2535,7 +2535,7 @@
|
|
|
2535
2535
|
* Note: [🏐] Configurations registrations are done in register-constructor.ts BUT constructor register-constructor.ts
|
|
2536
2536
|
*
|
|
2537
2537
|
* @public exported from `@promptbook/openai`
|
|
2538
|
-
* @public exported from `@promptbook/
|
|
2538
|
+
* @public exported from `@promptbook/wizard`
|
|
2539
2539
|
* @public exported from `@promptbook/cli`
|
|
2540
2540
|
*/
|
|
2541
2541
|
const _OpenAiAssistantRegistration = $llmToolsRegister.register(createOpenAiAssistantExecutionTools);
|