@promptbook/openai 0.61.0-25 → 0.61.0-26
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/index.es.js +1 -1
- package/esm/typings/src/_packages/utils.index.d.ts +4 -4
- package/esm/typings/src/conversion/utils/{extractParametersFromPromptTemplate.d.ts → extractParameterNamesFromPromptTemplate.d.ts} +1 -1
- package/esm/typings/src/types/PipelineJson/PipelineJson.d.ts +1 -1
- package/esm/typings/src/utils/{extractParameters.d.ts → extractParameterNames.d.ts} +2 -2
- package/package.json +2 -2
- package/umd/index.umd.js +1 -1
- package/umd/typings/src/_packages/utils.index.d.ts +4 -4
- package/umd/typings/src/conversion/utils/{extractParametersFromPromptTemplate.d.ts → extractParameterNamesFromPromptTemplate.d.ts} +1 -1
- package/umd/typings/src/types/PipelineJson/PipelineJson.d.ts +1 -1
- package/umd/typings/src/utils/{extractParameters.d.ts → extractParameterNames.d.ts} +2 -2
- /package/esm/typings/src/conversion/utils/{extractParametersFromPromptTemplate.test.d.ts → extractParameterNamesFromPromptTemplate.test.d.ts} +0 -0
- /package/esm/typings/src/utils/{extractParameters.test.d.ts → extractParameterNames.test.d.ts} +0 -0
- /package/umd/typings/src/conversion/utils/{extractParametersFromPromptTemplate.test.d.ts → extractParameterNamesFromPromptTemplate.test.d.ts} +0 -0
- /package/umd/typings/src/utils/{extractParameters.test.d.ts → extractParameterNames.test.d.ts} +0 -0
package/esm/index.es.js
CHANGED
|
@@ -1358,7 +1358,7 @@ var OpenAiExecutionTools = /** @class */ (function () {
|
|
|
1358
1358
|
/**
|
|
1359
1359
|
* The version of the Promptbook library
|
|
1360
1360
|
*/
|
|
1361
|
-
var PROMPTBOOK_VERSION = '0.61.0-
|
|
1361
|
+
var PROMPTBOOK_VERSION = '0.61.0-25';
|
|
1362
1362
|
// TODO: !!!! List here all the versions and annotate + put into script
|
|
1363
1363
|
|
|
1364
1364
|
export { OPENAI_MODELS, OpenAiExecutionTools, PROMPTBOOK_VERSION };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { spaceTrim } from 'spacetrim';
|
|
2
2
|
import { renderPromptbookMermaid } from '../conversion/prettify/renderPipelineMermaidOptions';
|
|
3
|
-
import {
|
|
3
|
+
import { extractParameterNamesFromPromptTemplate } from '../conversion/utils/extractParameterNamesFromPromptTemplate';
|
|
4
4
|
import { extractVariables } from '../conversion/utils/extractVariables';
|
|
5
5
|
import { renameParameter } from '../conversion/utils/renameParameter';
|
|
6
6
|
import { titleToName } from '../conversion/utils/titleToName';
|
|
@@ -15,7 +15,7 @@ import { countParagraphs } from '../utils/expectation-counters/countParagraphs';
|
|
|
15
15
|
import { countSentences, splitIntoSentences } from '../utils/expectation-counters/countSentences';
|
|
16
16
|
import { countWords } from '../utils/expectation-counters/countWords';
|
|
17
17
|
import { CountUtils } from '../utils/expectation-counters/index';
|
|
18
|
-
import {
|
|
18
|
+
import { extractParameterNames } from '../utils/extractParameterNames';
|
|
19
19
|
import { DIACRITIC_VARIANTS_LETTERS } from '../utils/normalization/DIACRITIC_VARIANTS_LETTERS';
|
|
20
20
|
import type { IKeywords, string_keyword } from '../utils/normalization/IKeywords';
|
|
21
21
|
import { capitalize } from '../utils/normalization/capitalize';
|
|
@@ -55,7 +55,7 @@ import { isValidUrl } from '../utils/validators/url/isValidUrl';
|
|
|
55
55
|
import { isValidUuid } from '../utils/validators/uuid/isValidUuid';
|
|
56
56
|
import { PROMPTBOOK_VERSION } from '../version';
|
|
57
57
|
export { forEachAsync, PROMPTBOOK_VERSION };
|
|
58
|
-
export {
|
|
58
|
+
export { extractParameterNames, extractVariables, replaceParameters, spaceTrim };
|
|
59
59
|
export { $currentDate, $randomSeed, extractBlock, // <- [🌻] + maybe export through `@promptbook/markdown-utils`
|
|
60
60
|
isHostnameOnPrivateNetwork, isUrlOnPrivateNetwork, isValidFilePath, isValidJavascriptName, isValidJsonString, isValidPipelineUrl, isValidPromptbookVersion, isValidSemanticVersion, isValidUrl, isValidUuid, parseNumber, // <- [🌻]
|
|
61
61
|
removeEmojis, removeQuotes, trimCodeBlock, trimEndOfCodeBlock, unwrapResult, };
|
|
@@ -70,7 +70,7 @@ export declare const normalizeTo: {
|
|
|
70
70
|
};
|
|
71
71
|
export { capitalize, decapitalize, DIACRITIC_VARIANTS_LETTERS, IKeywords, isValidKeyword, nameToUriPart, nameToUriParts, normalizeTo_camelCase, normalizeTo_PascalCase, normalizeTo_SCREAMING_CASE, normalizeTo_snake_case, normalizeToKebabCase, normalizeWhitespaces, parseKeywords, parseKeywordsFromString, removeDiacritics, searchKeywords, string_keyword, titleToName, };
|
|
72
72
|
export type { string_camelCase, string_kebab_case, string_PascalCase, string_SCREAMING_CASE, string_snake_case };
|
|
73
|
-
export {
|
|
73
|
+
export { extractParameterNamesFromPromptTemplate, renameParameter, renderPromptbookMermaid };
|
|
74
74
|
export { difference, intersection, union };
|
|
75
75
|
/**
|
|
76
76
|
* Note: [🕙] It does not make sence to have simple lower / UPPER case normalization
|
|
@@ -7,7 +7,7 @@ import type { string_parameter_name } from '../../types/typeAliases';
|
|
|
7
7
|
* @returns the set of parameter names
|
|
8
8
|
* @throws {ParsingError} if the script is invalid
|
|
9
9
|
*/
|
|
10
|
-
export declare function
|
|
10
|
+
export declare function extractParameterNamesFromPromptTemplate(promptTemplate: Pick<PromptTemplateJson, 'title' | 'description' | 'blockType' | 'content' | 'preparedContent' | 'jokerParameterNames'>): Set<string_parameter_name>;
|
|
11
11
|
/**
|
|
12
12
|
* TODO: [🔣] If script require contentLanguage
|
|
13
13
|
*/
|
|
@@ -81,7 +81,7 @@ export type PipelineJson = {
|
|
|
81
81
|
/**
|
|
82
82
|
* TODO: [🍙] Make some standart order of json properties
|
|
83
83
|
* TODO: [🧠] Maybe wrap all {parameterNames} in brackets for example { "resultingParameterName": "{foo}" }
|
|
84
|
-
* Note: There was a proposal for multiple types of promptbook objects 78816ff33e2705ee1a187aa2eb8affd976d4ea1a
|
|
84
|
+
* Note: [💼] There was a proposal for multiple types of promptbook objects 78816ff33e2705ee1a187aa2eb8affd976d4ea1a
|
|
85
85
|
* But then immediately reverted back to the single type
|
|
86
86
|
* With knowledge as part of the promptbook and collection just as a collection of promptbooks
|
|
87
87
|
*/
|
|
@@ -6,7 +6,7 @@ import type { string_template } from '../types/typeAliases';
|
|
|
6
6
|
* @param template the template with parameters in {curly} braces
|
|
7
7
|
* @returns the list of parameter names
|
|
8
8
|
*/
|
|
9
|
-
export declare function
|
|
9
|
+
export declare function extractParameterNames(template: string_template): Set<string_parameter_name>;
|
|
10
10
|
/**
|
|
11
11
|
* TODO: !!!!! Rename to extractParameterNames
|
|
12
|
-
*/
|
|
12
|
+
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@promptbook/openai",
|
|
3
|
-
"version": "0.61.0-
|
|
3
|
+
"version": "0.61.0-26",
|
|
4
4
|
"description": "Supercharge your use of large language models",
|
|
5
5
|
"private": false,
|
|
6
6
|
"sideEffects": false,
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
}
|
|
50
50
|
],
|
|
51
51
|
"peerDependencies": {
|
|
52
|
-
"@promptbook/core": "0.61.0-
|
|
52
|
+
"@promptbook/core": "0.61.0-26"
|
|
53
53
|
},
|
|
54
54
|
"main": "./umd/index.umd.js",
|
|
55
55
|
"module": "./esm/index.es.js",
|
package/umd/index.umd.js
CHANGED
|
@@ -1366,7 +1366,7 @@
|
|
|
1366
1366
|
/**
|
|
1367
1367
|
* The version of the Promptbook library
|
|
1368
1368
|
*/
|
|
1369
|
-
var PROMPTBOOK_VERSION = '0.61.0-
|
|
1369
|
+
var PROMPTBOOK_VERSION = '0.61.0-25';
|
|
1370
1370
|
// TODO: !!!! List here all the versions and annotate + put into script
|
|
1371
1371
|
|
|
1372
1372
|
exports.OPENAI_MODELS = OPENAI_MODELS;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { spaceTrim } from 'spacetrim';
|
|
2
2
|
import { renderPromptbookMermaid } from '../conversion/prettify/renderPipelineMermaidOptions';
|
|
3
|
-
import {
|
|
3
|
+
import { extractParameterNamesFromPromptTemplate } from '../conversion/utils/extractParameterNamesFromPromptTemplate';
|
|
4
4
|
import { extractVariables } from '../conversion/utils/extractVariables';
|
|
5
5
|
import { renameParameter } from '../conversion/utils/renameParameter';
|
|
6
6
|
import { titleToName } from '../conversion/utils/titleToName';
|
|
@@ -15,7 +15,7 @@ import { countParagraphs } from '../utils/expectation-counters/countParagraphs';
|
|
|
15
15
|
import { countSentences, splitIntoSentences } from '../utils/expectation-counters/countSentences';
|
|
16
16
|
import { countWords } from '../utils/expectation-counters/countWords';
|
|
17
17
|
import { CountUtils } from '../utils/expectation-counters/index';
|
|
18
|
-
import {
|
|
18
|
+
import { extractParameterNames } from '../utils/extractParameterNames';
|
|
19
19
|
import { DIACRITIC_VARIANTS_LETTERS } from '../utils/normalization/DIACRITIC_VARIANTS_LETTERS';
|
|
20
20
|
import type { IKeywords, string_keyword } from '../utils/normalization/IKeywords';
|
|
21
21
|
import { capitalize } from '../utils/normalization/capitalize';
|
|
@@ -55,7 +55,7 @@ import { isValidUrl } from '../utils/validators/url/isValidUrl';
|
|
|
55
55
|
import { isValidUuid } from '../utils/validators/uuid/isValidUuid';
|
|
56
56
|
import { PROMPTBOOK_VERSION } from '../version';
|
|
57
57
|
export { forEachAsync, PROMPTBOOK_VERSION };
|
|
58
|
-
export {
|
|
58
|
+
export { extractParameterNames, extractVariables, replaceParameters, spaceTrim };
|
|
59
59
|
export { $currentDate, $randomSeed, extractBlock, // <- [🌻] + maybe export through `@promptbook/markdown-utils`
|
|
60
60
|
isHostnameOnPrivateNetwork, isUrlOnPrivateNetwork, isValidFilePath, isValidJavascriptName, isValidJsonString, isValidPipelineUrl, isValidPromptbookVersion, isValidSemanticVersion, isValidUrl, isValidUuid, parseNumber, // <- [🌻]
|
|
61
61
|
removeEmojis, removeQuotes, trimCodeBlock, trimEndOfCodeBlock, unwrapResult, };
|
|
@@ -70,7 +70,7 @@ export declare const normalizeTo: {
|
|
|
70
70
|
};
|
|
71
71
|
export { capitalize, decapitalize, DIACRITIC_VARIANTS_LETTERS, IKeywords, isValidKeyword, nameToUriPart, nameToUriParts, normalizeTo_camelCase, normalizeTo_PascalCase, normalizeTo_SCREAMING_CASE, normalizeTo_snake_case, normalizeToKebabCase, normalizeWhitespaces, parseKeywords, parseKeywordsFromString, removeDiacritics, searchKeywords, string_keyword, titleToName, };
|
|
72
72
|
export type { string_camelCase, string_kebab_case, string_PascalCase, string_SCREAMING_CASE, string_snake_case };
|
|
73
|
-
export {
|
|
73
|
+
export { extractParameterNamesFromPromptTemplate, renameParameter, renderPromptbookMermaid };
|
|
74
74
|
export { difference, intersection, union };
|
|
75
75
|
/**
|
|
76
76
|
* Note: [🕙] It does not make sence to have simple lower / UPPER case normalization
|
|
@@ -7,7 +7,7 @@ import type { string_parameter_name } from '../../types/typeAliases';
|
|
|
7
7
|
* @returns the set of parameter names
|
|
8
8
|
* @throws {ParsingError} if the script is invalid
|
|
9
9
|
*/
|
|
10
|
-
export declare function
|
|
10
|
+
export declare function extractParameterNamesFromPromptTemplate(promptTemplate: Pick<PromptTemplateJson, 'title' | 'description' | 'blockType' | 'content' | 'preparedContent' | 'jokerParameterNames'>): Set<string_parameter_name>;
|
|
11
11
|
/**
|
|
12
12
|
* TODO: [🔣] If script require contentLanguage
|
|
13
13
|
*/
|
|
@@ -81,7 +81,7 @@ export type PipelineJson = {
|
|
|
81
81
|
/**
|
|
82
82
|
* TODO: [🍙] Make some standart order of json properties
|
|
83
83
|
* TODO: [🧠] Maybe wrap all {parameterNames} in brackets for example { "resultingParameterName": "{foo}" }
|
|
84
|
-
* Note: There was a proposal for multiple types of promptbook objects 78816ff33e2705ee1a187aa2eb8affd976d4ea1a
|
|
84
|
+
* Note: [💼] There was a proposal for multiple types of promptbook objects 78816ff33e2705ee1a187aa2eb8affd976d4ea1a
|
|
85
85
|
* But then immediately reverted back to the single type
|
|
86
86
|
* With knowledge as part of the promptbook and collection just as a collection of promptbooks
|
|
87
87
|
*/
|
|
@@ -6,7 +6,7 @@ import type { string_template } from '../types/typeAliases';
|
|
|
6
6
|
* @param template the template with parameters in {curly} braces
|
|
7
7
|
* @returns the list of parameter names
|
|
8
8
|
*/
|
|
9
|
-
export declare function
|
|
9
|
+
export declare function extractParameterNames(template: string_template): Set<string_parameter_name>;
|
|
10
10
|
/**
|
|
11
11
|
* TODO: !!!!! Rename to extractParameterNames
|
|
12
|
-
*/
|
|
12
|
+
*/
|
|
File without changes
|
/package/esm/typings/src/utils/{extractParameters.test.d.ts → extractParameterNames.test.d.ts}
RENAMED
|
File without changes
|
|
File without changes
|
/package/umd/typings/src/utils/{extractParameters.test.d.ts → extractParameterNames.test.d.ts}
RENAMED
|
File without changes
|