@promptbook/openai 0.31.0-9 → 0.31.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.
Files changed (35) hide show
  1. package/esm/typings/_packages/core.index.d.ts +1 -1
  2. package/esm/typings/_packages/types.index.d.ts +2 -1
  3. package/esm/typings/_packages/utils.index.d.ts +6 -1
  4. package/esm/typings/config.d.ts +0 -5
  5. package/esm/typings/types/execution-report/ExecutionReportStringOptions.d.ts +13 -0
  6. package/esm/typings/types/execution-report/config.d.ts +8 -0
  7. package/esm/typings/types/execution-report/countWorkingDuration.d.ts +7 -0
  8. package/esm/typings/types/execution-report/countWorkingDuration.test.d.ts +1 -0
  9. package/esm/typings/types/execution-report/executionReportJsonToString.d.ts +5 -1
  10. package/esm/typings/utils/FromtoItems.d.ts +19 -0
  11. package/esm/typings/utils/formatNumber.d.ts +6 -0
  12. package/esm/typings/utils/formatNumber.test.d.ts +1 -0
  13. package/esm/typings/utils/markdown/createMarkdownChart.d.ts +37 -0
  14. package/esm/typings/utils/markdown/createMarkdownChart.test.d.ts +1 -0
  15. package/esm/typings/utils/markdown/createMarkdownTable.d.ts +7 -0
  16. package/esm/typings/utils/markdown/createMarkdownTable.test.d.ts +1 -0
  17. package/esm/typings/version.d.ts +5 -0
  18. package/package.json +2 -2
  19. package/umd/typings/_packages/core.index.d.ts +1 -1
  20. package/umd/typings/_packages/types.index.d.ts +2 -1
  21. package/umd/typings/_packages/utils.index.d.ts +6 -1
  22. package/umd/typings/config.d.ts +0 -5
  23. package/umd/typings/types/execution-report/ExecutionReportStringOptions.d.ts +13 -0
  24. package/umd/typings/types/execution-report/config.d.ts +8 -0
  25. package/umd/typings/types/execution-report/countWorkingDuration.d.ts +7 -0
  26. package/umd/typings/types/execution-report/countWorkingDuration.test.d.ts +1 -0
  27. package/umd/typings/types/execution-report/executionReportJsonToString.d.ts +5 -1
  28. package/umd/typings/utils/FromtoItems.d.ts +19 -0
  29. package/umd/typings/utils/formatNumber.d.ts +6 -0
  30. package/umd/typings/utils/formatNumber.test.d.ts +1 -0
  31. package/umd/typings/utils/markdown/createMarkdownChart.d.ts +37 -0
  32. package/umd/typings/utils/markdown/createMarkdownChart.test.d.ts +1 -0
  33. package/umd/typings/utils/markdown/createMarkdownTable.d.ts +7 -0
  34. package/umd/typings/utils/markdown/createMarkdownTable.test.d.ts +1 -0
  35. package/umd/typings/version.d.ts +5 -0
@@ -1,5 +1,5 @@
1
1
  import { PromptTemplatePipelineLibrary } from '../classes/PromptTemplatePipelineLibrary';
2
- import { PTBK_VERSION } from '../config';
2
+ import { PTBK_VERSION } from '../version';
3
3
  import { promptTemplatePipelineStringToJson } from '../conversion/promptTemplatePipelineStringToJson';
4
4
  import { validatePromptTemplatePipelineJson } from '../conversion/validatePromptTemplatePipelineJson';
5
5
  import { createPtpExecutor } from '../execution/createPtpExecutor';
@@ -18,7 +18,8 @@ import type { TaskProgress } from '../types/TaskProgress';
18
18
  import type { ExecutionReportJson } from '../types/execution-report/ExecutionReportJson';
19
19
  import type { string_char_emoji } from '../types/typeAliasEmoji';
