@promptbook/core 0.55.0 → 0.56.0-2
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 +3 -2
- package/esm/index.es.js +31 -262
- package/esm/index.es.js.map +1 -1
- package/esm/typings/_packages/anthropic-claude.index.d.ts +2 -0
- package/esm/typings/_packages/azure-openai.index.d.ts +2 -0
- package/esm/typings/_packages/cli.index.d.ts +2 -0
- package/esm/typings/_packages/core.index.d.ts +3 -3
- package/esm/typings/_packages/execute-javascript.index.d.ts +2 -0
- package/esm/typings/_packages/{mock.index.d.ts → fake-llm.index.d.ts} +2 -1
- package/esm/typings/_packages/langtail.index.d.ts +2 -0
- package/esm/typings/_packages/node.index.d.ts +4 -0
- package/esm/typings/_packages/openai.index.d.ts +2 -0
- package/esm/typings/_packages/remote-client.index.d.ts +2 -0
- package/esm/typings/_packages/remote-server.index.d.ts +2 -0
- package/esm/typings/_packages/types.index.d.ts +3 -2
- package/esm/typings/_packages/utils.index.d.ts +2 -1
- package/esm/typings/execution/plugins/llm-execution-tools/mocked/fakeTextToExpectations.d.ts +0 -1
- package/esm/typings/library/constructors/createPromptbookLibraryFromDirectory.d.ts +0 -10
- package/esm/typings/library/constructors/createPromptbookLibraryFromPromise.d.ts +0 -3
- package/esm/typings/library/constructors/createPromptbookLibraryFromSources.d.ts +0 -3
- package/esm/typings/library/constructors/createPromptbookLibraryFromUrl.d.ts +0 -4
- package/esm/typings/library/constructors/createPromptbookSublibrary.d.ts +0 -3
- package/package.json +1 -1
- package/umd/index.umd.js +34 -265
- package/umd/index.umd.js.map +1 -1
- package/umd/typings/_packages/anthropic-claude.index.d.ts +2 -0
- package/umd/typings/_packages/azure-openai.index.d.ts +2 -0
- package/umd/typings/_packages/cli.index.d.ts +2 -0
- package/umd/typings/_packages/core.index.d.ts +3 -3
- package/umd/typings/_packages/execute-javascript.index.d.ts +2 -0
- package/umd/typings/_packages/{mock.index.d.ts → fake-llm.index.d.ts} +2 -1
- package/umd/typings/_packages/langtail.index.d.ts +2 -0
- package/umd/typings/_packages/node.index.d.ts +4 -0
- package/umd/typings/_packages/openai.index.d.ts +2 -0
- package/umd/typings/_packages/remote-client.index.d.ts +2 -0
- package/umd/typings/_packages/remote-server.index.d.ts +2 -0
- package/umd/typings/_packages/types.index.d.ts +3 -2
- package/umd/typings/_packages/utils.index.d.ts +2 -1
- package/umd/typings/execution/plugins/llm-execution-tools/mocked/fakeTextToExpectations.d.ts +0 -1
- package/umd/typings/library/constructors/createPromptbookLibraryFromDirectory.d.ts +0 -10
- package/umd/typings/library/constructors/createPromptbookLibraryFromPromise.d.ts +0 -3
- package/umd/typings/library/constructors/createPromptbookLibraryFromSources.d.ts +0 -3
- package/umd/typings/library/constructors/createPromptbookLibraryFromUrl.d.ts +0 -4
- package/umd/typings/library/constructors/createPromptbookSublibrary.d.ts +0 -3
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { OPENAI_MODELS } from '../execution/plugins/llm-execution-tools/openai/openai-models';
|
|
2
2
|
import { OpenAiExecutionTools } from '../execution/plugins/llm-execution-tools/openai/OpenAiExecutionTools';
|
|
3
3
|
import { OpenAiExecutionToolsOptions } from '../execution/plugins/llm-execution-tools/openai/OpenAiExecutionToolsOptions';
|
|
4
|
+
import { PROMPTBOOK_VERSION } from '../version';
|
|
5
|
+
export { PROMPTBOOK_VERSION };
|
|
4
6
|
export { OPENAI_MODELS, OpenAiExecutionTools, OpenAiExecutionToolsOptions };
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { RemoteServerOptions } from '../execution/plugins/llm-execution-tools/remote/interfaces/RemoteServerOptions';
|
|
2
2
|
import { RemoteLlmExecutionTools } from '../execution/plugins/llm-execution-tools/remote/RemoteLlmExecutionTools';
|
|
3
3
|
import { RemoteLlmExecutionToolsOptions } from '../execution/plugins/llm-execution-tools/remote/RemoteLlmExecutionToolsOptions';
|
|
4
|
+
import { PROMPTBOOK_VERSION } from '../version';
|
|
5
|
+
export { PROMPTBOOK_VERSION };
|
|
4
6
|
export { RemoteLlmExecutionTools, RemoteLlmExecutionToolsOptions, RemoteServerOptions };
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
import { RemoteServerOptions } from '../execution/plugins/llm-execution-tools/remote/interfaces/RemoteServerOptions';
|
|
2
2
|
import { startRemoteServer } from '../execution/plugins/llm-execution-tools/remote/startRemoteServer';
|
|
3
|
+
import { PROMPTBOOK_VERSION } from '../version';
|
|
4
|
+
export { PROMPTBOOK_VERSION };
|
|
3
5
|
export { RemoteServerOptions, startRemoteServer };
|
|
@@ -20,8 +20,9 @@ import type { TaskProgress } from '../types/TaskProgress';
|
|
|
20
20
|
import type { ExecutionReportJson } from '../types/execution-report/ExecutionReportJson';
|
|
21
21
|
import type { string_char_emoji } from '../types/typeAliasEmoji';
|
|
22
22
|
import type { client_id, string_char, string_chat_prompt, string_completion_prompt, string_data_url, string_domain, string_email, string_file_absolute_path, string_file_extension, string_file_path, string_file_relative_path, string_filename, string_folder_absolute_path, string_folder_path, string_folder_relative_path, string_host, string_hostname, string_href, string_html, string_javascript, string_javascript_name, string_license, string_markdown, string_markdown_text, string_mime_type, string_mime_type_with_wildcard, string_model_name, string_name, string_person_fullname, string_prompt, string_promptbook_url, string_promptbook_url_with_hashtemplate, string_script, string_sha256, string_tdl, string_template, string_text_prompt, string_title, string_token, string_translate_language, string_uri, string_uri_part, string_url, string_url_image, string_version } from '../types/typeAliases';
|
|
23
|
-
import { FromtoItems } from '../utils/FromtoItems';
|
|
24
|
-
|
|
23
|
+
import type { FromtoItems } from '../utils/FromtoItems';
|
|
24
|
+
import { PROMPTBOOK_VERSION } from '../version';
|
|
25
|
+
export type { AvailableModel, client_id, CommonExecutionToolsOptions, ExecutionReportJson, ExecutionTools, ExecutionType, EXPECTATION_UNITS, ExpectationAmount, Expectations, ExpectationUnit, FromtoItems, LlmExecutionTools, LlmTemplateJson, ModelRequirements, ModelVariant, Parameters, Prompt, PROMPTBOOK_VERSION, PromptbookExecutor, PromptbookJson, PromptbookLibrary, PromptbookString, PromptChatResult, PromptCommonResult, PromptCompletionResult, PromptDialogJson, PromptResult, PromptResultUsage, PromptResultUsageCounts, PromptTemplateJson, PromptTemplateParameterJson, ScriptExecutionTools, ScriptExecutionToolsExecuteOptions, ScriptJson, ScriptLanguage, SimpleTemplateJson, string_char, string_char_emoji, string_chat_prompt, string_completion_prompt, string_data_url, string_domain, string_email, string_file_absolute_path, string_file_extension, string_file_path, string_file_relative_path, string_filename, string_folder_absolute_path, string_folder_path, string_folder_relative_path, string_host, string_hostname, string_href, string_html, string_javascript, string_javascript_name, string_license, string_markdown, string_markdown_text, string_mime_type, string_mime_type_with_wildcard, string_model_name, string_name, string_person_fullname, string_prompt, string_promptbook_url, string_promptbook_url_with_hashtemplate, string_script, string_sha256, string_tdl, string_template, string_text_prompt, string_title, string_token, string_translate_language, string_uri, string_uri_part, string_url, string_url_image, string_version, TaskProgress, UncertainNumber, UserInterfaceTools, UserInterfaceToolsPromptDialogOptions, };
|
|
25
26
|
/**
|
|
26
27
|
* TODO: Delete type aliases (from ../types/typeAliases) that are not exported here
|
|
27
28
|
*/
|
|
@@ -47,7 +47,8 @@ import { union } from '../utils/sets/union';
|
|
|
47
47
|
import { trimCodeBlock } from '../utils/trimCodeBlock';
|
|
48
48
|
import { trimEndOfCodeBlock } from '../utils/trimEndOfCodeBlock';
|
|
49
49
|
import { unwrapResult } from '../utils/unwrapResult';
|
|
50
|
-
|
|
50
|
+
import { PROMPTBOOK_VERSION } from '../version';
|
|
51
|
+
export { forEachAsync, PROMPTBOOK_VERSION };
|
|
51
52
|
export { extractAllBlocksFromMarkdown, // <- [🌻]
|
|
52
53
|
extractAllListItemsFromMarkdown, extractBlock, // <- [🌻]
|
|
53
54
|
extractOneBlockFromMarkdown, extractParameters, extractVariables, isValidJsonString, parseNumber, // <- [🌻]
|
package/umd/typings/execution/plugins/llm-execution-tools/mocked/fakeTextToExpectations.d.ts
CHANGED
|
@@ -10,6 +10,5 @@ import type { PostprocessingFunction } from '../../script-execution-tools/javasc
|
|
|
10
10
|
*/
|
|
11
11
|
export declare function $fakeTextToExpectations(expectations: Expectations, postprocessing?: Array<PostprocessingFunction>): Promise<string>;
|
|
12
12
|
/**
|
|
13
|
-
* TODO: [🚏] Implement better - create FakeLLM from this
|
|
14
13
|
* TODO: [💝] Unite object for expecting amount and format - use here also a format
|
|
15
14
|
*/
|
|
@@ -41,13 +41,3 @@ type CreatePromptbookLibraryFromDirectoryOptions = {
|
|
|
41
41
|
*/
|
|
42
42
|
export declare function createPromptbookLibraryFromDirectory(path: string_folder_path, options?: CreatePromptbookLibraryFromDirectoryOptions): Promise<PromptbookLibrary>;
|
|
43
43
|
export {};
|
|
44
|
-
/***
|
|
45
|
-
* TODO: [🧠] Maybe do not do hacks like [1] and just create package @promptbook/node
|
|
46
|
-
* [🍓][🚯] maybe make `@promptbook/library` package
|
|
47
|
-
* TODO: Fix the dynamic import issue in Webpack (! Not working !)
|
|
48
|
-
* > ./node_modules/@promptbook/core/esm/index.es.js
|
|
49
|
-
* > Critical dependency: the request of a dependency is an expression
|
|
50
|
-
*
|
|
51
|
-
* Note: [1] Using require(just('fs/promises')) to allow
|
|
52
|
-
* the `@promptbook/core` work for both Node.js and browser environments
|
|
53
|
-
*/
|
|
@@ -21,6 +21,3 @@ import type { PromptbookLibrary } from '../PromptbookLibrary';
|
|
|
21
21
|
* @private Just internal tool for other constructor functions
|
|
22
22
|
*/
|
|
23
23
|
export declare function createPromptbookLibraryFromPromise(promptbookSourcesPromiseOrFactory: Promise<Array<PromptbookJson | PromptbookString>> | (() => Promise<Array<PromptbookJson | PromptbookString>>)): PromptbookLibrary;
|
|
24
|
-
/***
|
|
25
|
-
* TODO: [🍓][🚯] !!! Add to README and samples + maybe make `@promptbook/library` package
|
|
26
|
-
*/
|
|
@@ -11,6 +11,3 @@ import { SimplePromptbookLibrary } from '../SimplePromptbookLibrary';
|
|
|
11
11
|
* @returns PromptbookLibrary
|
|
12
12
|
*/
|
|
13
13
|
export declare function createPromptbookLibraryFromSources(...promptbookSources: Array<PromptbookJson | PromptbookString>): SimplePromptbookLibrary;
|
|
14
|
-
/***
|
|
15
|
-
* TODO: [🍓][🚯] !!! Add to README and samples + maybe make `@promptbook/library` package
|
|
16
|
-
*/
|
|
@@ -24,7 +24,3 @@ type CreatePromptbookLibraryFromUrlyOptions = {
|
|
|
24
24
|
*/
|
|
25
25
|
export declare function createPromptbookLibraryFromUrl(url: string_url | URL, options: CreatePromptbookLibraryFromUrlyOptions): Promise<PromptbookLibrary>;
|
|
26
26
|
export {};
|
|
27
|
-
/***
|
|
28
|
-
* TODO: [⚖] Compatible with remote server
|
|
29
|
-
* TODO: [🍓][🚯] !!! Add to README and samples + maybe make `@promptbook/library` package
|
|
30
|
-
*/
|
|
@@ -10,6 +10,3 @@ import type { PromptbookLibrary } from '../PromptbookLibrary';
|
|
|
10
10
|
* @returns PromptbookLibrary
|
|
11
11
|
*/
|
|
12
12
|
export declare function createPromptbookSublibrary(library: PromptbookLibrary, predicate: (url: string_promptbook_url) => boolean): PromptbookLibrary;
|
|
13
|
-
/***
|
|
14
|
-
* TODO: [🍓][🚯] !!! Add to README and samples + maybe make `@promptbook/library` package
|
|
15
|
-
*/
|