@promptbook/cli 0.63.0-3 → 0.63.0-4
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 +2 -0
- package/esm/index.es.js +11 -3
- package/esm/index.es.js.map +1 -1
- package/esm/typings/src/config.d.ts +6 -0
- package/esm/typings/src/conversion/pipelineJsonToString.d.ts +1 -0
- package/esm/typings/src/conversion/pipelineStringToJson.d.ts +1 -0
- package/esm/typings/src/types/execution-report/executionReportJsonToString.d.ts +1 -0
- package/package.json +1 -1
- package/umd/index.umd.js +11 -3
- package/umd/index.umd.js.map +1 -1
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Warning message for the generated sections and files files
|
|
3
|
+
*
|
|
4
|
+
* @private within the repository
|
|
5
|
+
*/
|
|
6
|
+
export declare const GENERATOR_WARNING = "\u26A0\uFE0F WARNING: This section has been generated so that any manual changes will be overwritten";
|
|
1
7
|
/**
|
|
2
8
|
* The maximum number of iterations for a loops
|
|
3
9
|
*
|
|
@@ -13,4 +13,5 @@ export declare function pipelineJsonToString(pipelineJson: PipelineJson): Pipeli
|
|
|
13
13
|
* TODO: [🧠] Is there a way to auto-detect missing features in pipelineJsonToString
|
|
14
14
|
* TODO: [🏛] Maybe make some markdown builder
|
|
15
15
|
* TODO: [🏛] Escape all
|
|
16
|
+
* TODO: [🧠] Should be in generated .ptbk.md file GENERATOR_WARNING
|
|
16
17
|
*/
|
|
@@ -35,4 +35,5 @@ export declare function pipelineStringToJson(pipelineString: PipelineString, opt
|
|
|
35
35
|
/**
|
|
36
36
|
* TODO: [🏏] Leverage the batch API and build queues @see https://platform.openai.com/docs/guides/batch
|
|
37
37
|
* TODO: [🛠] Actions, instruments (and maybe knowledge) => Functions and tools
|
|
38
|
+
* TODO: [🧠] Should be in generated JSON file GENERATOR_WARNING
|
|
38
39
|
*/
|
|
@@ -10,4 +10,5 @@ export declare function executionReportJsonToString(executionReportJson: Executi
|
|
|
10
10
|
/**
|
|
11
11
|
* TODO: Add mermaid chart for every report
|
|
12
12
|
* TODO: [🧠] Allow to filter out some parts of the report by options
|
|
13
|
+
* TODO: [🧠] Should be in generated file GENERATOR_WARNING
|
|
13
14
|
*/
|
package/package.json
CHANGED
package/umd/index.umd.js
CHANGED
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
/**
|
|
39
39
|
* The version of the Promptbook library
|
|
40
40
|
*/
|
|
41
|
-
var PROMPTBOOK_VERSION = '0.63.0-
|
|
41
|
+
var PROMPTBOOK_VERSION = '0.63.0-3';
|
|
42
42
|
// TODO: !!!! List here all the versions and annotate + put into script
|
|
43
43
|
|
|
44
44
|
/*! *****************************************************************************
|
|
@@ -300,6 +300,12 @@
|
|
|
300
300
|
* TODO: [🧠] Is there a way how to meaningfully test this utility
|
|
301
301
|
*/
|
|
302
302
|
|
|
303
|
+
/**
|
|
304
|
+
* Warning message for the generated sections and files files
|
|
305
|
+
*
|
|
306
|
+
* @private within the repository
|
|
307
|
+
*/
|
|
308
|
+
var GENERATOR_WARNING = "\u26A0\uFE0F WARNING: This section has been generated so that any manual changes will be overwritten";
|
|
303
309
|
/**
|
|
304
310
|
* The maximum number of iterations for a loops
|
|
305
311
|
*
|
|
@@ -614,6 +620,7 @@
|
|
|
614
620
|
* TODO: [🧠] Is there a way to auto-detect missing features in pipelineJsonToString
|
|
615
621
|
* TODO: [🏛] Maybe make some markdown builder
|
|
616
622
|
* TODO: [🏛] Escape all
|
|
623
|
+
* TODO: [🧠] Should be in generated .ptbk.md file GENERATOR_WARNING
|
|
617
624
|
*/
|
|
618
625
|
|
|
619
626
|
/**
|
|
@@ -812,7 +819,7 @@
|
|
|
812
819
|
});
|
|
813
820
|
}
|
|
814
821
|
|
|
815
|
-
var PipelineCollection = [{title:"Prepare Knowledge from Markdown",pipelineUrl:"https://promptbook.studio/promptbook/prepare-knowledge-from-markdown.ptbk.md",promptbookVersion:"0.63.0-
|
|
822
|
+
var PipelineCollection = [{title:"Prepare Knowledge from Markdown",pipelineUrl:"https://promptbook.studio/promptbook/prepare-knowledge-from-markdown.ptbk.md",promptbookVersion:"0.63.0-3",parameters:[{name:"knowledgeContent",description:"Markdown document content",isInput:true,isOutput:false},{name:"knowledgePieces",description:"The knowledge JSON object",isInput:false,isOutput:true}],promptTemplates:[{blockType:"PROMPT_TEMPLATE",name:"knowledge",title:"Knowledge",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> {knowledgeContent}",dependentParameterNames:["knowledgeContent"],resultingParameterName:"knowledgePieces"}],knowledgeSources:[],knowledgePieces:[],personas:[],preparations:[{id:1,promptbookVersion:"0.63.0-3",usage:{price:{value:0},input:{tokensCount:{value:0},charactersCount:{value:0},wordsCount:{value:0},sentencesCount:{value:0},linesCount:{value:0},paragraphsCount:{value:0},pagesCount:{value:0}},output:{tokensCount:{value:0},charactersCount:{value:0},wordsCount:{value:0},sentencesCount:{value:0},linesCount:{value:0},paragraphsCount:{value:0},pagesCount:{value:0}}}}],sourceFile:"./promptbook-collection/prepare-knowledge-from-markdown.ptbk.md"},{title:"Prepare Keywords",pipelineUrl:"https://promptbook.studio/promptbook/prepare-knowledge-keywords.ptbk.md",promptbookVersion:"0.63.0-3",parameters:[{name:"knowledgePieceContent",description:"The content",isInput:true,isOutput:false},{name:"keywords",description:"Keywords separated by comma",isInput:false,isOutput:true}],promptTemplates:[{blockType:"PROMPT_TEMPLATE",name:"knowledge",title:"Knowledge",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> {knowledgePieceContent}",dependentParameterNames:["knowledgePieceContent"],resultingParameterName:"keywords"}],knowledgeSources:[],knowledgePieces:[],personas:[],preparations:[{id:1,promptbookVersion:"0.63.0-3",usage:{price:{value:0},input:{tokensCount:{value:0},charactersCount:{value:0},wordsCount:{value:0},sentencesCount:{value:0},linesCount:{value:0},paragraphsCount:{value:0},pagesCount:{value:0}},output:{tokensCount:{value:0},charactersCount:{value:0},wordsCount:{value:0},sentencesCount:{value:0},linesCount:{value:0},paragraphsCount:{value:0},pagesCount:{value:0}}}}],sourceFile:"./promptbook-collection/prepare-knowledge-keywords.ptbk.md"},{title:"Prepare Title",pipelineUrl:"https://promptbook.studio/promptbook/prepare-knowledge-title.ptbk.md",promptbookVersion:"0.63.0-3",parameters:[{name:"knowledgePieceContent",description:"The content",isInput:true,isOutput:false},{name:"title",description:"The title of the document",isInput:false,isOutput:true}],promptTemplates:[{blockType:"PROMPT_TEMPLATE",name:"knowledge",title:"Knowledge",modelRequirements:{modelVariant:"CHAT",modelName:"claude-3-opus-20240229"},content:"You are experienced content creator, write best title for the document.\n\n# Rules\n\n- Write just title, nothing else\n- Title should be concise and clear\n- Write maximum 5 words for the title\n\n# The document\n\n> {knowledgePieceContent}",expectations:{words:{min:1,max:8}},dependentParameterNames:["knowledgePieceContent"],resultingParameterName:"title"}],knowledgeSources:[],knowledgePieces:[],personas:[],preparations:[{id:1,promptbookVersion:"0.63.0-3",usage:{price:{value:0},input:{tokensCount:{value:0},charactersCount:{value:0},wordsCount:{value:0},sentencesCount:{value:0},linesCount:{value:0},paragraphsCount:{value:0},pagesCount:{value:0}},output:{tokensCount:{value:0},charactersCount:{value:0},wordsCount:{value:0},sentencesCount:{value:0},linesCount:{value:0},paragraphsCount:{value:0},pagesCount:{value:0}}}}],sourceFile:"./promptbook-collection/prepare-knowledge-title.ptbk.md"},{title:"Prepare Keywords",pipelineUrl:"https://promptbook.studio/promptbook/prepare-persona.ptbk.md",promptbookVersion:"0.63.0-3",parameters:[{name:"availableModelNames",description:"List of available model names separated by comma (,)",isInput:true,isOutput:false},{name:"personaDescription",description:"Description of the persona",isInput:true,isOutput:false},{name:"modelRequirements",description:"Specific requirements for the model",isInput:false,isOutput:true}],promptTemplates:[{blockType:"PROMPT_TEMPLATE",name:"make-model-requirements",title:"Make modelRequirements",modelRequirements:{modelVariant:"CHAT",modelName:"gpt-4-turbo"},content:"You are experienced AI engineer, you need to create virtual assistant.\nWrite\n\n## Sample\n\n```json\n{\n\"modelName\": \"gpt-4o\",\n\"systemMessage\": \"You are experienced AI engineer and helpfull assistant.\",\n\"temperature\": 0.7\n}\n```\n\n## Instructions\n\n### Option `modelName`\n\nPick from the following models:\n\n- {availableModelNames}\n\n### Option `systemMessage`\n\nThe system message is used to communicate instructions or provide context to the model at the beginning of a conversation. It is displayed in a different format compared to user messages, helping the model understand its role in the conversation. The system message typically guides the model's behavior, sets the tone, or specifies desired output from the model. By utilizing the system message effectively, users can steer the model towards generating more accurate and relevant responses.\n\nFor example:\n\n> You are an experienced AI engineer and helpful assistant.\n\n> You are a friendly and knowledgeable chatbot.\n\n### Option `temperature`\n\nThe sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. If set to 0, the model will use log probability to automatically increase the temperature until certain thresholds are hit.\n\nYou can pick a value between 0 and 2. For example:\n\n- `0.1`: Low temperature, extremely conservative and deterministic\n- `0.5`: Medium temperature, balanced between conservative and creative\n- `1.0`: High temperature, creative and bit random\n- `1.5`: Very high temperature, extremely creative and often chaotic and unpredictable\n- `2.0`: Maximum temperature, completely random and unpredictable, for some extreme creative use cases\n\n# The assistant\n\nTake this description of the persona:\n\n> {personaDescription}",expectFormat:"JSON",dependentParameterNames:["availableModelNames","personaDescription"],resultingParameterName:"modelRequirements"}],knowledgeSources:[],knowledgePieces:[],personas:[],preparations:[{id:1,promptbookVersion:"0.63.0-3",usage:{price:{value:0},input:{tokensCount:{value:0},charactersCount:{value:0},wordsCount:{value:0},sentencesCount:{value:0},linesCount:{value:0},paragraphsCount:{value:0},pagesCount:{value:0}},output:{tokensCount:{value:0},charactersCount:{value:0},wordsCount:{value:0},sentencesCount:{value:0},linesCount:{value:0},paragraphsCount:{value:0},pagesCount:{value:0}}}}],sourceFile:"./promptbook-collection/prepare-persona.ptbk.md"}];
|
|
816
823
|
|
|
817
824
|
/**
|
|
818
825
|
* This error indicates that the promptbook in a markdown format cannot be parsed into a valid promptbook object
|
|
@@ -5893,6 +5900,7 @@
|
|
|
5893
5900
|
/**
|
|
5894
5901
|
* TODO: [🏏] Leverage the batch API and build queues @see https://platform.openai.com/docs/guides/batch
|
|
5895
5902
|
* TODO: [🛠] Actions, instruments (and maybe knowledge) => Functions and tools
|
|
5903
|
+
* TODO: [🧠] Should be in generated JSON file GENERATOR_WARNING
|
|
5896
5904
|
*/
|
|
5897
5905
|
|
|
5898
5906
|
/**
|
|
@@ -7889,7 +7897,7 @@
|
|
|
7889
7897
|
*/
|
|
7890
7898
|
function addAutoGeneratedSection(content, options) {
|
|
7891
7899
|
var sectionName = options.sectionName, sectionContent = options.sectionContent;
|
|
7892
|
-
var warningLine = "<!--
|
|
7900
|
+
var warningLine = "<!-- ".concat(GENERATOR_WARNING, " -->");
|
|
7893
7901
|
var sectionRegex = new RegExp("<!--".concat(sectionName, "-->([\\s\\S]*?)<!--/").concat(sectionName, "-->"), 'g');
|
|
7894
7902
|
var sectionMatch = content.match(sectionRegex);
|
|
7895
7903
|
if (sectionMatch) {
|