20
20
  import type { ILicense, IPersonProfile, IRepository, client_id, number_bytes, number_days, number_gigabytes, number_hours, number_integer, number_kilobytes, number_likeness, number_megabytes, number_miliseconds, number_minutes, number_months, number_negative, number_percent, number_positive, number_seconds, number_terabytes, number_weeks, number_years, string_attribute, string_attribute_value_scope, string_business_category_name, string_char, string_chat_prompt, string_color, string_completion_prompt, string_css, string_css_class, string_css_property, string_css_selector, string_css_value, 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_license_token, string_markdown, string_markdown_text, string_mime_type, string_mime_type_with_wildcard, string_model_name, string_name, string_page, string_password, string_person_fullname, string_person_profile, string_pgp_key, string_prompt, string_protocol, string_ptbk_url, string_ptbk_url_with_hashtemplate, string_script, string_sha256, string_ssh_key, string_svg, string_tdl, string_template, string_text_prompt, string_title, string_token, string_translate_language, string_translate_name, string_translate_name_not_normalized, string_uri, string_uri_part, string_uriid, string_url, string_url_image, string_version, string_version_dependency, string_xml } from '../types/typeAliases';
21
- export { CommonExecutionToolsOptions, EXPECTATION_UNITS, ExecutionReportJson, ExecutionTools, ExecutionType, ExpectationAmount, ExpectationUnit, ILicense, IPersonProfile, IRepository, ModelRequirements, ModelVariant, NaturalExecutionTools, Parameters, Prompt, PromptChatResult, PromptCommonResult, PromptCompletionResult, PromptResult, PromptTemplateJson, PromptTemplateParameterJson, PromptTemplatePipelineJson, PromptTemplatePipelineString, PtpExecutor, ScriptExecutionTools, ScriptExecutionToolsExecuteOptions, ScriptLanguage, TaskProgress, UserInterfaceTools, UserInterfaceToolsPromptDialogOptions, client_id, number_bytes, number_days, number_gigabytes, number_hours, number_integer, number_kilobytes, number_likeness, number_megabytes, number_miliseconds, number_minutes, number_months, number_negative, number_percent, number_positive, number_seconds, number_terabytes, number_weeks, number_years, string_attribute, string_attribute_value_scope, string_business_category_name, string_char, string_char_emoji, string_chat_prompt, string_color, string_completion_prompt, string_css, string_css_class, string_css_property, string_css_selector, string_css_value, 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_license_token, string_markdown, string_markdown_text, string_mime_type, string_mime_type_with_wildcard, string_model_name, string_name, string_page, string_password, string_person_fullname, string_person_profile, string_pgp_key, string_prompt, string_protocol, string_ptbk_url, string_ptbk_url_with_hashtemplate, string_script, string_sha256, string_ssh_key, string_svg, string_tdl, string_template, string_text_prompt, string_title, string_token, string_translate_language, string_translate_name, string_translate_name_not_normalized, string_uri, string_uri_part, string_uriid, string_url, string_url_image, string_version, string_version_dependency, string_xml, };
21
+ import { FromtoItems } from '../utils/FromtoItems';
22
+ export { CommonExecutionToolsOptions, EXPECTATION_UNITS, ExecutionReportJson, ExecutionTools, ExecutionType, ExpectationAmount, ExpectationUnit, FromtoItems, ILicense, IPersonProfile, IRepository, ModelRequirements, ModelVariant, NaturalExecutionTools, Parameters, Prompt, PromptChatResult, PromptCommonResult, PromptCompletionResult, PromptResult, PromptTemplateJson, PromptTemplateParameterJson, PromptTemplatePipelineJson, PromptTemplatePipelineString, PtpExecutor, ScriptExecutionTools, ScriptExecutionToolsExecuteOptions, ScriptLanguage, TaskProgress, UserInterfaceTools, UserInterfaceToolsPromptDialogOptions, client_id, number_bytes, number_days, number_gigabytes, number_hours, number_integer, number_kilobytes, number_likeness, number_megabytes, number_miliseconds, number_minutes, number_months, number_negative, number_percent, number_positive, number_seconds, number_terabytes, number_weeks, number_years, string_attribute, string_attribute_value_scope, string_business_category_name, string_char, string_char_emoji, string_chat_prompt, string_color, string_completion_prompt, string_css, string_css_class, string_css_property, string_css_selector, string_css_value, 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_license_token, string_markdown, string_markdown_text, string_mime_type, string_mime_type_with_wildcard, string_model_name, string_name, string_page, string_password, string_person_fullname, string_person_profile, string_pgp_key, string_prompt, string_protocol, string_ptbk_url, string_ptbk_url_with_hashtemplate, string_script, string_sha256, string_ssh_key, string_svg, string_tdl, string_template, string_text_prompt, string_title, string_token, string_translate_language, string_translate_name, string_translate_name_not_normalized, string_uri, string_uri_part, string_uriid, string_url, string_url_image, string_version, string_version_dependency, string_xml, };
22
23
  /**
23
24
  * TODO: !!! Filter out all the types that are not used in the library
24
25
  */
