@promptbook/types 0.56.0-3 → 0.56.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/esm/index.es.js CHANGED
@@ -1,2 +1,17 @@
1
+ /**
2
+ * Units of text measurement
3
+ */
4
+ var EXPECTATION_UNITS = ['CHARACTERS', 'WORDS', 'SENTENCES', 'LINES', 'PARAGRAPHS', 'PAGES'];
5
+ /**
6
+ * TODO: [💝] Unite object for expecting amount and format - remove expectFormat
7
+ * TODO: use one helper type> (string_prompt | string_javascript | string_markdown) & string_template
8
+ * TODO: [👙][🧠] Just selecting gpt3 or gpt4 level of model
9
+ */
1
10
 
11
+ /**
12
+ * The version of the Promptbook library
13
+ */
14
+ var PROMPTBOOK_VERSION = '0.56.0-4';
15
+
16
+ export { EXPECTATION_UNITS, PROMPTBOOK_VERSION };
2
17
  //# sourceMappingURL=index.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
1
+ {"version":3,"file":"index.es.js","sources":["../../../src/types/PromptbookJson/PromptTemplateJson.ts","../../../src/version.ts"],"sourcesContent":[null,null],"names":[],"mappings":"AA2CA;;;IAGa,iBAAiB,GAAG,CAAC,YAAY,EAAE,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,YAAY,EAAE,OAAO,EAAW;AAmH/G;;;;;;AC/JA;;;IAGa,kBAAkB,GAAmB;;;;"}
@@ -20,20 +20,19 @@ import { SimplePromptInterfaceTools } from '../execution/plugins/user-interface-
20
20
  import { addUsage } from '../execution/utils/addUsage';
21
21
  import { checkExpectations, isPassingExpectations } from '../execution/utils/checkExpectations';
22
22
  import { usageToWorktime } from '../execution/utils/usageToWorktime';
23
+ import { createPromptbookLibraryFromPromise } from '../library/constructors/createPromptbookLibraryFromPromise';
23
24
  import { createPromptbookLibraryFromSources } from '../library/constructors/createPromptbookLibraryFromSources';
24
25
  import { createPromptbookLibraryFromUrl } from '../library/constructors/createPromptbookLibraryFromUrl';
25
26
  import { createPromptbookSublibrary } from '../library/constructors/createPromptbookSublibrary';
26
- import { justTestFsImport } from '../library/constructors/justTestFsImport';
27
27
  import { SimplePromptbookLibrary } from '../library/SimplePromptbookLibrary';
28
28
  import { executionReportJsonToString } from '../types/execution-report/executionReportJsonToString';
29
29
  import { ExecutionReportStringOptions, ExecutionReportStringOptionsDefaults } from '../types/execution-report/ExecutionReportStringOptions';
30
30
  import { ExecutionTypes } from '../types/ExecutionTypes';
31
31
  import { PROMPTBOOK_VERSION } from '../version';
32
32
  export { PROMPTBOOK_VERSION };
33
- export { justTestFsImport };
34
33
  export { ExecutionTypes };
35
34
  export { addUsage, assertsExecutionSuccessful, checkExpectations, executionReportJsonToString, ExecutionReportStringOptions, ExecutionReportStringOptionsDefaults, isPassingExpectations, prettifyPromptbookString, usageToWorktime, };
36
- export { createPromptbookLibraryFromSources, createPromptbookLibraryFromUrl, createPromptbookSublibrary, SimplePromptbookLibrary, };
35
+ export { createPromptbookLibraryFromPromise, createPromptbookLibraryFromSources, createPromptbookLibraryFromUrl, createPromptbookSublibrary, SimplePromptbookLibrary, };
37
36
  export { SimplePromptInterfaceTools };
38
37
  export { promptbookJsonToString, promptbookStringToJson, validatePromptbookJson };
39
38
  export { createPromptbookExecutor, MultipleLlmExecutionTools };
