@promptbook/editable 0.94.0 → 0.98.0-10
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 +6 -2
- package/esm/index.es.js +3 -3
- package/esm/index.es.js.map +1 -1
- package/esm/typings/src/_packages/anthropic-claude.index.d.ts +2 -2
- package/esm/typings/src/_packages/cli.index.d.ts +4 -0
- package/esm/typings/src/_packages/core.index.d.ts +2 -0
- package/esm/typings/src/_packages/openai.index.d.ts +10 -0
- package/esm/typings/src/_packages/types.index.d.ts +14 -4
- package/esm/typings/src/_packages/{wizzard.index.d.ts → wizard.index.d.ts} +6 -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/config.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/$OngoingTaskResult.d.ts +8 -0
- 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/execution/utils/validatePromptResult.d.ts +53 -0
- package/esm/typings/src/llm-providers/_common/register/{$provideLlmToolsForWizzardOrCli.d.ts → $provideLlmToolsForWizardOrCli.d.ts} +2 -2
- package/esm/typings/src/llm-providers/anthropic-claude/AnthropicClaudeExecutionTools.d.ts +3 -3
- package/esm/typings/src/llm-providers/anthropic-claude/AnthropicClaudeExecutionToolsOptions.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/OpenAiAssistantExecutionToolsOptions.d.ts +2 -2
- package/esm/typings/src/llm-providers/openai/OpenAiCompatibleExecutionTools.d.ts +4 -4
- package/esm/typings/src/llm-providers/openai/OpenAiCompatibleExecutionToolsOptions.d.ts +52 -0
- package/esm/typings/src/llm-providers/openai/OpenAiExecutionToolsOptions.d.ts +3 -5
- package/esm/typings/src/llm-providers/openai/createOpenAiCompatibleExecutionTools.d.ts +74 -0
- package/esm/typings/src/llm-providers/openai/register-configuration.d.ts +13 -2
- package/esm/typings/src/llm-providers/openai/register-constructor.d.ts +16 -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 +3 -3
- package/umd/index.umd.js.map +1 -1
@@ -0,0 +1,74 @@
|
|
1
|
+
import type { AvailableModel } from '../../execution/AvailableModel';
|
2
|
+
import type { LlmExecutionTools } from '../../execution/LlmExecutionTools';
|
3
|
+
import type { Usage } from '../../execution/Usage';
|
4
|
+
import type { string_markdown } from '../../types/typeAliases';
|
5
|
+
import type { string_markdown_text } from '../../types/typeAliases';
|
6
|
+
import type { string_model_name } from '../../types/typeAliases';
|
7
|
+
import type { string_title } from '../../types/typeAliases';
|
8
|
+
import { RemoteLlmExecutionTools } from '../remote/RemoteLlmExecutionTools';
|
9
|
+
import { computeOpenAiUsage } from './computeOpenAiUsage';
|
10
|
+
import { OpenAiCompatibleExecutionTools } from './OpenAiCompatibleExecutionTools';
|
11
|
+
import type { OpenAiCompatibleExecutionToolsNonProxiedOptions } from './OpenAiCompatibleExecutionToolsOptions';
|
12
|
+
import type { OpenAiCompatibleExecutionToolsOptions } from './OpenAiCompatibleExecutionToolsOptions';
|
13
|
+
/**
|
14
|
+
* Execution Tools for calling OpenAI compatible API
|
15
|
+
*
|
16
|
+
* Note: This can be used for any OpenAI compatible APIs
|
17
|
+
*
|
18
|
+
* @public exported from `@promptbook/openai`
|
19
|
+
*/
|
20
|
+
export declare const createOpenAiCompatibleExecutionTools: ((options: OpenAiCompatibleExecutionToolsOptions & {
|
21
|
+
/**
|
22
|
+
* The model name to use for all operations
|
23
|
+
*
|
24
|
+
* This will be the only model available through this LLM provider and it will be a chat model.
|
25
|
+
* Other variants won't be available for now.
|
26
|
+
*/
|
27
|
+
defaultModelName: string_model_name;
|
28
|
+
}) => OpenAiCompatibleExecutionTools | RemoteLlmExecutionTools) & {
|
29
|
+
packageName: string;
|
30
|
+
className: string;
|
31
|
+
};
|
32
|
+
/**
|
33
|
+
* Execution Tools for calling ONE SPECIFIC PRECONFIGURED OpenAI compatible provider
|
34
|
+
*
|
35
|
+
* @private for `createOpenAiCompatibleExecutionTools`
|
36
|
+
*/
|
37
|
+
export declare class HardcodedOpenAiCompatibleExecutionTools extends OpenAiCompatibleExecutionTools implements LlmExecutionTools {
|
38
|
+
private readonly defaultModelName;
|
39
|
+
protected readonly options: OpenAiCompatibleExecutionToolsNonProxiedOptions;
|
40
|
+
/**
|
41
|
+
* Creates OpenAI compatible Execution Tools.
|
42
|
+
*
|
43
|
+
* @param options which are relevant are directly passed to the OpenAI compatible client
|
44
|
+
*/
|
45
|
+
constructor(defaultModelName: string_model_name, options: OpenAiCompatibleExecutionToolsNonProxiedOptions);
|
46
|
+
get title(): string_title & string_markdown_text;
|
47
|
+
get description(): string_markdown;
|
48
|
+
/**
|
49
|
+
* List all available models (non dynamically)
|
50
|
+
*
|
51
|
+
* Note: Purpose of this is to provide more information about models than standard listing from API
|
52
|
+
*/
|
53
|
+
protected get HARDCODED_MODELS(): ReadonlyArray<AvailableModel>;
|
54
|
+
/**
|
55
|
+
* Computes the usage
|
56
|
+
*/
|
57
|
+
protected computeUsage(...args: Parameters<typeof computeOpenAiUsage>): Usage;
|
58
|
+
/**
|
59
|
+
* Default model for chat variant.
|
60
|
+
*/
|
61
|
+
protected getDefaultChatModel(): AvailableModel;
|
62
|
+
/**
|
63
|
+
* Default model for completion variant.
|
64
|
+
*/
|
65
|
+
protected getDefaultCompletionModel(): AvailableModel;
|
66
|
+
/**
|
67
|
+
* Default model for completion variant.
|
68
|
+
*/
|
69
|
+
protected getDefaultEmbeddingModel(): AvailableModel;
|
70
|
+
}
|
71
|
+
/**
|
72
|
+
* TODO: [🦺] Is there some way how to put `packageName` and `className` on top and function definition on bottom?
|
73
|
+
* TODO: [🎶] Naming "constructor" vs "creator" vs "factory"
|
74
|
+
*/
|
@@ -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,10 +15,21 @@ 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;
|
22
|
+
/**
|
23
|
+
* Registration of the OpenAI Compatible metadata
|
24
|
+
*
|
25
|
+
* Note: OpenAiCompatibleExecutionTools is an abstract class and cannot be instantiated directly.
|
26
|
+
* It serves as a base class for OpenAiExecutionTools and other compatible implementations.
|
27
|
+
*
|
28
|
+
* @public exported from `@promptbook/core`
|
29
|
+
* @public exported from `@promptbook/wizard`
|
30
|
+
* @public exported from `@promptbook/cli`
|
31
|
+
*/
|
32
|
+
export declare const _OpenAiCompatibleMetadataRegistration: Registration;
|
22
33
|
/**
|
23
34
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
24
35
|
*/
|
@@ -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,10 +15,24 @@ 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;
|
22
|
+
/**
|
23
|
+
* Registration of the OpenAI Compatible provider
|
24
|
+
*
|
25
|
+
* Note: [🏐] Configurations registrations are done in register-constructor.ts BUT constructor register-constructor.ts
|
26
|
+
*
|
27
|
+
* @public exported from `@promptbook/openai`
|
28
|
+
* @public exported from `@promptbook/wizard`
|
29
|
+
* @public exported from `@promptbook/cli`
|
30
|
+
*/
|
31
|
+
export declare const _OpenAiCompatibleRegistration: Registration;
|
32
|
+
/**
|
33
|
+
* Note: OpenAiCompatibleExecutionTools is an abstract class and cannot be registered directly.
|
34
|
+
* It serves as a base class for OpenAiExecutionTools and other compatible implementations.
|
35
|
+
*/
|
22
36
|
/**
|
23
37
|
* TODO: [🎶] Naming "constructor" vs "creator" vs "factory"
|
24
38
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
@@ -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.
|
18
|
+
* It follows semantic versioning (e.g., `0.98.0-9`).
|
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/editable",
|
3
|
-
"version": "0.
|
3
|
+
"version": "0.98.0-10",
|
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/editable.index.d.ts",
|
88
76
|
"peerDependencies": {
|
89
|
-
"@promptbook/core": "0.
|
77
|
+
"@promptbook/core": "0.98.0-10"
|
90
78
|
},
|
91
79
|
"dependencies": {
|
92
80
|
"crypto-js": "4.2.0",
|
package/umd/index.umd.js
CHANGED
@@ -23,7 +23,7 @@
|
|
23
23
|
* @generated
|
24
24
|
* @see https://github.com/webgptorg/promptbook
|
25
25
|
*/
|
26
|
-
const PROMPTBOOK_ENGINE_VERSION = '0.
|
26
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.98.0-10';
|
27
27
|
/**
|
28
28
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
29
29
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
@@ -664,7 +664,7 @@
|
|
664
664
|
$taskJson.expectations[unit] = $taskJson.expectations[unit] || {};
|
665
665
|
if (command.sign === 'MINIMUM' || command.sign === 'EXACTLY') {
|
666
666
|
if ($taskJson.expectations[unit].min !== undefined) {
|
667
|
-
throw new ParseError(`Already defined
|
667
|
+
throw new ParseError(`Already defined minimum ${$taskJson.expectations[unit].min} ${command.unit.toLowerCase()}, now trying to redefine it to ${command.amount}`);
|
668
668
|
}
|
669
669
|
$taskJson.expectations[unit].min = command.amount;
|
670
670
|
} /* not else */
|
@@ -1218,7 +1218,7 @@
|
|
1218
1218
|
else {
|
1219
1219
|
for (const [subName, subValue] of Object.entries(value)) {
|
1220
1220
|
if (subValue === undefined) {
|
1221
|
-
// Note: undefined in object is serializable - it is just
|
1221
|
+
// Note: undefined in object is serializable - it is just omitted
|
1222
1222
|
continue;
|
1223
1223
|
}
|
1224
1224
|
checkSerializableAsJson({ name: `${name}.${subName}`, value: subValue, message });
|