@@ -1,4 +1,5 @@
1
1
  import { assertsExecutionSuccessful } from '../execution/assertsExecutionSuccessful';
2
+ import { ExecutionReportStringOptions, ExecutionReportStringOptionsDefaults } from '../types/execution-report/ExecutionReportStringOptions';
2
3
  import { executionReportJsonToString } from '../types/execution-report/executionReportJsonToString';
3
4
  import { EMOJIS, EMOJIS_IN_CATEGORIES } from '../utils/emojis';
4
5
  import { CountUtils } from '../utils/expectation-counters';
@@ -20,4 +21,8 @@ import { removeQuotes } from '../utils/removeQuotes';
20
21
  import { trimCodeBlock } from '../utils/trimCodeBlock';
21
22
  import { trimEndOfCodeBlock } from '../utils/trimEndOfCodeBlock';
22
23
  import { unwrapResult } from '../utils/unwrapResult';
23
- export { CountUtils, EMOJIS, EMOJIS_IN_CATEGORIES, assertsExecutionSuccessful, countCharacters, countLines, countPages, countParagraphs, countSentences, countWords, executionReportJsonToString, extractAllBlocksFromMarkdown, extractAllListItemsFromMarkdown, extractOneBlockFromMarkdown, isValidJsonString, parseNumber, removeContentComments, removeEmojis, removeMarkdownFormatting, removeQuotes, trimCodeBlock, trimEndOfCodeBlock, unwrapResult, };
24
+ export { CountUtils, EMOJIS, EMOJIS_IN_CATEGORIES, ExecutionReportStringOptions, ExecutionReportStringOptionsDefaults, assertsExecutionSuccessful, countCharacters, countLines, countPages, countParagraphs, countSentences, countWords, executionReportJsonToString, extractAllBlocksFromMarkdown, extractAllListItemsFromMarkdown, extractOneBlockFromMarkdown, isValidJsonString, parseNumber, removeContentComments, removeEmojis, removeMarkdownFormatting, removeQuotes, trimCodeBlock, trimEndOfCodeBlock, unwrapResult, };
25
+ /**
26
+ * TODO: !!!! prune utils in 32
27
+ * TODO: [🧠] Maybe create some indipendent package like `markdown-tools` from both here exported and @private utilities
28
+ */
@@ -1,9 +1,4 @@
1
1
  import { ModelRequirements } from './types/ModelRequirements';
2
- import { string_version } from './types/typeAliases';
3
- /**
4
- * The version of the PTP
5
- */
6
- export declare const PTBK_VERSION: string_version;
7
2
  /**
8
3
  * Default model requirements for the pipeline
9
4
  *
@@ -0,0 +1,13 @@
1
+ import { number_percent } from '../typeAliases';
2
+ export type ExecutionReportStringOptions = {
3
+ taxRate: number_percent;
4
+ chartsWidth: number;
5
+ };
6
+ export declare const ExecutionReportStringOptionsDefaults: {
7
+ taxRate: number;
8
+ chartsWidth: number;
9
+ };
10
+ /**
11
+ *
12
+ * !!! Annotate
13
+ */
@@ -0,0 +1,8 @@
1
+ /**
2
+ * The thresholds for the relative time in the `moment` library.
3
+ *
4
+ * @see https://momentjscom.readthedocs.io/en/latest/moment/07-customization/13-relative-time-threshold/
5
+ */
6
+ export declare const MOMENT_ARG_THRESHOLDS: {
7
+ readonly ss: 3;
8
+ };
@@ -0,0 +1,7 @@
1
+ import { FromtoItems } from '../../utils/FromtoItems';
2
+ /**
3
+ * Count the duration of working time
4
+ *
5
+ * @private within the library
6
+ */
7
+ export declare function countWorkingDuration(items: FromtoItems): number;
@@ -1,6 +1,10 @@
1
1
  import type { ExecutionReportJson } from './ExecutionReportJson';
