@promptbook/openai 0.32.0-2 → 0.32.1

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.
@@ -1,7 +1,6 @@
1
1
  import { assertsExecutionSuccessful } from '../execution/assertsExecutionSuccessful';
2
2
  import { ExecutionReportStringOptions, ExecutionReportStringOptionsDefaults } from '../types/execution-report/ExecutionReportStringOptions';
3
3
  import { executionReportJsonToString } from '../types/execution-report/executionReportJsonToString';
4
- import { EMOJIS, EMOJIS_IN_CATEGORIES } from '../utils/emojis';
5
4
  import { CountUtils } from '../utils/expectation-counters';
6
5
  import { countCharacters } from '../utils/expectation-counters/countCharacters';
7
6
  import { countLines } from '../utils/expectation-counters/countLines';
@@ -21,8 +20,7 @@ import { removeQuotes } from '../utils/removeQuotes';
21
20
  import { trimCodeBlock } from '../utils/trimCodeBlock';
22
21
  import { trimEndOfCodeBlock } from '../utils/trimEndOfCodeBlock';
23
22
  import { unwrapResult } from '../utils/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, };
23
+ export { CountUtils, ExecutionReportStringOptions, ExecutionReportStringOptionsDefaults, assertsExecutionSuccessful, countCharacters, countLines, countPages, countParagraphs, countSentences, countWords, executionReportJsonToString, extractAllBlocksFromMarkdown, extractAllListItemsFromMarkdown, extractOneBlockFromMarkdown, isValidJsonString, parseNumber, removeContentComments, removeEmojis, removeMarkdownFormatting, removeQuotes, trimCodeBlock, trimEndOfCodeBlock, unwrapResult, };
25
24
  /**
26
- * TODO: !!!! prune utils in 32
27
25
  * TODO: [🧠] Maybe create some indipendent package like `markdown-tools` from both here exported and @private utilities
28
26
  */
@@ -1,13 +1,21 @@
1
1
  import { number_percent } from '../typeAliases';
2
+ /**
3
+ * Options for generating an execution report string
4
+ */
2
5
  export type ExecutionReportStringOptions = {
6
+ /**
7
+ * The tax rate to be applied, expressed as a percentage from 0 to 1 (=100%) or even more
8
+ */
3
9
  taxRate: number_percent;
10
+ /**
11
+ * The width of the charts in the report
12
+ */
4
13
  chartsWidth: number;
5
14
  };
15
+ /**
16
+ * Default options for generating an execution report string
17
+ */
6
18
  export declare const ExecutionReportStringOptionsDefaults: {
7
19
  taxRate: number;
8
20
  chartsWidth: number;
9
21
  };
10
- /**
11
- *
12
- * !!! Annotate
13
- */
@@ -4,11 +4,15 @@ import { string_char_emoji } from '../types/typeAliasEmoji';
4
4
  * Note: this will be needed to update annually - now updated at 2022-01-19
5
5
  *
6
6
  * @see https://getemoji.com/
7
+ *
8
+ * @private within the library
7
9
  */
8
10
  export declare const EMOJIS_IN_CATEGORIES: Record<string, Array<string_char_emoji>>;
9
11
  /**
10
12
  *
11
13
  * All possible emoji chars like "🍆", "🍡", "🍤"...
14
+ *
15
+ * @private within the library
12
16
  */
13
17
  export declare const EMOJIS: Set<string_char_emoji>;
14
18
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@promptbook/openai",
3
- "version": "0.32.0-2",
3
+ "version": "0.32.1",
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.32.0-2"
40
+ "@promptbook/core": "0.32.1"
41
41
  },
42
42
  "main": "./umd/index.umd.js",
43
43
  "module": "./esm/index.es.js",
@@ -1,7 +1,6 @@
1
1
  import { assertsExecutionSuccessful } from '../execution/assertsExecutionSuccessful';
2
2
  import { ExecutionReportStringOptions, ExecutionReportStringOptionsDefaults } from '../types/execution-report/ExecutionReportStringOptions';
3
3
  import { executionReportJsonToString } from '../types/execution-report/executionReportJsonToString';
4
- import { EMOJIS, EMOJIS_IN_CATEGORIES } from '../utils/emojis';
5
4
  import { CountUtils } from '../utils/expectation-counters';
6
5
  import { countCharacters } from '../utils/expectation-counters/countCharacters';
7
6
  import { countLines } from '../utils/expectation-counters/countLines';
@@ -21,8 +20,7 @@ import { removeQuotes } from '../utils/removeQuotes';
21
20
  import { trimCodeBlock } from '../utils/trimCodeBlock';
22
21
  import { trimEndOfCodeBlock } from '../utils/trimEndOfCodeBlock';
23
22
  import { unwrapResult } from '../utils/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, };
23
+ export { CountUtils, ExecutionReportStringOptions, ExecutionReportStringOptionsDefaults, assertsExecutionSuccessful, countCharacters, countLines, countPages, countParagraphs, countSentences, countWords, executionReportJsonToString, extractAllBlocksFromMarkdown, extractAllListItemsFromMarkdown, extractOneBlockFromMarkdown, isValidJsonString, parseNumber, removeContentComments, removeEmojis, removeMarkdownFormatting, removeQuotes, trimCodeBlock, trimEndOfCodeBlock, unwrapResult, };
25
24
  /**
26
- * TODO: !!!! prune utils in 32
27
25
  * TODO: [🧠] Maybe create some indipendent package like `markdown-tools` from both here exported and @private utilities
28
26
  */
@@ -1,13 +1,21 @@
1
1
  import { number_percent } from '../typeAliases';
2
+ /**
3
+ * Options for generating an execution report string
4
+ */
2
5
  export type ExecutionReportStringOptions = {
6
+ /**
7
+ * The tax rate to be applied, expressed as a percentage from 0 to 1 (=100%) or even more
8
+ */
3
9
  taxRate: number_percent;
10
+ /**
11
+ * The width of the charts in the report
12
+ */
4
13
  chartsWidth: number;
5
14
  };
15
+ /**
16
+ * Default options for generating an execution report string
17
+ */
6
18
  export declare const ExecutionReportStringOptionsDefaults: {
7
19
  taxRate: number;
8
20
  chartsWidth: number;
9
21
  };
10
- /**
11
- *
12
- * !!! Annotate
13
- */
@@ -4,11 +4,15 @@ import { string_char_emoji } from '../types/typeAliasEmoji';
4
4
  * Note: this will be needed to update annually - now updated at 2022-01-19
5
5
  *
6
6
  * @see https://getemoji.com/
7
+ *
8
+ * @private within the library
7
9
  */
8
10
  export declare const EMOJIS_IN_CATEGORIES: Record<string, Array<string_char_emoji>>;
9
11
  /**
10
12
  *
11
13
  * All possible emoji chars like "🍆", "🍡", "🍤"...
14
+ *
15
+ * @private within the library
12
16
  */
13
17
  export declare const EMOJIS: Set<string_char_emoji>;
14
18
  /**