@@ -22,7 +22,9 @@ 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
23
  import type { FromtoItems } from '../utils/FromtoItems';
24
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
+ export { PROMPTBOOK_VERSION };
26
+ export { EXPECTATION_UNITS };
27
+ export type { AvailableModel, client_id, CommonExecutionToolsOptions, ExecutionReportJson, ExecutionTools, ExecutionType, ExpectationAmount, Expectations, ExpectationUnit, FromtoItems, LlmExecutionTools, LlmTemplateJson, ModelRequirements, ModelVariant, Parameters, Prompt, 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, };
26
28
  /**
27
29
  * TODO: Delete type aliases (from ../types/typeAliases) that are not exported here
28
30
  */
@@ -18,6 +18,6 @@ import type { PromptbookLibrary } from '../PromptbookLibrary';
18
18
  *
19
19
  * @param promptbookSourcesPromiseOrFactory
20
20
  * @returns PromptbookLibrary
21
- * @private Just internal tool for other constructor functions
21
+ * @deprecated Do not use, it will became internal tool for other constructor functions
22
22
  */
23
23
  export declare function createPromptbookLibraryFromPromise(promptbookSourcesPromiseOrFactory: Promise<Array<PromptbookJson | PromptbookString>> | (() => Promise<Array<PromptbookJson | PromptbookString>>)): PromptbookLibrary;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@promptbook/types",
3
- "version": "0.56.0-3",
3
+ "version": "0.56.0",
4
4
  "description": "Library to supercharge your use of large language models",
5
5
  "private": false,
6
6
  "sideEffects": false,
@@ -45,7 +45,7 @@
45
45
  }
46
46
  ],
47
47
  "peerDependencies": {
48
- "@promptbook/core": "0.56.0-3"
48
+ "@promptbook/core": "0.56.0"
49
49
  },
50
50
  "main": "./umd/index.umd.js",
51
51
  "module": "./esm/index.es.js",