2
2
  import type { ExecutionReportString } from './ExecutionReportString';
3
+ import type { ExecutionReportStringOptions } from './ExecutionReportStringOptions';
3
4
  /**
4
5
  * Converts execution report from JSON to string format
5
6
  */
6
- export declare function executionReportJsonToString(executionReportJson: ExecutionReportJson): ExecutionReportString;
7
+ export declare function executionReportJsonToString(executionReportJson: ExecutionReportJson, options?: Partial<ExecutionReportStringOptions>): ExecutionReportString;
8
+ /**
9
+ * TODO: [🧠] Allow to filter out some parts of the report by options
10
+ */
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Represents items which are compared to each other
3
+ */
4
+ export type FromtoItems = Array<{
5
+ /**
6
+ * The title of the item
7
+ */
8
+ title: string;
9
+ /**
10
+ * The start of the item
11
+ *
12
+ * This can mean anything, like seconds, milliseconds, dollars, etc.
13
+ */
14
+ from: number;
15
+ /**
16
+ * The end of the item
17
+ */
18
+ to: number;
19
+ }>;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Format either small or big number
3
+ *
4
+ * @private within the library
5
+ */
6
+ export declare function formatNumber(value: number): string;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,37 @@
1
+ import { string_markdown } from '../../types/typeAliases';
2
+ import { FromtoItems } from '../FromtoItems';
3
+ /**
4
+ * Options for creating a markdown chart
5
+ */
6
+ /**
7
+ * Options for creating a markdown chart.
8
+ */
9
+ type CreateMarkdownChartOptions = {
10
+ /**
11
+ * The header for the first column - the name of the item
12
+ */
13
+ nameHeader: string;
14
+ /**
15
+ * The header for the second column - the value of the item
16
+ */
17
+ valueHeader: string;
18
+ /**
19
+ * The items to be charted
20
+ */
21
+ items: FromtoItems;
22
+ /**
23
+ * The width of the chart in squares
24
+ */
25
+ width: number;
26
+ /**
27
+ * The name of the unit shown in the chart
28
+ */
29
+ unitName: string;
30
+ };
31
+ /**
32
+ * Function createMarkdownChart will draw a chart in markdown from ⬛+🟦 tiles
33
+ *
34
+ * @private within the library
35
+ */
36
+ export declare function createMarkdownChart(options: CreateMarkdownChartOptions): string_markdown;
37
+ export {};
@@ -0,0 +1,7 @@
1
+ import { string_markdown, string_markdown_text } from '../../types/typeAliases';
2
+ /**
3
+ * Create a markdown table from a 2D array of strings
4
+ *
5
+ * @private within the library
6
+ */
7
+ export declare function createMarkdownTable(table: Array<Array<string_markdown_text>>): string_markdown;
@@ -0,0 +1,5 @@
1
+ import type { string_version } from './types/typeAliases';
2
+ /**
3
+ * The version of the Promptbook library
4
+ */
5
+ export declare const PTBK_VERSION: string_version;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@promptbook/openai",
3
- "version": "0.31.0-9",
3
+ "version": "0.31.0",
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.31.0-9"
40
+ "@promptbook/core": "0.31.0"
41
41
  },
42
42
  "main": "./umd/index.umd.js",
43
43
  "module": "./esm/index.es.js",
@@ -1,5 +1,5 @@
1
1
  import { PromptTemplatePipelineLibrary } from '../classes/PromptTemplatePipelineLibrary';
2
- import { PTBK_VERSION } from '../config';
2
+ import { PTBK_VERSION } from '../version';
3
3
  import { promptTemplatePipelineStringToJson } from '../conversion/promptTemplatePipelineStringToJson';
