@promptbook/openai 0.54.0 → 0.54.1

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 CHANGED
@@ -612,7 +612,7 @@ There are [postprocessing functions](#postprocessing-functions) that can be used
612
612
  Executor is a simple async function that takes **input parameters** and returns **output parameters**.
613
613
  It is constructed by combining execution tools and promptbook to execute together.
614
614
 
615
- ### 🃏 Jokers
615
+ ### 🃏 Jokers (conditions)
616
616
 
617
617
  Joker is a previously defined parameter that is used to bypass some parts of the pipeline.
618
618
  If the joker is present in the template, it is checked to see if it meets the requirements (without postprocessing), and if so, it is used instead of executing that prompt template. There can be multiple wildcards in a prompt template, if so they are checked in order and the first one that meets the requirements is used.
@@ -3,6 +3,7 @@ import type { ExecutionType } from '../ExecutionTypes';
3
3
  import type { ModelRequirements } from '../ModelRequirements';
4
4
  import type { ScriptLanguage } from '../ScriptLanguage';
5
5
  import type { number_integer } from '../typeAliases';
6
+ import type { string_markdown_text } from '../typeAliases';
6
7
  import type { number_positive_or_zero } from '../typeAliases';
7
8
  import type { string_javascript } from '../typeAliases';
8
9
  import type { string_javascript_name } from '../typeAliases';
@@ -92,7 +93,7 @@ interface PromptTemplateJsonCommon {
92
93
  * Description of the prompt template
93
94
  * It can use multiple paragraphs of simple markdown formatting like **bold**, *italic*, [link](https://example.com), ... BUT not code blocks and structure
94
95
  */
95
- readonly description?: string;
96
+ readonly description?: string_markdown_text;
96
97
  /**
97
98
  * List of parameter names that are used in the prompt template and must be defined before the prompt template is executed
98
99
  *
@@ -1,3 +1,4 @@
1
+ import type { string_markdown_text } from '../typeAliases';
1
2
  import type { string_name } from '../typeAliases';
2
3
  /**
3
4
  * Describes one parameter of the promptbook
@@ -21,5 +22,5 @@ export type PromptTemplateParameterJson = {
21
22
  * Description of the parameter
22
23
  * - It can use simple markdown formatting like **bold**, *italic*, [link](https://example.com), ... BUT not code blocks and structure
23
24
  */
24
- readonly description?: string;
25
+ readonly description?: string_markdown_text;
25
26
  };
@@ -1,3 +1,4 @@
1
+ import type { string_markdown_text } from '../typeAliases';
1
2
  import type { string_promptbook_url } from '../typeAliases';
2
3
  import type { string_version } from '../typeAliases';
3
4
  import type { PromptTemplateJson } from './PromptTemplateJson';
@@ -23,7 +24,7 @@ export type PromptbookJson = {
23
24
  * Title of the promptbook
24
25
  * -It can use simple markdown formatting like **bold**, *italic*, [link](https://example.com), ... BUT not code blocks and structure
25
26
  */
26
- readonly title: string;
27
+ readonly title: string_markdown_text;
27
28
  /**
28
29
  * Version of the .ptbk.json file
29
30
  */
@@ -32,7 +33,7 @@ export type PromptbookJson = {
32
33
  * Description of the promptbook
33
34
  * It can use multiple paragraphs of simple markdown formatting like **bold**, *italic*, [link](https://example.com), ... BUT not code blocks and structure
34
35
  */
35
- readonly description?: string;
36
+ readonly description?: string_markdown_text;
36
37
  /**
37
38
  * Set of variables that are used across the pipeline
38
39
  */
@@ -1,5 +1,6 @@
1
1
  import type { PromptResult } from '../../execution/PromptResult';
2
2
  import type { Prompt } from '../Prompt';
3
+ import type { string_markdown_text } from '../typeAliases';
3
4
  import type { string_promptbook_url } from '../typeAliases';
4
5
  import type { string_version } from '../typeAliases';
5
6
  /**
@@ -32,7 +33,7 @@ export type ExecutionReportJson = {
32
33
  /**
33
34
  * Description of the promptbook which was executed
34
35
  */
35
- readonly description?: string;
36
+ readonly description?: string_markdown_text;
36
37
  /**
37
38
  * Sequence of prompt templates in order which were executed
38
39
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@promptbook/openai",
3
- "version": "0.54.0",
3
+ "version": "0.54.1",
4
4
  "description": "Library to supercharge your use of large language models",
5
5
  "private": false,
6
6
  "sideEffects": false,
@@ -48,7 +48,7 @@
48
48
  }
49
49
  ],
50
50
  "peerDependencies": {
51
- "@promptbook/core": "0.54.0"
51
+ "@promptbook/core": "0.54.1"
52
52
  },
53
53
  "main": "./umd/index.umd.js",
54
54
  "module": "./esm/index.es.js",
@@ -3,6 +3,7 @@ import type { ExecutionType } from '../ExecutionTypes';
3
3
  import type { ModelRequirements } from '../ModelRequirements';
4
4
  import type { ScriptLanguage } from '../ScriptLanguage';
5
5
  import type { number_integer } from '../typeAliases';
6
+ import type { string_markdown_text } from '../typeAliases';
6
7
  import type { number_positive_or_zero } from '../typeAliases';
7
8
  import type { string_javascript } from '../typeAliases';
8
9
  import type { string_javascript_name } from '../typeAliases';
@@ -92,7 +93,7 @@ interface PromptTemplateJsonCommon {
92
93
  * Description of the prompt template
93
94
  * It can use multiple paragraphs of simple markdown formatting like **bold**, *italic*, [link](https://example.com), ... BUT not code blocks and structure
94
95
  */
95
- readonly description?: string;
96
+ readonly description?: string_markdown_text;
96
97
  /**
97
98
  * List of parameter names that are used in the prompt template and must be defined before the prompt template is executed
98
99
  *
@@ -1,3 +1,4 @@
1
+ import type { string_markdown_text } from '../typeAliases';
1
2
  import type { string_name } from '../typeAliases';
2
3
  /**
3
4
  * Describes one parameter of the promptbook
@@ -21,5 +22,5 @@ export type PromptTemplateParameterJson = {
21
22
  * Description of the parameter
22
23
  * - It can use simple markdown formatting like **bold**, *italic*, [link](https://example.com), ... BUT not code blocks and structure
23
24
  */
24
- readonly description?: string;
25
+ readonly description?: string_markdown_text;
25
26
  };
@@ -1,3 +1,4 @@
1
+ import type { string_markdown_text } from '../typeAliases';
1
2
  import type { string_promptbook_url } from '../typeAliases';
2
3
  import type { string_version } from '../typeAliases';
3
4
  import type { PromptTemplateJson } from './PromptTemplateJson';
@@ -23,7 +24,7 @@ export type PromptbookJson = {
23
24
  * Title of the promptbook
24
25
  * -It can use simple markdown formatting like **bold**, *italic*, [link](https://example.com), ... BUT not code blocks and structure
25
26
  */
26
- readonly title: string;
27
+ readonly title: string_markdown_text;
27
28
  /**
28
29
  * Version of the .ptbk.json file
29
30
  */
@@ -32,7 +33,7 @@ export type PromptbookJson = {
32
33
  * Description of the promptbook
33
34
  * It can use multiple paragraphs of simple markdown formatting like **bold**, *italic*, [link](https://example.com), ... BUT not code blocks and structure
34
35
  */
35
- readonly description?: string;
36
+ readonly description?: string_markdown_text;
36
37
  /**
37
38
  * Set of variables that are used across the pipeline
38
39
  */
@@ -1,5 +1,6 @@
1
1
  import type { PromptResult } from '../../execution/PromptResult';
2
2
  import type { Prompt } from '../Prompt';
3
+ import type { string_markdown_text } from '../typeAliases';
3
4
  import type { string_promptbook_url } from '../typeAliases';
4
5
  import type { string_version } from '../typeAliases';
5
6
  /**
@@ -32,7 +33,7 @@ export type ExecutionReportJson = {
32
33
  /**
33
34
  * Description of the promptbook which was executed
34
35
  */
35
- readonly description?: string;
36
+ readonly description?: string_markdown_text;
36
37
  /**
37
38
  * Sequence of prompt templates in order which were executed
38
39
  */