@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.
- package/esm/typings/_packages/utils.index.d.ts +12 -4
- package/esm/typings/conversion/prettify/PrettifyOptions.d.ts +7 -0
- package/esm/typings/conversion/prettify/prettifyPromptbookString.d.ts +11 -0
- package/esm/typings/conversion/prettify/prettifyPromptbookStringCli.d.ts +9 -0
- package/package.json +2 -2
- package/umd/typings/_packages/utils.index.d.ts +12 -4
- package/umd/typings/conversion/prettify/PrettifyOptions.d.ts +7 -0
- package/umd/typings/conversion/prettify/prettifyPromptbookString.d.ts +11 -0
- package/umd/typings/conversion/prettify/prettifyPromptbookStringCli.d.ts +9 -0
|
@@ -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
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
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,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
|
+
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@promptbook/openai",
|
|
3
|
-
"version": "0.41.
|
|
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.
|
|
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
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
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,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
|
+
*/
|