4
4
  import { validatePromptTemplatePipelineJson } from '../conversion/validatePromptTemplatePipelineJson';
5
5
  import { createPtpExecutor } from '../execution/createPtpExecutor';
@@ -18,7 +18,8 @@ import type { TaskProgress } from '../types/TaskProgress';
18
18
  import type { ExecutionReportJson } from '../types/execution-report/ExecutionReportJson';
19
19
  import type { string_char_emoji } from '../types/typeAliasEmoji';
20
20
  import type { ILicense, IPersonProfile, IRepository, client_id, number_bytes, number_days, number_gigabytes, number_hours, number_integer, number_kilobytes, number_likeness, number_megabytes, number_miliseconds, number_minutes, number_months, number_negative, number_percent, number_positive, number_seconds, number_terabytes, number_weeks, number_years, string_attribute, string_attribute_value_scope, string_business_category_name, string_char, string_chat_prompt, string_color, string_completion_prompt, string_css, string_css_class, string_css_property, string_css_selector, string_css_value, 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_license_token, string_markdown, string_markdown_text, string_mime_type, string_mime_type_with_wildcard, string_model_name, string_name, string_page, string_password, string_person_fullname, string_person_profile, string_pgp_key, string_prompt, string_protocol, string_ptbk_url, string_ptbk_url_with_hashtemplate, string_script, string_sha256, string_ssh_key, string_svg, string_tdl, string_template, string_text_prompt, string_title, string_token, string_translate_language, string_translate_name, string_translate_name_not_normalized, string_uri, string_uri_part, string_uriid, string_url, string_url_image, string_version, string_version_dependency, string_xml } from '../types/typeAliases';
21
- export { CommonExecutionToolsOptions, EXPECTATION_UNITS, ExecutionReportJson, ExecutionTools, ExecutionType, ExpectationAmount, ExpectationUnit, ILicense, IPersonProfile, IRepository, ModelRequirements, ModelVariant, NaturalExecutionTools, Parameters, Prompt, PromptChatResult, PromptCommonResult, PromptCompletionResult, PromptResult, PromptTemplateJson, PromptTemplateParameterJson, PromptTemplatePipelineJson, PromptTemplatePipelineString, PtpExecutor, ScriptExecutionTools, ScriptExecutionToolsExecuteOptions, ScriptLanguage, TaskProgress, UserInterfaceTools, UserInterfaceToolsPromptDialogOptions, client_id, number_bytes, number_days, number_gigabytes, number_hours, number_integer, number_kilobytes, number_likeness, number_megabytes, number_miliseconds, number_minutes, number_months, number_negative, number_percent, number_positive, number_seconds, number_terabytes, number_weeks, number_years, string_attribute, string_attribute_value_scope, string_business_category_name, string_char, string_char_emoji, string_chat_prompt, string_color, string_completion_prompt, string_css, string_css_class, string_css_property, string_css_selector, string_css_value, 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_license_token, string_markdown, string_markdown_text, string_mime_type, string_mime_type_with_wildcard, string_model_name, string_name, string_page, string_password, string_person_fullname, string_person_profile, string_pgp_key, string_prompt, string_protocol, string_ptbk_url, string_ptbk_url_with_hashtemplate, string_script, string_sha256, string_ssh_key, string_svg, string_tdl, string_template, string_text_prompt, string_title, string_token, string_translate_language, string_translate_name, string_translate_name_not_normalized, string_uri, string_uri_part, string_uriid, string_url, string_url_image, string_version, string_version_dependency, string_xml, };
21
+ import { FromtoItems } from '../utils/FromtoItems';
22
+ export { CommonExecutionToolsOptions, EXPECTATION_UNITS, ExecutionReportJson, ExecutionTools, ExecutionType, ExpectationAmount, ExpectationUnit, FromtoItems, ILicense, IPersonProfile, IRepository, ModelRequirements, ModelVariant, NaturalExecutionTools, Parameters, Prompt, PromptChatResult, PromptCommonResult, PromptCompletionResult, PromptResult, PromptTemplateJson, PromptTemplateParameterJson, PromptTemplatePipelineJson, PromptTemplatePipelineString, PtpExecutor, ScriptExecutionTools, ScriptExecutionToolsExecuteOptions, ScriptLanguage, TaskProgress, UserInterfaceTools, UserInterfaceToolsPromptDialogOptions, client_id, number_bytes, number_days, number_gigabytes, number_hours, number_integer, number_kilobytes, number_likeness, number_megabytes, number_miliseconds, number_minutes, number_months, number_negative, number_percent, number_positive, number_seconds, number_terabytes, number_weeks, number_years, string_attribute, string_attribute_value_scope, string_business_category_name, string_char, string_char_emoji, string_chat_prompt, string_color, string_completion_prompt, string_css, string_css_class, string_css_property, string_css_selector, string_css_value, 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_license_token, string_markdown, string_markdown_text, string_mime_type, string_mime_type_with_wildcard, string_model_name, string_name, string_page, string_password, string_person_fullname, string_person_profile, string_pgp_key, string_prompt, string_protocol, string_ptbk_url, string_ptbk_url_with_hashtemplate, string_script, string_sha256, string_ssh_key, string_svg, string_tdl, string_template, string_text_prompt, string_title, string_token, string_translate_language, string_translate_name, string_translate_name_not_normalized, string_uri, string_uri_part, string_uriid, string_url, string_url_image, string_version, string_version_dependency, string_xml, };
22
23
  /**
23
24
  * TODO: !!! Filter out all the types that are not used in the library
24
25
  */
