@promptbook/openai 0.41.0 → 0.41.101

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,3 +1,5 @@
1
+ import { prettifyPromptbookString } from '../conversion/prettify/prettifyPromptbookString';
2
+ import { prettifyPromptbookStringCli } from '../conversion/prettify/prettifyPromptbookStringCli';
1
3
  import { parseNumber } from '../conversion/utils/parseNumber';
2
4
  import { assertsExecutionSuccessful } from '../execution/assertsExecutionSuccessful';
3
5
  import { ExecutionReportStringOptions, ExecutionReportStringOptionsDefaults } from '../types/execution-report/ExecutionReportStringOptions';
@@ -21,10 +23,16 @@ import { removeQuotes } from '../utils/removeQuotes';
21
23
  import { trimCodeBlock } from '../utils/trimCodeBlock';
22
24
  import { trimEndOfCodeBlock } from '../utils/trimEndOfCodeBlock';
23
25
  import { unwrapResult } from '../utils/unwrapResult';
24
- export { CountUtils, ExecutionReportStringOptions, ExecutionReportStringOptionsDefaults, assertsExecutionSuccessful, countCharacters, countLines, countPages, countParagraphs, countSentences, countWords, executionReportJsonToString, extractAllBlocksFromMarkdown, // <- [🌻]
25
- extractAllListItemsFromMarkdown, // <- [🌻]
26
- extractOneBlockFromMarkdown, // <- [🌻]
27
- extractBlock, isValidJsonString, parseNumber, removeContentComments, removeEmojis, removeMarkdownFormatting, removeQuotes, trimCodeBlock, trimEndOfCodeBlock, unwrapResult, };
26
+ /**
27
+ * Hidden utilities which should not be used by external consumers.
28
+ */
29
+ declare const __: {
30
+ prettifyPromptbookStringCli: typeof prettifyPromptbookStringCli;
31
+ };
32
+ export { __, assertsExecutionSuccessful, countCharacters, countLines, countPages, countParagraphs, countSentences, CountUtils, countWords, executionReportJsonToString, ExecutionReportStringOptions, ExecutionReportStringOptionsDefaults, extractAllBlocksFromMarkdown, // <- [🌻]
33
+ extractAllListItemsFromMarkdown, extractBlock, // <- [🌻]
34
+ extractOneBlockFromMarkdown, isValidJsonString, parseNumber, // <- [🌻]
35
+ prettifyPromptbookString, removeContentComments, removeEmojis, removeMarkdownFormatting, removeQuotes, trimCodeBlock, trimEndOfCodeBlock, unwrapResult, };
28
36
  /**
29
37
  * TODO: [🧠] Maybe create some indipendent package like `markdown-tools` from both here exported and @private utilities
30
38
  */
@@ -0,0 +1,7 @@
1
+ export type PrettifyOptions = {
2
+ isGraphAdded?: boolean;
3
+ isPrettifyed?: boolean;
4
+ };
5
+ /**
6
+ * TODO: !!! Annotate all
7
+ */
@@ -0,0 +1,11 @@
1
+ import { PromptbookString } from '../../types/PromptbookString';
2
+ import type { PrettifyOptions } from './PrettifyOptions';
3
+ /**
4
+ * !!!
5
+ */
6
+ export declare function prettifyPromptbookString(promptbookString: PromptbookString, options: PrettifyOptions): PromptbookString;
7
+ /**
8
+ * TODO: Maybe use some Mermaid library instead of string templating
9
+ * TODO: [🧠] Should this be here OR in other folder
10
+ * TODO: [🕌] When more than 2 functionalities, split into separate functions
11
+ */
@@ -0,0 +1,9 @@
1
+ /**
2
+ * !!! Initialize
3
+ */
4
+ export declare function prettifyPromptbookStringCli(): Promise<void>;
5
+ /**
6
+ * TODO: [🥠] Do not export to utils directly, its just for CLI script
7
+ * TODO: [🕌] When more functionalities, rename
8
+ * Note: 11:11
9
+ */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@promptbook/openai",
3
- "version": "0.41.0",
3
+ "version": "0.41.101",
4
4
  "description": "Library to supercharge your use of large language models",
5
5
  "private": false,
6
6
  "sideEffects": false,
@@ -38,7 +38,7 @@
38
38
  "openai": "4.2.0"
