@promptbook/openai 0.40.0-1 → 0.40.0-3
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/esm/typings/_packages/types.index.d.ts +1 -7
- package/esm/typings/execution/createPromptbookExecutor.d.ts +1 -1
- package/esm/typings/library/SimplePromptbookLibrary.d.ts +2 -3
- package/package.json +2 -2
- package/umd/typings/_packages/types.index.d.ts +1 -7
- package/umd/typings/execution/createPromptbookExecutor.d.ts +1 -1
- package/umd/typings/library/SimplePromptbookLibrary.d.ts +2 -3
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
import { ExpectError } from '../errors/ExpectError';
|
|
2
|
-
import { NotFoundError } from '../errors/NotFoundError';
|
|
3
|
-
import { PromptbookExecutionError } from '../errors/PromptbookExecutionError';
|
|
4
|
-
import { PromptbookLogicError } from '../errors/PromptbookLogicError';
|
|
5
|
-
import { PromptbookSyntaxError } from '../errors/PromptbookSyntaxError';
|
|
6
1
|
import type { CommonExecutionToolsOptions } from '../execution/CommonExecutionToolsOptions';
|
|
7
2
|
import type { ExecutionTools } from '../execution/ExecutionTools';
|
|
8
3
|
import type { NaturalExecutionTools } from '../execution/NaturalExecutionTools';
|
|
@@ -26,8 +21,7 @@ import type { string_char_emoji } from '../types/typeAliasEmoji';
|
|
|
26
21
|
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';
|
|
27
22
|
import { FromtoItems } from '../utils/FromtoItems';
|
|
28
23
|
export { CommonExecutionToolsOptions, EXPECTATION_UNITS, ExecutionReportJson, ExecutionTools, ExecutionType, ExpectationAmount, ExpectationUnit, FromtoItems, ModelRequirements, ModelVariant, NaturalExecutionTools, Parameters, Prompt, PromptChatResult, PromptCommonResult, PromptCompletionResult, PromptResult, PromptTemplateJson, PromptTemplateParameterJson, PromptbookExecutor, PromptbookJson, PromptbookLibrary, PromptbookString, ScriptExecutionTools, ScriptExecutionToolsExecuteOptions, ScriptLanguage, TaskProgress, UserInterfaceTools, UserInterfaceToolsPromptDialogOptions, client_id, 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, };
|
|
29
|
-
export { ExpectError, NotFoundError, PromptbookExecutionError, PromptbookLogicError, PromptbookSyntaxError };
|
|
30
24
|
/**
|
|
31
|
-
* TODO: [🧠] Is this the best package to export custom errors from?
|
|
25
|
+
* TODO: [🧠][🆔] Is this the best package to export custom errors from?
|
|
32
26
|
* TODO: Delete type aliases (from ../types/typeAliases) that are not exported here
|
|
33
27
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PromptbookJson } from '../_packages/types.index';
|
|
2
2
|
import { ExecutionTools } from './ExecutionTools';
|
|
3
3
|
import { PromptbookExecutor } from './PromptbookExecutor';
|
|
4
|
-
|
|
4
|
+
type CreatePromptbookExecutorSettings = {
|
|
5
5
|
/**
|
|
6
6
|
* When executor does not satisfy expectations it will be retried this amount of times
|
|
7
7
|
*
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { CreatePromptbookExecutorSettings } from '../execution/createPromptbookExecutor';
|
|
2
1
|
import type { Prompt } from '../types/Prompt';
|
|
3
2
|
import type { PromptbookJson } from '../types/PromptbookJson/PromptbookJson';
|
|
4
3
|
import type { PromptbookString } from '../types/PromptbookString';
|
|
@@ -11,7 +10,7 @@ import { PromptbookLibrary } from './PromptbookLibrary';
|
|
|
11
10
|
* @see https://github.com/webgptorg/promptbook#promptbook-library
|
|
12
11
|
*/
|
|
13
12
|
export declare class SimplePromptbookLibrary implements PromptbookLibrary {
|
|
14
|
-
private readonly
|
|
13
|
+
private readonly library;
|
|
15
14
|
/**
|
|
16
15
|
* Constructs Promptbook from any sources
|
|
17
16
|
*
|
|
@@ -22,7 +21,7 @@ export declare class SimplePromptbookLibrary implements PromptbookLibrary {
|
|
|
22
21
|
* @param settings settings for creating executor functions
|
|
23
22
|
* @returns PromptbookLibrary
|
|
24
23
|
*/
|
|
25
|
-
static fromSources(promptbookSources:
|
|
24
|
+
static fromSources(...promptbookSources: Array<PromptbookJson | PromptbookString>): SimplePromptbookLibrary;
|
|
26
25
|
private constructor();
|
|
27
26
|
/**
|
|
28
27
|
* Gets all promptbooks in the library
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@promptbook/openai",
|
|
3
|
-
"version": "0.40.0-
|
|
3
|
+
"version": "0.40.0-3",
|
|
4
4
|
"description": "Library to supercharge your use of large language models",
|
|
5
5
|
"private": false,
|
|
6
6
|
"sideEffects": false,
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"openai": "4.2.0"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
|
-
"@promptbook/core": "0.40.0-
|
|
40
|
+
"@promptbook/core": "0.40.0-3"
|
|
41
41
|
},
|
|
42
42
|
"main": "./umd/index.umd.js",
|
|
43
43
|
"module": "./esm/index.es.js",
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
import { ExpectError } from '../errors/ExpectError';
|
|
2
|
-
import { NotFoundError } from '../errors/NotFoundError';
|
|
3
|
-
import { PromptbookExecutionError } from '../errors/PromptbookExecutionError';
|
|
4
|
-
import { PromptbookLogicError } from '../errors/PromptbookLogicError';
|
|
5
|
-
import { PromptbookSyntaxError } from '../errors/PromptbookSyntaxError';
|
|
6
1
|
import type { CommonExecutionToolsOptions } from '../execution/CommonExecutionToolsOptions';
|
|
7
2
|
import type { ExecutionTools } from '../execution/ExecutionTools';
|
|
8
3
|
import type { NaturalExecutionTools } from '../execution/NaturalExecutionTools';
|
|
@@ -26,8 +21,7 @@ import type { string_char_emoji } from '../types/typeAliasEmoji';
|
|
|
26
21
|
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';
|
|
27
22
|
import { FromtoItems } from '../utils/FromtoItems';
|
|
28
23
|
export { CommonExecutionToolsOptions, EXPECTATION_UNITS, ExecutionReportJson, ExecutionTools, ExecutionType, ExpectationAmount, ExpectationUnit, FromtoItems, ModelRequirements, ModelVariant, NaturalExecutionTools, Parameters, Prompt, PromptChatResult, PromptCommonResult, PromptCompletionResult, PromptResult, PromptTemplateJson, PromptTemplateParameterJson, PromptbookExecutor, PromptbookJson, PromptbookLibrary, PromptbookString, ScriptExecutionTools, ScriptExecutionToolsExecuteOptions, ScriptLanguage, TaskProgress, UserInterfaceTools, UserInterfaceToolsPromptDialogOptions, client_id, 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, };
|
|
29
|
-
export { ExpectError, NotFoundError, PromptbookExecutionError, PromptbookLogicError, PromptbookSyntaxError };
|
|
30
24
|
/**
|
|
31
|
-
* TODO: [🧠] Is this the best package to export custom errors from?
|
|
25
|
+
* TODO: [🧠][🆔] Is this the best package to export custom errors from?
|
|
32
26
|
* TODO: Delete type aliases (from ../types/typeAliases) that are not exported here
|
|
33
27
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PromptbookJson } from '../_packages/types.index';
|
|
2
2
|
import { ExecutionTools } from './ExecutionTools';
|
|
3
3
|
import { PromptbookExecutor } from './PromptbookExecutor';
|
|
4
|
-
|
|
4
|
+
type CreatePromptbookExecutorSettings = {
|
|
5
5
|
/**
|
|
6
6
|
* When executor does not satisfy expectations it will be retried this amount of times
|
|
7
7
|
*
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { CreatePromptbookExecutorSettings } from '../execution/createPromptbookExecutor';
|
|
2
1
|
import type { Prompt } from '../types/Prompt';
|
|
3
2
|
import type { PromptbookJson } from '../types/PromptbookJson/PromptbookJson';
|
|
4
3
|
import type { PromptbookString } from '../types/PromptbookString';
|
|
@@ -11,7 +10,7 @@ import { PromptbookLibrary } from './PromptbookLibrary';
|
|
|
11
10
|
* @see https://github.com/webgptorg/promptbook#promptbook-library
|
|
12
11
|
*/
|
|
13
12
|
export declare class SimplePromptbookLibrary implements PromptbookLibrary {
|
|
14
|
-
private readonly
|
|
13
|
+
private readonly library;
|
|
15
14
|
/**
|
|
16
15
|
* Constructs Promptbook from any sources
|
|
17
16
|
*
|
|
@@ -22,7 +21,7 @@ export declare class SimplePromptbookLibrary implements PromptbookLibrary {
|
|
|
22
21
|
* @param settings settings for creating executor functions
|
|
23
22
|
* @returns PromptbookLibrary
|
|
24
23
|
*/
|
|
25
|
-
static fromSources(promptbookSources:
|
|
24
|
+
static fromSources(...promptbookSources: Array<PromptbookJson | PromptbookString>): SimplePromptbookLibrary;
|
|
26
25
|
private constructor();
|
|
27
26
|
/**
|
|
28
27
|
* Gets all promptbooks in the library
|