@@ -1,4 +1,5 @@
1
1
  import { assertsExecutionSuccessful } from '../execution/assertsExecutionSuccessful';
2
+ import { ExecutionReportStringOptions, ExecutionReportStringOptionsDefaults } from '../types/execution-report/ExecutionReportStringOptions';
2
3
  import { executionReportJsonToString } from '../types/execution-report/executionReportJsonToString';
3
4
  import { EMOJIS, EMOJIS_IN_CATEGORIES } from '../utils/emojis';
4
5
  import { CountUtils } from '../utils/expectation-counters';
@@ -20,4 +21,8 @@ import { removeQuotes } from '../utils/removeQuotes';
20
21
  import { trimCodeBlock } from '../utils/trimCodeBlock';
21
22
  import { trimEndOfCodeBlock } from '../utils/trimEndOfCodeBlock';
22
23
  import { unwrapResult } from '../utils/unwrapResult';
23
- export { CountUtils, EMOJIS, EMOJIS_IN_CATEGORIES, assertsExecutionSuccessful, countCharacters, countLines, countPages, countParagraphs, countSentences, countWords, executionReportJsonToString, extractAllBlocksFromMarkdown, extractAllListItemsFromMarkdown, extractOneBlockFromMarkdown, isValidJsonString, parseNumber, removeContentComments, removeEmojis, removeMarkdownFormatting, removeQuotes, trimCodeBlock, trimEndOfCodeBlock, unwrapResult, };
24
+ export { CountUtils, EMOJIS, EMOJIS_IN_CATEGORIES, ExecutionReportStringOptions, ExecutionReportStringOptionsDefaults, assertsExecutionSuccessful, countCharacters, countLines, countPages, countParagraphs, countSentences, countWords, executionReportJsonToString, extractAllBlocksFromMarkdown, extractAllListItemsFromMarkdown, extractOneBlockFromMarkdown, isValidJsonString, parseNumber, removeContentComments, removeEmojis, removeMarkdownFormatting, removeQuotes, trimCodeBlock, trimEndOfCodeBlock, unwrapResult, };
25
+ /**
26
+ * TODO: !!!! prune utils in 32
27
+ * TODO: [🧠] Maybe create some indipendent package like `markdown-tools` from both here exported and @private utilities
28
+ */
@@ -1,9 +1,4 @@
1
1
  import { ModelRequirements } from './types/ModelRequirements';
