@promptbook/cli 0.60.0-6 → 0.60.0-8
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/README.md +4 -4
- package/esm/index.es.js +6 -6
- package/esm/index.es.js.map +1 -1
- package/esm/typings/src/config.d.ts +1 -1
- package/esm/typings/src/conversion/utils/renameParameter.d.ts +4 -4
- package/package.json +4 -3
- package/umd/index.umd.js +6 -6
- package/umd/index.umd.js.map +1 -1
- package/umd/typings/src/config.d.ts +1 -1
- package/umd/typings/src/conversion/utils/renameParameter.d.ts +4 -4
|
@@ -7,6 +7,6 @@ export declare const LOOP_LIMIT = 1000;
|
|
|
7
7
|
*/
|
|
8
8
|
export declare const CHARACTER_LOOP_LIMIT = 100000;
|
|
9
9
|
/**
|
|
10
|
-
* The name of the builded pipeline collection made by CLI `
|
|
10
|
+
* The name of the builded pipeline collection made by CLI `ptbk make` and for lookup in `createCollectionFromDirectory`
|
|
11
11
|
*/
|
|
12
12
|
export declare const PIPELINE_COLLECTION_BASE_FILENAME = "index";
|
|
@@ -2,10 +2,10 @@ import type { PipelineJson } from '../../types/PipelineJson/PipelineJson';
|
|
|
2
2
|
import type { string_name } from '../../types/typeAliases';
|
|
3
3
|
type RenameParameterOptions = {
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
6
|
-
* This
|
|
5
|
+
* Pipeline to search and replace for parameters
|
|
6
|
+
* This pipeline is returned as copy with replaced parameters
|
|
7
7
|
*/
|
|
8
|
-
|
|
8
|
+
pipeline: PipelineJson;
|
|
9
9
|
/**
|
|
10
10
|
* Original parameter name that should be replaced
|
|
11
11
|
*/
|
|
@@ -19,7 +19,7 @@ type RenameParameterOptions = {
|
|
|
19
19
|
* Function renameParameter will find all usable parameters for given prompt template
|
|
20
20
|
* In other words, it will find all parameters that are not used in the prompt template itseld and all its dependencies
|
|
21
21
|
*
|
|
22
|
-
* @throws {PipelineLogicError} If the new parameter name is already used in the
|
|
22
|
+
* @throws {PipelineLogicError} If the new parameter name is already used in the pipeline
|
|
23
23
|
*/
|
|
24
24
|
export declare function renameParameter(options: RenameParameterOptions): PipelineJson;
|
|
25
25
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@promptbook/cli",
|
|
3
|
-
"version": "0.60.0-
|
|
3
|
+
"version": "0.60.0-8",
|
|
4
4
|
"description": "Supercharge your use of large language models",
|
|
5
5
|
"private": false,
|
|
6
6
|
"sideEffects": false,
|
|
@@ -52,12 +52,13 @@
|
|
|
52
52
|
}
|
|
53
53
|
],
|
|
54
54
|
"peerDependencies": {
|
|
55
|
-
"@promptbook/core": "0.60.0-
|
|
55
|
+
"@promptbook/core": "0.60.0-8"
|
|
56
56
|
},
|
|
57
57
|
"main": "./umd/index.umd.js",
|
|
58
58
|
"module": "./esm/index.es.js",
|
|
59
59
|
"typings": "./esm/typings/src/_packages/cli.index.d.ts",
|
|
60
60
|
"bin": {
|
|
61
|
-
"promptbook": "bin/promptbook-cli.js"
|
|
61
|
+
"promptbook": "bin/promptbook-cli.js",
|
|
62
|
+
"ptbk": "bin/promptbook-cli.js"
|
|
62
63
|
}
|
|
63
64
|
}
|
package/umd/index.umd.js
CHANGED
|
@@ -147,7 +147,7 @@
|
|
|
147
147
|
/**
|
|
148
148
|
* The version of the Promptbook library
|
|
149
149
|
*/
|
|
150
|
-
var PROMPTBOOK_VERSION = '0.60.0-
|
|
150
|
+
var PROMPTBOOK_VERSION = '0.60.0-7';
|
|
151
151
|
|
|
152
152
|
/**
|
|
153
153
|
* Initializes testing `hello` command for Promptbook CLI utilities
|
|
@@ -206,11 +206,11 @@
|
|
|
206
206
|
*/
|
|
207
207
|
var LOOP_LIMIT = 1000;
|
|
208
208
|
/**
|
|
209
|
-
* The name of the builded pipeline collection made by CLI `
|
|
209
|
+
* The name of the builded pipeline collection made by CLI `ptbk make` and for lookup in `createCollectionFromDirectory`
|
|
210
210
|
*/
|
|
211
211
|
var PIPELINE_COLLECTION_BASE_FILENAME = "index";
|
|
212
212
|
|
|
213
|
-
var PipelineCollection = [{title:"Prepare Keywords",pipelineUrl:"https://promptbook.studio/promptbook/prepare-keywords.ptbk.md",promptbookVersion:"0.60.0-
|
|
213
|
+
var PipelineCollection = [{title:"Prepare Keywords",pipelineUrl:"https://promptbook.studio/promptbook/prepare-keywords.ptbk.md",promptbookVersion:"0.60.0-7",parameters:[{name:"content",description:"The content",isInput:true,isOutput:false},{name:"keywords",description:"Keywords separated by comma",isInput:false,isOutput:true}],promptTemplates:[{name:"knowledge",title:"Knowledge",dependentParameterNames:["content"],executionType:"PROMPT_TEMPLATE",modelRequirements:{modelVariant:"CHAT",modelName:"claude-3-opus-20240229"},content:"You are experienced data researcher, detect the important keywords in the document.\n\n# Rules\n\n- Write just keywords separated by comma\n\n# The document\n\nTake information from this document:\n\n> {content}",resultingParameterName:"keywords"}],knowledge:[]},{title:"Prepare Knowledge from Markdown",pipelineUrl:"https://promptbook.studio/promptbook/prepare-knowledge-from-markdown.ptbk.md",promptbookVersion:"0.60.0-7",parameters:[{name:"content",description:"Markdown document content",isInput:true,isOutput:false},{name:"knowledge",description:"The knowledge JSON object",isInput:false,isOutput:true}],promptTemplates:[{name:"knowledge",title:"Knowledge",dependentParameterNames:["content"],executionType:"PROMPT_TEMPLATE",modelRequirements:{modelVariant:"CHAT",modelName:"claude-3-opus-20240229"},content:"You are experienced data researcher, extract the important knowledge from the document.\n\n# Rules\n\n- Make pieces of information concise, clear, and easy to understand\n- One piece of information should be approximately 1 paragraph\n- Divide the paragraphs by markdown horizontal lines ---\n- Omit irrelevant information\n- Group redundant information\n- Write just extracted information, nothing else\n\n# The document\n\nTake information from this document:\n\n> {content}",resultingParameterName:"knowledge"}],knowledge:[]}];
|
|
214
214
|
|
|
215
215
|
/**
|
|
216
216
|
* Prettify the html code
|
|
@@ -3398,7 +3398,7 @@
|
|
|
3398
3398
|
case 1:
|
|
3399
3399
|
makedLibraryFileExists = _f.sent();
|
|
3400
3400
|
if (!makedLibraryFileExists) {
|
|
3401
|
-
console.info(colors__default["default"].yellow("Tip: Prebuild your pipeline collection (file with supposed prebuild ".concat(makedLibraryFilePath, " not found) with CLI util \"
|
|
3401
|
+
console.info(colors__default["default"].yellow("Tip: Prebuild your pipeline collection (file with supposed prebuild ".concat(makedLibraryFilePath, " not found) with CLI util \"ptbk make\" to speed up the collection creation.")));
|
|
3402
3402
|
}
|
|
3403
3403
|
else {
|
|
3404
3404
|
colors__default["default"].green("(In future, not implemented yet) Using your prebuild pipeline collection ".concat(makedLibraryFilePath));
|
|
@@ -3725,13 +3725,13 @@
|
|
|
3725
3725
|
_f.label = 19;
|
|
3726
3726
|
case 19:
|
|
3727
3727
|
if (!formats.includes('javascript')) return [3 /*break*/, 21];
|
|
3728
|
-
return [4 /*yield*/, saveFile('js', spaceTrim__default["default"]("\n import { createCollectionFromJson } from '@promptbook/core';\n\n /**\n * Pipeline collection for ".concat(projectName, "\n *\n * @private internal cache for `getPipelineCollection`\n */\n let pipelineCollection = null;\n\n\n /**\n * Get pipeline collection for ").concat(projectName, "\n *\n * @returns {PipelineCollection} Library of promptbooks for ").concat(projectName, "\n * @generated by `@promptbook/cli`\n */\n export function getPipelineCollection(){\n if(
|
|
3728
|
+
return [4 /*yield*/, saveFile('js', spaceTrim__default["default"]("\n import { createCollectionFromJson } from '@promptbook/core';\n\n /**\n * Pipeline collection for ".concat(projectName, "\n *\n * @private internal cache for `getPipelineCollection`\n */\n let pipelineCollection = null;\n\n\n /**\n * Get pipeline collection for ").concat(projectName, "\n *\n * @returns {PipelineCollection} Library of promptbooks for ").concat(projectName, "\n * @generated by `@promptbook/cli`\n */\n export function getPipelineCollection(){\n if(pipelineCollection===null){\n pipelineCollection = createCollectionFromJson(").concat(collectionJsonString.substring(1, collectionJsonString.length - 1), ");\n }\n\n return pipelineCollection;\n }\n ") + '\n'))];
|
|
3729
3729
|
case 20:
|
|
3730
3730
|
_f.sent();
|
|
3731
3731
|
_f.label = 21;
|
|
3732
3732
|
case 21:
|
|
3733
3733
|
if (!formats.includes('typescript')) return [3 /*break*/, 23];
|
|
3734
|
-
return [4 /*yield*/, saveFile('ts', spaceTrim__default["default"]("\n import { createCollectionFromJson } from '@promptbook/core';\n import type { PipelineCollection } from '@promptbook/types';\n\n /**\n * Pipeline collection for ".concat(projectName, "\n *\n * @private internal cache for `getPipelineCollection`\n */\n let pipelineCollection: null | PipelineCollection = null;\n\n\n /**\n * Get pipeline collection for ").concat(projectName, "\n *\n * @returns {PipelineCollection} Library of promptbooks for ").concat(projectName, "\n * @generated by `@promptbook/cli`\n */\n export function getPipelineCollection(): PipelineCollection{\n if(
|
|
3734
|
+
return [4 /*yield*/, saveFile('ts', spaceTrim__default["default"]("\n import { createCollectionFromJson } from '@promptbook/core';\n import type { PipelineCollection } from '@promptbook/types';\n\n /**\n * Pipeline collection for ".concat(projectName, "\n *\n * @private internal cache for `getPipelineCollection`\n */\n let pipelineCollection: null | PipelineCollection = null;\n\n\n /**\n * Get pipeline collection for ").concat(projectName, "\n *\n * @returns {PipelineCollection} Library of promptbooks for ").concat(projectName, "\n * @generated by `@promptbook/cli`\n */\n export function getPipelineCollection(): PipelineCollection{\n if(pipelineCollection===null){\n pipelineCollection = createCollectionFromJson(").concat(collectionJsonString.substring(1, collectionJsonString.length - 1), ");\n }\n\n return pipelineCollection as PipelineCollection;\n }\n ") + '\n'))];
|
|
3735
3735
|
case 22:
|
|
3736
3736
|
_f.sent();
|
|
3737
3737
|
_f.label = 23;
|