@promptbook/openai 0.31.0-3 → 0.31.0-5

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.
@@ -17,8 +17,7 @@ import { removeMarkdownFormatting } from '../utils/markdown/removeMarkdownFormat
17
17
  import { parseNumber } from '../utils/parseNumber';
18
18
  import { removeEmojis } from '../utils/removeEmojis';
19
19
  import { removeQuotes } from '../utils/removeQuotes';
20
- import { replaceParameters } from '../utils/replaceParameters';
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, assertsExecutionSuccessful, countCharacters, countLines, countPages, countParagraphs, countSentences, countWords, executionReportJsonToString, extractAllBlocksFromMarkdown, extractAllListItemsFromMarkdown, extractOneBlockFromMarkdown, isValidJsonString, parseNumber, removeContentComments, removeEmojis, removeMarkdownFormatting, removeQuotes, replaceParameters, trimCodeBlock, trimEndOfCodeBlock, 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, };
@@ -4,5 +4,7 @@ import { string_name, string_template } from '../types/typeAliases';
4
4
  *
5
5
  * @param template the template with parameters in {curly} braces
6
6
  * @returns the list of parameter names
7
+ *
8
+ * @private within the library
7
9
  */
8
10
  export declare function extractParameters(template: string_template): Array<string_name>;
@@ -0,0 +1,10 @@
1
+ import { string_javascript, string_javascript_name } from '../types/typeAliases';
2
+ /**
3
+ * Parses the given script and returns the list of all used variables that are not defined in the script
4
+ *
5
+ * @param script from which to extract the variables
6
+ * @returns the list of variable names
7
+ *
8
+ * @private within the library
9
+ */
10
+ export declare function extractVariables(script: string_javascript): Array<string_javascript_name>;
@@ -0,0 +1 @@
1
+ export {};
@@ -6,5 +6,7 @@ import { Parameters } from '../types/Parameters';
6
6
  * @param template the template with parameters in {curly} braces
7
7
  * @param parameters the object with parameters
8
8
  * @returns the template with replaced parameters
9
+ *
10
+ * @private within the library
9
11
  */
10
12
  export declare function replaceParameters(template: string_template, parameters: Parameters): string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@promptbook/openai",
3
- "version": "0.31.0-3",
3
+ "version": "0.31.0-5",
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-3"
40
+ "@promptbook/core": "0.31.0-5"
41
41
  },
42
42
  "main": "./umd/index.umd.js",
43
43
  "module": "./esm/index.es.js",
@@ -17,8 +17,7 @@ import { removeMarkdownFormatting } from '../utils/markdown/removeMarkdownFormat
17
17
  import { parseNumber } from '../utils/parseNumber';
18
18
  import { removeEmojis } from '../utils/removeEmojis';
19
19
  import { removeQuotes } from '../utils/removeQuotes';
20
- import { replaceParameters } from '../utils/replaceParameters';
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, assertsExecutionSuccessful, countCharacters, countLines, countPages, countParagraphs, countSentences, countWords, executionReportJsonToString, extractAllBlocksFromMarkdown, extractAllListItemsFromMarkdown, extractOneBlockFromMarkdown, isValidJsonString, parseNumber, removeContentComments, removeEmojis, removeMarkdownFormatting, removeQuotes, replaceParameters, trimCodeBlock, trimEndOfCodeBlock, 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, };
@@ -4,5 +4,7 @@ import { string_name, string_template } from '../types/typeAliases';
4
4
  *
5
5
  * @param template the template with parameters in {curly} braces
6
6
  * @returns the list of parameter names
7
+ *
8
+ * @private within the library
7
9
  */
8
10
  export declare function extractParameters(template: string_template): Array<string_name>;
@@ -0,0 +1,10 @@
1
+ import { string_javascript, string_javascript_name } from '../types/typeAliases';
2
+ /**
3
+ * Parses the given script and returns the list of all used variables that are not defined in the script
4
+ *
5
+ * @param script from which to extract the variables
6
+ * @returns the list of variable names
7
+ *
8
+ * @private within the library
9
+ */
10
+ export declare function extractVariables(script: string_javascript): Array<string_javascript_name>;
@@ -0,0 +1 @@
1
+ export {};
@@ -6,5 +6,7 @@ import { Parameters } from '../types/Parameters';
6
6
  * @param template the template with parameters in {curly} braces
7
7
  * @param parameters the object with parameters
8
8
  * @returns the template with replaced parameters
9
+ *
10
+ * @private within the library
9
11
  */
10
12
  export declare function replaceParameters(template: string_template, parameters: Parameters): string;