2
- import { string_version } from './types/typeAliases';
3
- /**
4
- * The version of the PTP
5
- */
6
- export declare const PTBK_VERSION: string_version;
7
2
  /**
8
3
  * Default model requirements for the pipeline
9
4
  *
@@ -0,0 +1,13 @@
1
+ import { number_percent } from '../typeAliases';
2
+ export type ExecutionReportStringOptions = {
3
+ taxRate: number_percent;
4
+ chartsWidth: number;
5
+ };
6
+ export declare const ExecutionReportStringOptionsDefaults: {
7
+ taxRate: number;
8
+ chartsWidth: number;
9
+ };
10
+ /**
11
+ *
12
+ * !!! Annotate
13
+ */
@@ -0,0 +1,8 @@
1
+ /**
2
+ * The thresholds for the relative time in the `moment` library.
3
+ *
4
+ * @see https://momentjscom.readthedocs.io/en/latest/moment/07-customization/13-relative-time-threshold/
5
+ */
6
+ export declare const MOMENT_ARG_THRESHOLDS: {
7
+ readonly ss: 3;
8
+ };
@@ -0,0 +1,7 @@
1
+ import { FromtoItems } from '../../utils/FromtoItems';
2
+ /**
3
+ * Count the duration of working time
4
+ *
5
+ * @private within the library
6
+ */
7
+ export declare function countWorkingDuration(items: FromtoItems): number;
@@ -1,6 +1,10 @@
1
1
  import type { ExecutionReportJson } from './ExecutionReportJson';
2
2
  import type { ExecutionReportString } from './ExecutionReportString';
3
+ import type { ExecutionReportStringOptions } from './ExecutionReportStringOptions';
3
4
  /**
4
5
  * Converts execution report from JSON to string format
5
6
  */
6
- export declare function executionReportJsonToString(executionReportJson: ExecutionReportJson): ExecutionReportString;
7
+ export declare function executionReportJsonToString(executionReportJson: ExecutionReportJson, options?: Partial<ExecutionReportStringOptions>): ExecutionReportString;
8
+ /**
9
+ * TODO: [🧠] Allow to filter out some parts of the report by options
10
+ */
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Represents items which are compared to each other
3
+ */
4
+ export type FromtoItems = Array<{
5
+ /**
6
+ * The title of the item
7
+ */
8
+ title: string;
9
+ /**
10
+ * The start of the item
11
+ *
12
+ * This can mean anything, like seconds, milliseconds, dollars, etc.
13
+ */
14
+ from: number;
15
+ /**
16
+ * The end of the item
17
+ */
18
+ to: number;
19
+ }>;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Format either small or big number
3
+ *
4
+ * @private within the library
5
+ */
6
+ export declare function formatNumber(value: number): string;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,37 @@
1
+ import { string_markdown } from '../../types/typeAliases';
2
+ import { FromtoItems } from '../FromtoItems';
3
+ /**
4
+ * Options for creating a markdown chart
5
+ */
6
+ /**
7
+ * Options for creating a markdown chart.
8
+ */
9
+ type CreateMarkdownChartOptions = {
10
+ /**
11
+ * The header for the first column - the name of the item
12
+ */
13
+ nameHeader: string;
14
+ /**
15
+ * The header for the second column - the value of the item
16
+ */
17
+ valueHeader: string;
18
+ /**
19
+ * The items to be charted
20
+ */
21
+ items: FromtoItems;
22
+ /**
23
+ * The width of the chart in squares
24
+ */
25
+ width: number;
26
+ /**
27
+ * The name of the unit shown in the chart
28
+ */
29
+ unitName: string;
30
+ };
31
+ /**
32
+ * Function createMarkdownChart will draw a chart in markdown from ⬛+🟦 tiles
33
+ *
34
+ * @private within the library
35
+ */
36
+ export declare function createMarkdownChart(options: CreateMarkdownChartOptions): string_markdown;
37
+ export {};
@@ -0,0 +1,7 @@
1
+ import { string_markdown, string_markdown_text } from '../../types/typeAliases';
2
+ /**
3
+ * Create a markdown table from a 2D array of strings
4
+ *
5
+ * @private within the library
6
+ */
7
+ export declare function createMarkdownTable(table: Array<Array<string_markdown_text>>): string_markdown;
@@ -0,0 +1,5 @@
1
+ import type { string_version } from './types/typeAliases';
2
+ /**
3
+ * The version of the Promptbook library
4
+ */
5
+ export declare const PTBK_VERSION: string_version;