package/umd/index.umd.js CHANGED
@@ -1,9 +1,28 @@
1
- (function (factory) {
2
- typeof define === 'function' && define.amd ? define(factory) :
3
- factory();
4
- })((function () { 'use strict';
1
+ (function (global, factory) {
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
3
+ typeof define === 'function' && define.amd ? define(['exports'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["promptbook-types"] = {}));
5
+ })(this, (function (exports) { 'use strict';
5
6
 
7
+ /**
8
+ * Units of text measurement
9
+ */
10
+ var EXPECTATION_UNITS = ['CHARACTERS', 'WORDS', 'SENTENCES', 'LINES', 'PARAGRAPHS', 'PAGES'];
11
+ /**
12
+ * TODO: [💝] Unite object for expecting amount and format - remove expectFormat
13
+ * TODO: use one helper type> (string_prompt | string_javascript | string_markdown) & string_template
14
+ * TODO: [👙][🧠] Just selecting gpt3 or gpt4 level of model
15
+ */
6
16
 
17
+ /**
18
+ * The version of the Promptbook library
19
+ */
20
+ var PROMPTBOOK_VERSION = '0.56.0-4';
21
+
22
+ exports.EXPECTATION_UNITS = EXPECTATION_UNITS;
23
+ exports.PROMPTBOOK_VERSION = PROMPTBOOK_VERSION;
24
+
25
+ Object.defineProperty(exports, '__esModule', { value: true });
7
26
 
8
27
  }));
9
28
  //# sourceMappingURL=index.umd.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.umd.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;"}
1
+ {"version":3,"file":"index.umd.js","sources":["../../../src/types/PromptbookJson/PromptTemplateJson.ts","../../../src/version.ts"],"sourcesContent":[null,null],"names":[],"mappings":";;;;;;CA2CA;;;KAGa,iBAAiB,GAAG,CAAC,YAAY,EAAE,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,YAAY,EAAE,OAAO,EAAW;CAmH/G;;;;;;CC/JA;;;KAGa,kBAAkB,GAAmB;;;;;;;;;;;"}
@@ -20,20 +20,19 @@ import { SimplePromptInterfaceTools } from '../execution/plugins/user-interface-
20
20
  import { addUsage } from '../execution/utils/addUsage';
21
21
  import { checkExpectations, isPassingExpectations } from '../execution/utils/checkExpectations';
22
22
  import { usageToWorktime } from '../execution/utils/usageToWorktime';
23
+ import { createPromptbookLibraryFromPromise } from '../library/constructors/createPromptbookLibraryFromPromise';
23
24
  import { createPromptbookLibraryFromSources } from '../library/constructors/createPromptbookLibraryFromSources';
24
25
  import { createPromptbookLibraryFromUrl } from '../library/constructors/createPromptbookLibraryFromUrl';
25
26
  import { createPromptbookSublibrary } from '../library/constructors/createPromptbookSublibrary';
26
- import { justTestFsImport } from '../library/constructors/justTestFsImport';
27
27
  import { SimplePromptbookLibrary } from '../library/SimplePromptbookLibrary';
28
28
  import { executionReportJsonToString } from '../types/execution-report/executionReportJsonToString';
29
29
  import { ExecutionReportStringOptions, ExecutionReportStringOptionsDefaults } from '../types/execution-report/ExecutionReportStringOptions';
30
30
  import { ExecutionTypes } from '../types/ExecutionTypes';
31
31
  import { PROMPTBOOK_VERSION } from '../version';
32
32
  export { PROMPTBOOK_VERSION };
33
- export { justTestFsImport };
34
33
  export { ExecutionTypes };
35
34
  export { addUsage, assertsExecutionSuccessful, checkExpectations, executionReportJsonToString, ExecutionReportStringOptions, ExecutionReportStringOptionsDefaults, isPassingExpectations, prettifyPromptbookString, usageToWorktime, };
36
- export { createPromptbookLibraryFromSources, createPromptbookLibraryFromUrl, createPromptbookSublibrary, SimplePromptbookLibrary, };
35
+ export { createPromptbookLibraryFromPromise, createPromptbookLibraryFromSources, createPromptbookLibraryFromUrl, createPromptbookSublibrary, SimplePromptbookLibrary, };
37
36
  export { SimplePromptInterfaceTools };
38
37
  export { promptbookJsonToString, promptbookStringToJson, validatePromptbookJson };
39
38
  export { createPromptbookExecutor, MultipleLlmExecutionTools };
@@ -22,7 +22,9 @@ 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
23
  import type { FromtoItems } from '../utils/FromtoItems';
24
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
+ export { PROMPTBOOK_VERSION };
26
+ export { EXPECTATION_UNITS };
27
+ export type { AvailableModel, client_id, CommonExecutionToolsOptions, ExecutionReportJson, ExecutionTools, ExecutionType, ExpectationAmount, Expectations, ExpectationUnit, FromtoItems, LlmExecutionTools, LlmTemplateJson, ModelRequirements, ModelVariant, Parameters, Prompt, 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, };
26
28
  /**
27
29
  * TODO: Delete type aliases (from ../types/typeAliases) that are not exported here
28
30
  */
@@ -18,6 +18,6 @@ import type { PromptbookLibrary } from '../PromptbookLibrary';
18
18
  *
19
19
  * @param promptbookSourcesPromiseOrFactory
20
20
  * @returns PromptbookLibrary
21
- * @private Just internal tool for other constructor functions
21
+ * @deprecated Do not use, it will became internal tool for other constructor functions
22
22
  */
23
23
  export declare function createPromptbookLibraryFromPromise(promptbookSourcesPromiseOrFactory: Promise<Array<PromptbookJson | PromptbookString>> | (() => Promise<Array<PromptbookJson | PromptbookString>>)): PromptbookLibrary;