39
39
  },
40
40
  "peerDependencies": {
41
- "@promptbook/core": "0.41.0"
41
+ "@promptbook/core": "0.41.101"
42
42
  },
43
43
  "main": "./umd/index.umd.js",
44
44
  "module": "./esm/index.es.js",
@@ -1,3 +1,5 @@
1
+ import { prettifyPromptbookString } from '../conversion/prettify/prettifyPromptbookString';
2
+ import { prettifyPromptbookStringCli } from '../conversion/prettify/prettifyPromptbookStringCli';
1
3
  import { parseNumber } from '../conversion/utils/parseNumber';
2
4
  import { assertsExecutionSuccessful } from '../execution/assertsExecutionSuccessful';
3
5
  import { ExecutionReportStringOptions, ExecutionReportStringOptionsDefaults } from '../types/execution-report/ExecutionReportStringOptions';
@@ -21,10 +23,16 @@ import { removeQuotes } from '../utils/removeQuotes';
21
23
  import { trimCodeBlock } from '../utils/trimCodeBlock';
22
24
  import { trimEndOfCodeBlock } from '../utils/trimEndOfCodeBlock';
23
25
  import { unwrapResult } from '../utils/unwrapResult';
24
- export { CountUtils, ExecutionReportStringOptions, ExecutionReportStringOptionsDefaults, assertsExecutionSuccessful, countCharacters, countLines, countPages, countParagraphs, countSentences, countWords, executionReportJsonToString, extractAllBlocksFromMarkdown, // <- [🌻]
25
- extractAllListItemsFromMarkdown, // <- [🌻]
26
- extractOneBlockFromMarkdown, // <- [🌻]
27
- extractBlock, isValidJsonString, parseNumber, removeContentComments, removeEmojis, removeMarkdownFormatting, removeQuotes, trimCodeBlock, trimEndOfCodeBlock, unwrapResult, };
26
+ /**
27
+ * Hidden utilities which should not be used by external consumers.
28
+ */
29
+ declare const __: {
30
+ prettifyPromptbookStringCli: typeof prettifyPromptbookStringCli;
31
+ };
32
+ export { __, assertsExecutionSuccessful, countCharacters, countLines, countPages, countParagraphs, countSentences, CountUtils, countWords, executionReportJsonToString, ExecutionReportStringOptions, ExecutionReportStringOptionsDefaults, extractAllBlocksFromMarkdown, // <- [🌻]
33
+ extractAllListItemsFromMarkdown, extractBlock, // <- [🌻]
34
+ extractOneBlockFromMarkdown, isValidJsonString, parseNumber, // <- [🌻]
35
+ prettifyPromptbookString, removeContentComments, removeEmojis, removeMarkdownFormatting, removeQuotes, trimCodeBlock, trimEndOfCodeBlock, unwrapResult, };
28
36
  /**
29
37
  * TODO: [🧠] Maybe create some indipendent package like `markdown-tools` from both here exported and @private utilities
30
38
  */
@@ -0,0 +1,7 @@
1
+ export type PrettifyOptions = {
2
+ isGraphAdded?: boolean;
3
+ isPrettifyed?: boolean;
4
+ };
5
+ /**
6
+ * TODO: !!! Annotate all
7
+ */
@@ -0,0 +1,11 @@
1
+ import { PromptbookString } from '../../types/PromptbookString';
2
+ import type { PrettifyOptions } from './PrettifyOptions';
3
+ /**
4
+ * !!!
5
+ */
6
+ export declare function prettifyPromptbookString(promptbookString: PromptbookString, options: PrettifyOptions): PromptbookString;
7
+ /**
8
+ * TODO: Maybe use some Mermaid library instead of string templating
9
+ * TODO: [🧠] Should this be here OR in other folder
10
+ * TODO: [🕌] When more than 2 functionalities, split into separate functions
11
+ */
@@ -0,0 +1,9 @@
1
+ /**
2
+ * !!! Initialize
3
+ */
4
+ export declare function prettifyPromptbookStringCli(): Promise<void>;
5
+ /**
6
+ * TODO: [🥠] Do not export to utils directly, its just for CLI script
7
+ * TODO: [🕌] When more functionalities, rename
8
+ * Note: 11:11
9
+ */