@promptbook/browser 0.68.0-0 → 0.68.0-2

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.
Files changed (87) hide show
  1. package/README.md +4 -4
  2. package/esm/index.es.js +3 -3
  3. package/esm/index.es.js.map +1 -1
  4. package/esm/typings/promptbook-collection/index.d.ts +7 -16
  5. package/esm/typings/src/_packages/core.index.d.ts +2 -2
  6. package/esm/typings/src/_packages/types.index.d.ts +20 -24
  7. package/esm/typings/src/_packages/utils.index.d.ts +2 -2
  8. package/esm/typings/src/commands/BLOCK/BlockTypes.d.ts +1 -1
  9. package/esm/typings/src/commands/BLOCK/blockCommandParser.d.ts +2 -2
  10. package/esm/typings/src/commands/EXPECT/ExpectCommand.d.ts +14 -6
  11. package/esm/typings/src/commands/EXPECT/expectCommandParser.d.ts +2 -2
  12. package/esm/typings/src/commands/FOREACH/ForeachCommand.d.ts +9 -0
  13. package/esm/typings/src/commands/FOREACH/foreachCommandParser.d.ts +14 -0
  14. package/esm/typings/src/commands/{EXPECT/ExpectFormatCommand.d.ts → FORMAT/FormatCommand.d.ts} +2 -2
  15. package/esm/typings/src/commands/FORMAT/formatCommand.test.d.ts +1 -0
  16. package/esm/typings/src/commands/FORMAT/formatCommandParser.d.ts +9 -0
  17. package/esm/typings/src/commands/JOKER/jokerCommandParser.d.ts +2 -2
  18. package/esm/typings/src/commands/KNOWLEDGE/knowledgeCommandParser.d.ts +2 -2
  19. package/esm/typings/src/commands/MODEL/modelCommandParser.d.ts +2 -2
  20. package/esm/typings/src/commands/PARAMETER/parameterCommandParser.d.ts +2 -2
  21. package/esm/typings/src/commands/PERSONA/personaCommandParser.d.ts +2 -2
  22. package/esm/typings/src/commands/POSTPROCESS/postprocessCommandParser.d.ts +2 -2
  23. package/esm/typings/src/commands/PROMPTBOOK_VERSION/promptbookVersionCommandParser.d.ts +2 -2
  24. package/esm/typings/src/commands/URL/urlCommandParser.d.ts +2 -2
  25. package/esm/typings/src/commands/X_ACTION/actionCommandParser.d.ts +2 -2
  26. package/esm/typings/src/commands/X_INSTRUMENT/instrumentCommandParser.d.ts +2 -2
  27. package/esm/typings/src/commands/_BOILERPLATE/boilerplateCommandParser.d.ts +6 -4
  28. package/esm/typings/src/commands/_common/parseCommand.d.ts +1 -1
  29. package/esm/typings/src/commands/_common/types/Command.d.ts +1 -1
  30. package/esm/typings/src/commands/_common/types/CommandParser.d.ts +137 -30
  31. package/esm/typings/src/commands/index.d.ts +1 -1
  32. package/esm/typings/src/conversion/pipelineJsonToString.d.ts +1 -1
  33. package/esm/typings/src/conversion/pipelineStringToJson.d.ts +1 -1
  34. package/esm/typings/src/conversion/pipelineStringToJsonSync.d.ts +2 -2
  35. package/esm/typings/src/conversion/prettify/renderPipelineMermaidOptions.d.ts +3 -3
  36. package/esm/typings/src/conversion/utils/extractParameterNamesFromTemplate.d.ts +14 -0
  37. package/esm/typings/src/conversion/utils/extractParameterNamesFromTemplate.test.d.ts +1 -0
  38. package/esm/typings/src/conversion/utils/extractVariables.d.ts +1 -1
  39. package/esm/typings/src/conversion/utils/renameParameter.d.ts +2 -2
  40. package/esm/typings/src/conversion/utils/stringifyPipelineJson.d.ts +1 -1
  41. package/esm/typings/src/conversion/validation/_importPipeline.d.ts +1 -1
  42. package/esm/typings/src/errors/{ParsingError.d.ts → ParseError.d.ts} +5 -2
  43. package/esm/typings/src/errors/index.d.ts +2 -2
  44. package/esm/typings/src/execution/CommonExecutionToolsOptions.d.ts +5 -0
  45. package/esm/typings/src/execution/PromptResult.d.ts +2 -0
  46. package/esm/typings/src/execution/PromptResultUsage.d.ts +1 -1
  47. package/esm/typings/src/execution/createPipelineExecutor.d.ts +1 -1
  48. package/esm/typings/src/knowledge/dialogs/simple-prompt/SimplePromptInterfaceTools.d.ts +1 -1
  49. package/esm/typings/src/llm-providers/openai/OpenAiExecutionTools.d.ts +1 -1
  50. package/esm/typings/src/postprocessing/utils/extractBlock.d.ts +2 -2
  51. package/esm/typings/src/postprocessing/utils/extractJsonBlock.d.ts +3 -3
  52. package/esm/typings/src/prepare/prepareTemplates.d.ts +4 -5
  53. package/esm/typings/src/prepare/unpreparePipeline.d.ts +1 -1
  54. package/esm/typings/src/storage/_common/PromptbookStorage.d.ts +1 -1
  55. package/esm/typings/src/storage/utils/PrefixStorage.d.ts +1 -1
  56. package/esm/typings/src/types/ModelRequirements.d.ts +2 -0
  57. package/esm/typings/src/types/PipelineJson/DialogTemplateJson.d.ts +13 -0
  58. package/esm/typings/src/types/PipelineJson/Expectations.d.ts +1 -1
  59. package/esm/typings/src/types/PipelineJson/KnowledgePieceJson.d.ts +1 -1
  60. package/esm/typings/src/types/PipelineJson/KnowledgeSourceJson.d.ts +1 -1
  61. package/esm/typings/src/types/PipelineJson/{PromptTemplateParameterJson.d.ts → ParameterJson.d.ts} +2 -2
  62. package/esm/typings/src/types/PipelineJson/PersonaJson.d.ts +1 -1
  63. package/esm/typings/src/types/PipelineJson/PipelineJson.d.ts +13 -8
  64. package/esm/typings/src/types/PipelineJson/PreparationJson.d.ts +1 -1
  65. package/esm/typings/src/types/PipelineJson/PromptTemplateJson.d.ts +20 -9
  66. package/esm/typings/src/types/PipelineJson/{ScriptJson.d.ts → ScriptTemplateJson.d.ts} +4 -4
  67. package/esm/typings/src/types/PipelineJson/SimpleTemplateJson.d.ts +3 -3
  68. package/esm/typings/src/types/PipelineJson/TemplateJson.d.ts +11 -0
  69. package/esm/typings/src/types/PipelineJson/{PromptTemplateJsonCommon.d.ts → TemplateJsonCommon.d.ts} +12 -13
  70. package/esm/typings/src/types/PipelineString.d.ts +1 -1
  71. package/esm/typings/src/types/Prompt.d.ts +4 -2
  72. package/esm/typings/src/types/execution-report/ExecutionReportJson.d.ts +1 -1
  73. package/esm/typings/src/utils/markdown/addAutoGeneratedSection.d.ts +1 -0
  74. package/esm/typings/src/utils/markdown/extractAllBlocksFromMarkdown.d.ts +1 -1
  75. package/esm/typings/src/utils/markdown/extractOneBlockFromMarkdown.d.ts +2 -2
  76. package/esm/typings/src/utils/organization/___and___.d.ts +7 -0
  77. package/esm/typings/src/utils/organization/{___.d.ts → ___or___.d.ts} +1 -1
  78. package/esm/typings/src/utils/parseNumber.d.ts +1 -1
  79. package/esm/typings/src/utils/serialization/clonePipeline.d.ts +1 -1
  80. package/package.json +2 -2
  81. package/umd/index.umd.js +3 -3
  82. package/umd/index.umd.js.map +1 -1
  83. package/esm/typings/src/commands/EXPECT/ExpectAmountCommand.d.ts +0 -17
  84. package/esm/typings/src/conversion/utils/extractParameterNamesFromPromptTemplate.d.ts +0 -14
  85. package/esm/typings/src/types/PipelineJson/LlmTemplateJson.d.ts +0 -27
  86. package/esm/typings/src/types/PipelineJson/PromptDialogJson.d.ts +0 -14
  87. /package/esm/typings/src/{conversion/utils/extractParameterNamesFromPromptTemplate.test.d.ts → commands/FOREACH/foreachCommand.test.d.ts} +0 -0
@@ -33,5 +33,5 @@ export type KnowledgeSourcePreparedJson = KnowledgeSourceJson & {
33
33
  readonly preparationIds: Array<number_id>;
34
34
  };
35
35
  /**
36
- * TODO: [🍙] Make some standart order of json properties
36
+ * TODO: [🍙] Make some standard order of json properties
37
37
  */
@@ -6,7 +6,7 @@ import type { string_parameter_value } from '../typeAliases';
6
6
  *
7
7
  * Note: [🚉] This is fully serializable as JSON
8
8
  */
9
- export type PromptTemplateParameterJson = {
9
+ export type ParameterJson = {
10
10
  /**
11
11
  * Name of the parameter
12
12
  * - It must be unique across the pipeline
@@ -34,5 +34,5 @@ export type PromptTemplateParameterJson = {
34
34
  };
35
35
  /**
36
36
  * TODO: [♈] Probbably move expectations from templates to parameters
37
- * TODO: [🍙] Make some standart order of json properties
37
+ * TODO: [🍙] Make some standard order of json properties
38
38
  */
@@ -41,5 +41,5 @@ export type PersonaPreparedJson = PersonaJson & {
41
41
  readonly preparationIds: Array<number_id>;
42
42
  };
43
43
  /**
44
- * TODO: [🍙] Make some standart order of json properties
44
+ * TODO: [🍙] Make some standard order of json properties
45
45
  */
@@ -1,3 +1,4 @@
1
+ import type { ModelRequirements } from '../ModelRequirements';
1
2
  import type { string_file_path } from '../typeAliases';
2
3
  import type { string_markdown_text } from '../typeAliases';
3
4
  import type { string_pipeline_url } from '../typeAliases';
@@ -5,14 +6,14 @@ import type { string_semantic_version } from '../typeAliases';
5
6
  import type { KnowledgePiecePreparedJson } from './KnowledgePieceJson';
6
7
  import type { KnowledgeSourceJson } from './KnowledgeSourceJson';
7
8
  import type { KnowledgeSourcePreparedJson } from './KnowledgeSourceJson';
9
+ import type { ParameterJson } from './ParameterJson';
8
10
  import type { PersonaJson } from './PersonaJson';
9
11
  import type { PersonaPreparedJson } from './PersonaJson';
10
12
  import type { PreparationJson } from './PreparationJson';
11
- import type { PromptTemplateJson } from './PromptTemplateJson';
12
- import type { PromptTemplateParameterJson } from './PromptTemplateParameterJson';
13
+ import type { TemplateJson } from './TemplateJson';
13
14
  /**
14
15
  * Promptbook is the **core concept of this package**.
15
- * It represents a series of prompt templates chained together to form a pipeline / one big prompt template with input and result parameters.
16
+ * It represents a series of templates chained together to form a pipeline / one big template with input and result parameters.
16
17
  *
17
18
  * Note: [🚉] This is fully serializable as JSON
18
19
  *
@@ -26,7 +27,7 @@ export type PipelineJson = {
26
27
  * Note: It must use HTTPs URL
27
28
  * Tip: You can do versioning in the URL
28
29
  * For example: https://promptbook.studio/webgpt/write-website-content-cs.ptbk.md@1.0.0
29
- * Warning: Do not hash part of the URL, hash part is used for identification of the prompt template in the pipeline
30
+ * Warning: Do not hash part of the URL, hash part is used for identification of the template in the pipeline
30
31
  */
31
32
  readonly pipelineUrl?: string_pipeline_url;
32
33
  /**
@@ -50,11 +51,15 @@ export type PipelineJson = {
50
51
  /**
51
52
  * Set of variables that are used across the pipeline
52
53
  */
53
- readonly parameters: Array<PromptTemplateParameterJson>;
54
+ readonly parameters: Array<ParameterJson>;
54
55
  /**
55
- * Sequence of prompt templates that are chained together to form a pipeline
56
+ * Default model requirements for the model for all `templates`
56
57
  */
57
- readonly promptTemplates: Array<PromptTemplateJson>;
58
+ readonly defaultModelRequirements?: Partial<ModelRequirements>;
59
+ /**
60
+ * Sequence of templates that are chained together to form a pipeline
61
+ */
62
+ readonly templates: Array<TemplateJson>;
58
63
  /**
59
64
  * Set of information that are used as external knowledge in the pipeline
60
65
  *
@@ -81,7 +86,7 @@ export type PipelineJson = {
81
86
  readonly preparations: Array<PreparationJson>;
82
87
  };
83
88
  /**
84
- * TODO: [🍙] Make some standart order of json properties
89
+ * TODO: [🍙] Make some standard order of json properties
85
90
  * TODO: [🧠] Maybe wrap all {parameterNames} in brackets for example { "resultingParameterName": "{foo}" }
86
91
  * Note: [💼] There was a proposal for multiple types of promptbook objects 78816ff33e2705ee1a187aa2eb8affd976d4ea1a
87
92
  * But then immediately reverted back to the single type
@@ -16,7 +16,7 @@ export type PreparationJson = {
16
16
  readonly usage: PromptResultUsage;
17
17
  };
18
18
  /**
19
- * TODO: [🍙] Make some standart order of json properties
19
+ * TODO: [🍙] Make some standard order of json properties
20
20
  * TODO: Maybe put here used `modelName`
21
21
  * TODO: [🍥] When using `date` it changes all samples .ptbk.json files each time so until some more elegant solution omit the time from prepared pipeline
22
22
  */
@@ -1,15 +1,26 @@
1
- import type { ___ } from '../../utils/organization/___';
2
- import type { LlmTemplateJson } from './LlmTemplateJson';
3
- import type { PromptDialogJson } from './PromptDialogJson';
4
- import type { ScriptJson } from './ScriptJson';
5
- import type { SimpleTemplateJson } from './SimpleTemplateJson';
1
+ import type { ModelRequirements } from '../ModelRequirements';
2
+ import type { string_name } from '../typeAliases';
3
+ import type { TemplateJsonCommon } from './TemplateJsonCommon';
6
4
  /**
7
- * Describes one prompt template in the promptbook
5
+ * Template for prompt to LLM
8
6
  *
9
7
  * Note: [🚉] This is fully serializable as JSON
10
8
  */
11
- export type PromptTemplateJson = LlmTemplateJson | SimpleTemplateJson | ScriptJson | PromptDialogJson | ___ | ___ | ___ | ___;
9
+ export type PromptTemplateJson = TemplateJsonCommon & {
10
+ readonly blockType: 'PROMPT_TEMPLATE';
11
+ /**
12
+ * Name of the persona who will be responding to this prompt
13
+ */
14
+ readonly personaName?: string_name;
15
+ /**
16
+ * Requirements for the model
17
+ * - This is required only for blockType PROMPT_TEMPLATE
18
+ */
19
+ readonly modelRequirements?: Partial<ModelRequirements>;
20
+ };
12
21
  /**
13
- * TODO: [🧠][🥜] What is propper name for this - "Template", "Prompt template",...
14
- * TODO: [🧠][🥜] Reduce confusion of `PromptTemplateJson` vs (`LlmTemplateJson` which is 'PROMPT_TEMPLATE')
22
+ * TODO: [👙][🧠] Maybe add `knowledge`, `actions` and `instruments` to be available granularly for each template
23
+ * @see https://github.com/webgptorg/promptbook/discussions/79
24
+ * TODO: [💕][🧠] Just selecting gpt3 or gpt4 level of model
25
+ * TODO: [🍙] Make some standard order of json properties
15
26
  */
@@ -1,13 +1,13 @@
1
1
  import type { ScriptLanguage } from '../ScriptLanguage';
2
- import type { PromptTemplateJsonCommon } from './PromptTemplateJsonCommon';
2
+ import type { TemplateJsonCommon } from './TemplateJsonCommon';
3
3
  /**
4
4
  * Template for script execution
5
5
  *
6
6
  * Note: [🚉] This is fully serializable as JSON
7
7
  * @see https://github.com/webgptorg/promptbook/discussions/77
8
8
  */
9
- export type ScriptJson = PromptTemplateJsonCommon & {
10
- readonly blockType: 'SCRIPT';
9
+ export type ScriptTemplateJson = TemplateJsonCommon & {
10
+ readonly blockType: 'SCRIPT_TEMPLATE';
11
11
  /**
12
12
  * Language of the script
13
13
  * - This is required only for blockType SCRIPT
@@ -16,5 +16,5 @@ export type ScriptJson = PromptTemplateJsonCommon & {
16
16
  readonly contentLanguage?: ScriptLanguage;
17
17
  };
18
18
  /**
19
- * TODO: [🍙] Make some standart order of json properties
19
+ * TODO: [🍙] Make some standard order of json properties
20
20
  */
@@ -1,13 +1,13 @@
1
- import type { PromptTemplateJsonCommon } from './PromptTemplateJsonCommon';
1
+ import type { TemplateJsonCommon } from './TemplateJsonCommon';
2
2
  /**
3
3
  * Template for simple concatenation of strings
4
4
  *
5
5
  * Note: [🚉] This is fully serializable as JSON
6
6
  * @see https://github.com/webgptorg/promptbook/discussions/17
7
7
  */
8
- export type SimpleTemplateJson = PromptTemplateJsonCommon & {
8
+ export type SimpleTemplateJson = TemplateJsonCommon & {
9
9
  readonly blockType: 'SIMPLE_TEMPLATE';
10
10
  };
11
11
  /**
12
- * TODO: [🍙] Make some standart order of json properties
12
+ * TODO: [🍙] Make some standard order of json properties
13
13
  */
@@ -0,0 +1,11 @@
1
+ import type { ___or___ } from '../../utils/organization/___or___';
2
+ import type { DialogTemplateJson } from './DialogTemplateJson';
3
+ import type { PromptTemplateJson } from './PromptTemplateJson';
4
+ import type { ScriptTemplateJson } from './ScriptTemplateJson';
5
+ import type { SimpleTemplateJson } from './SimpleTemplateJson';
6
+ /**
7
+ * Describes one (prompt) template in the promptbook
8
+ *
9
+ * Note: [🚉] This is fully serializable as JSON
10
+ */
11
+ export type TemplateJson = PromptTemplateJson | SimpleTemplateJson | ScriptTemplateJson | DialogTemplateJson | ___or___ | ___or___;
@@ -1,5 +1,5 @@
1
1
  import type { BlockType } from '../../commands/BLOCK/BlockTypes';
2
- import type { ExpectFormatCommand } from '../../commands/EXPECT/ExpectFormatCommand';
2
+ import type { FormatCommand } from '../../commands/FORMAT/FormatCommand';
3
3
  import type { string_javascript } from '../typeAliases';
4
4
  import type { string_markdown } from '../typeAliases';
5
5
  import type { string_markdown_text } from '../typeAliases';
@@ -10,41 +10,41 @@ import type { string_prompt } from '../typeAliases';
10
10
  import type { string_template } from '../typeAliases';
11
11
  import type { Expectations } from './Expectations';
12
12
  /**
13
- * Common properties of all prompt templates
13
+ * Common properties of all templates
14
14
  */
15
- export interface PromptTemplateJsonCommon {
15
+ export interface TemplateJsonCommon {
16
16
  /**
17
17
  * Name of the template
18
18
  * - It must be unique across the pipeline
19
19
  * - It should start uppercase and can contain letters and numbers
20
- * - The pipelineUrl together with hash and name are used to identify the prompt template in the pipeline
20
+ * - The pipelineUrl together with hash and name are used to identify the template in the pipeline
21
21
  */
22
22
  readonly name: string_name;
23
23
  /**
24
- * Title of the prompt template
24
+ * Title of the template
25
25
  * It can use simple markdown formatting like **bold**, *italic*, [link](https://example.com), ... BUT not code blocks and structure
26
26
  */
27
27
  readonly title: string;
28
28
  /**
29
- * Description of the prompt template
29
+ * Description of the template
30
30
  * It can use multiple paragraphs of simple markdown formatting like **bold**, *italic*, [link](https://example.com), ... BUT not code blocks and structure
31
31
  */
32
32
  readonly description?: string_markdown_text;
33
33
  /**
34
- * List of parameter names that are used in the prompt template and must be defined before the prompt template is executed
34
+ * List of parameter names that are used in the template and must be defined before the template is executed
35
35
  *
36
36
  * Note: Joker is one of the dependent parameters
37
37
  */
38
38
  readonly dependentParameterNames: Array<string_parameter_name>;
39
39
  /**
40
- * If theese parameters meet the expectations requirements, they are used instead of executing this prompt template
40
+ * If theese parameters meet the expectations requirements, they are used instead of executing this template
41
41
  *
42
42
  * @see https://github.com/webgptorg/promptbook/discussions/66
43
43
  */
44
44
  readonly jokerParameterNames?: Array<string_parameter_name>;
45
45
  /**
46
46
  * Type of the execution
47
- * This determines if the prompt template is send to LLM, user or some scripting evaluation
47
+ * This determines if the template is send to LLM, user or some scripting evaluation
48
48
  */
49
49
  readonly blockType: BlockType;
50
50
  /**
@@ -62,7 +62,7 @@ export interface PromptTemplateJsonCommon {
62
62
  */
63
63
  readonly preparedContent?: (string_prompt | string_javascript | string_markdown) & string_template;
64
64
  /**
65
- * List of postprocessing steps that are executed after the prompt template
65
+ * List of postprocessing steps that are executed after the template
66
66
  *
67
67
  * @see https://github.com/webgptorg/promptbook/discussions/31
68
68
  */
@@ -83,14 +83,13 @@ export interface PromptTemplateJsonCommon {
83
83
  * @see https://github.com/webgptorg/promptbook/discussions/30
84
84
  * @deprecated [💝]
85
85
  */
86
- readonly expectFormat?: ExpectFormatCommand['format'];
86
+ readonly format?: FormatCommand['format'];
87
87
  /**
88
- * Name of the parameter that is the result of the prompt template
88
+ * Name of the parameter that is the result of the template
89
89
  */
90
90
  readonly resultingParameterName: string_name;
91
91
  }
92
92
  /**
93
- * TODO: [🧠][🥜]
94
93
  * TODO: use one helper type> (string_prompt | string_javascript | string_markdown) & string_template
95
94
  * TODO: [♈] Probbably move expectations from templates to parameters
96
95
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Promptbook is the **core concept of this package**.
3
- * It represents a series of prompt templates chained together to form a pipeline / one big prompt template with input and result parameters.
3
+ * It represents a series of templates chained together to form a pipeline / one big template with input and result parameters.
4
4
  *
5
5
  * @see @@@ https://github.com/webgptorg/promptbook#promptbook
6
6
  */
@@ -1,4 +1,4 @@
1
- import type { ExpectFormatCommand } from '../commands/EXPECT/ExpectFormatCommand';
1
+ import type { FormatCommand } from '../commands/FORMAT/FormatCommand';
2
2
  import type { ChatModelRequirements } from './ModelRequirements';
3
3
  import type { CompletionModelRequirements } from './ModelRequirements';
4
4
  import type { EmbeddingModelRequirements } from './ModelRequirements';
@@ -54,6 +54,8 @@ export type EmbeddingPrompt = CommonPrompt & {
54
54
  * Common properties for all prompt results
55
55
  *
56
56
  * Note: [🚉] This is fully serializable as JSON
57
+ *
58
+ * @private just abstract the common properties of the prompts
57
59
  */
58
60
  export type CommonPrompt = {
59
61
  /**
@@ -89,7 +91,7 @@ export type CommonPrompt = {
89
91
  * Note: Expectations are performed after all postprocessing steps
90
92
  * @deprecated [💝]
91
93
  */
92
- readonly expectFormat?: ExpectFormatCommand['format'];
94
+ readonly format?: FormatCommand['format'];
93
95
  /**
94
96
  * Unique identifier of the pipeline with specific template name as hash
95
97
  *
@@ -35,7 +35,7 @@ export type ExecutionReportJson = {
35
35
  */
36
36
  readonly description?: string_markdown_text;
37
37
  /**
38
- * Sequence of prompt templates in order which were executed
38
+ * Sequence of templates in order which were executed
39
39
  */
40
40
  readonly promptExecutions: Array<ExecutionPromptReportJson>;
41
41
  };
@@ -10,5 +10,6 @@ export declare function addAutoGeneratedSection(content: string_markdown, option
10
10
  readonly sectionContent: string_markdown;
11
11
  }): string_markdown;
12
12
  /**
13
+ * TODO: !!!!!! Somw way how to connect this with commands
13
14
  * TODO: [🏛] This can be part of markdown builder
14
15
  */
@@ -27,7 +27,7 @@ export type CodeBlock = {
27
27
  *
28
28
  * @param markdown any valid markdown
29
29
  * @returns code blocks with language and content
30
- * @throws {ParsingError} if block is not closed properly
30
+ * @throws {ParseError} if block is not closed properly
31
31
  * @public exported from `@promptbook/markdown-utils`
32
32
  */
33
33
  export declare function extractAllBlocksFromMarkdown(markdown: string_markdown): Array<CodeBlock>;
@@ -3,7 +3,7 @@ import type { CodeBlock } from './extractAllBlocksFromMarkdown';
3
3
  /**
4
4
  * Extracts exactly ONE code block from markdown.
5
5
  *
6
- * - When there are multiple or no code blocks the function throws a `ParsingError`
6
+ * - When there are multiple or no code blocks the function throws a `ParseError`
7
7
  *
8
8
  * Note: There are multiple simmilar function:
9
9
  * - `extractBlock` just extracts the content of the code block which is also used as build-in function for postprocessing
@@ -14,7 +14,7 @@ import type { CodeBlock } from './extractAllBlocksFromMarkdown';
14
14
  * @param markdown any valid markdown
15
15
  * @returns code block with language and content
16
16
  * @public exported from `@promptbook/markdown-utils`
17
- * @throws {ParsingError} if there is not exactly one code block in the markdown
17
+ * @throws {ParseError} if there is not exactly one code block in the markdown
18
18
  */
19
19
  export declare function extractOneBlockFromMarkdown(markdown: string_markdown): CodeBlock;
20
20
  /***
@@ -0,0 +1,7 @@
1
+ import type { really_unknown } from './really_unknown';
2
+ /**
3
+ * Formatting helper to put void to keep longer version of prettier
4
+ *
5
+ * @private within the repository
6
+ */
7
+ export type ___and___ = really_unknown;
@@ -3,4 +3,4 @@
3
3
  *
4
4
  * @private within the repository
5
5
  */
6
- export type ___ = never;
6
+ export type ___or___ = never;
@@ -5,7 +5,7 @@
5
5
  * Note: it also works only with decimal numbers
6
6
  *
7
7
  * @returns parsed number
8
- * @throws {ParsingError} if the value is not a number
8
+ * @throws {ParseError} if the value is not a number
9
9
  *
10
10
  * @public exported from `@promptbook/utils`
11
11
  */
@@ -9,5 +9,5 @@ import type { PipelineJson } from '../../types/PipelineJson/PipelineJson';
9
9
  */
10
10
  export declare function clonePipeline(pipeline: PipelineJson): PipelineJson;
11
11
  /**
12
- * TODO: [🍙] Make some standart order of json properties
12
+ * TODO: [🍙] Make some standard order of json properties
13
13
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@promptbook/browser",
3
- "version": "0.68.0-0",
3
+ "version": "0.68.0-2",
4
4
  "description": "Supercharge your use of large language models",
5
5
  "private": false,
6
6
  "sideEffects": false,
@@ -47,7 +47,7 @@
47
47
  "module": "./esm/index.es.js",
48
48
  "typings": "./esm/typings/src/_packages/browser.index.d.ts",
49
49
  "peerDependencies": {
50
- "@promptbook/core": "0.68.0-0"
50
+ "@promptbook/core": "0.68.0-2"
51
51
  },
52
52
  "dependencies": {
53
53
  "spacetrim": "0.11.39"
package/umd/index.umd.js CHANGED
@@ -12,7 +12,7 @@
12
12
  /**
13
13
  * The version of the Promptbook library
14
14
  */
15
- var PROMPTBOOK_VERSION = '0.67.9';
15
+ var PROMPTBOOK_VERSION = '0.68.0-1';
16
16
  // TODO: !!!! List here all the versions and annotate + put into script
17
17
 
18
18
  /*! *****************************************************************************
@@ -143,7 +143,7 @@
143
143
  this.options = options;
144
144
  }
145
145
  /**
146
- * Trigger window.PROMPT DIALOG
146
+ * Trigger window.DIALOG BLOCK
147
147
  */
148
148
  SimplePromptInterfaceTools.prototype.promptDialog = function (options) {
149
149
  return __awaiter(this, void 0, void 0, function () {
@@ -464,7 +464,7 @@
464
464
  * TODO: [🐝] Not Working propperly @see https://promptbook.studio/samples/mixed-knowledge.ptbk.md
465
465
  * TODO: [🧠][0] Maybe rename to `stringifyPipelineJson`, `stringifyIndexedJson`,...
466
466
  * TODO: [🧠] Maybe more elegant solution than replacing via regex
467
- * TODO: [🍙] Make some standart order of json properties
467
+ * TODO: [🍙] Make some standard order of json properties
468
468
  */
469
469
 
470
470
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"index.umd.js","sources":["../../../../src/version.ts","../../../node_modules/tslib/tslib.es6.js","../../../../src/errors/PipelineExecutionError.ts","../../../../src/knowledge/dialogs/simple-prompt/SimplePromptInterfaceTools.ts","../../../../src/errors/EnvironmentMismatchError.ts","../../../../src/utils/serialization/$deepFreeze.ts","../../../../src/errors/UnexpectedError.ts","../../../../src/utils/serialization/checkSerializableAsJson.ts","../../../../src/utils/serialization/$asDeeplyFrozenSerializableJson.ts","../../../../src/config.ts","../../../../src/utils/serialization/isSerializableAsJson.ts","../../../../src/conversion/utils/stringifyPipelineJson.ts","../../../../src/storage/utils/makePromptbookStorageFromWebStorage.ts","../../../../src/storage/local-storage/getLocalStorage.ts","../../../../src/storage/local-storage/getSessionStorage.ts"],"sourcesContent":[null,"/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n",null,null,null,null,null,null,null,null,null,null,null,null,null],"names":["spa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;SACtG;QAED,OAAO,mCAAmC,CAAQ,cAAc,CAAC,CAAC;IACtE,CAAC;IAED;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.umd.js","sources":["../../../../src/version.ts","../../../node_modules/tslib/tslib.es6.js","../../../../src/errors/PipelineExecutionError.ts","../../../../src/knowledge/dialogs/simple-prompt/SimplePromptInterfaceTools.ts","../../../../src/errors/EnvironmentMismatchError.ts","../../../../src/utils/serialization/$deepFreeze.ts","../../../../src/errors/UnexpectedError.ts","../../../../src/utils/serialization/checkSerializableAsJson.ts","../../../../src/utils/serialization/$asDeeplyFrozenSerializableJson.ts","../../../../src/config.ts","../../../../src/utils/serialization/isSerializableAsJson.ts","../../../../src/conversion/utils/stringifyPipelineJson.ts","../../../../src/storage/utils/makePromptbookStorageFromWebStorage.ts","../../../../src/storage/local-storage/getLocalStorage.ts","../../../../src/storage/local-storage/getSessionStorage.ts"],"sourcesContent":[null,"/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n",null,null,null,null,null,null,null,null,null,null,null,null,null],"names":["spaceTrim","isRunningInBrowser"],"mappings":";;;;;;;;;;IAAA;IAIA;;;QAGa,kBAAkB,GAA8B,WAAW;IAGxE;;ICVA;IACA;AACA;IACA;IACA;AACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;AACA;IACA,IAAI,aAAa,GAAG,SAAS,CAAC,EAAE,CAAC,EAAE;IACnC,IAAI,aAAa,GAAG,MAAM,CAAC,cAAc;IACzC,SAAS,EAAE,SAAS,EAAE,EAAE,EAAE,YAAY,KAAK,IAAI,UAAU,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,SAAS,GAAG,CAAC,CAAC,EAAE,CAAC;IACpF,QAAQ,UAAU,CAAC,EAAE,CAAC,EAAE,EAAE,KAAK,IAAI,CAAC,IAAI,CAAC,EAAE,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IAC1G,IAAI,OAAO,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAC/B,CAAC,CAAC;AACF;IACO,SAAS,SAAS,CAAC,CAAC,EAAE,CAAC,EAAE;IAChC,IAAI,IAAI,OAAO,CAAC,KAAK,UAAU,IAAI,CAAC,KAAK,IAAI;IAC7C,QAAQ,MAAM,IAAI,SAAS,CAAC,sBAAsB,GAAG,MAAM,CAAC,CAAC,CAAC,GAAG,+BAA+B,CAAC,CAAC;IAClG,IAAI,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IACxB,IAAI,SAAS,EAAE,GAAG,EAAE,IAAI,CAAC,WAAW,GAAG,CAAC,CAAC,EAAE;IAC3C,IAAI,CAAC,CAAC,SAAS,GAAG,CAAC,KAAK,IAAI,GAAG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AC7B,IAAI,CAACA,uBAAkB,EAAE,EAAE;YACvB,MAAM,IAAI,wBAAwB,CAAC,8DAA8D,CAAC,CAAC;SACtG;QAED,OAAO,mCAAmC,CAAQ,cAAc,CAAC,CAAC;IACtE,CAAC;IAED;;;;;;;;;;;;;;;"}
@@ -1,17 +0,0 @@
1
- import type { ExpectationAmount } from '../../types/PipelineJson/Expectations';
2
- import type { ExpectationUnit } from '../../types/PipelineJson/Expectations';
3
- /**
4
- * Expect amount command describes the desired output of the prompt template (after post-processing)
5
- * It can set limits for the maximum/minimum length of the output, measured in characters, words, sentences, paragraphs,...
6
- *
7
- * Note: LLMs work with tokens, not characters, but in Promptbooks we want to use some human-recognisable and cross-model interoperable units.
8
- */
9
- export type ExpectAmountCommand = {
10
- readonly type: 'EXPECT_AMOUNT';
11
- readonly sign: 'EXACTLY' | 'MINIMUM' | 'MAXIMUM';
12
- readonly unit: ExpectationUnit;
13
- readonly amount: ExpectationAmount;
14
- };
15
- /**
16
- * TODO: [🍋] Allow to `EXPECT` relative amounts like `EXPECT MAX 130% {foo} Words`
17
- */
@@ -1,14 +0,0 @@
1
- import type { PromptTemplateJson } from '../../types/PipelineJson/PromptTemplateJson';
2
- import type { string_parameter_name } from '../../types/typeAliases';
3
- /**
4
- * Parses the prompt template and returns the set of all used parameters
5
- *
6
- * @param promptTemplate the template with used parameters
7
- * @returns the set of parameter names
8
- * @throws {ParsingError} if the script is invalid
9
- * @public exported from `@promptbook/utils`
10
- */
11
- export declare function extractParameterNamesFromPromptTemplate(promptTemplate: Pick<PromptTemplateJson, 'title' | 'description' | 'blockType' | 'content' | 'preparedContent' | 'jokerParameterNames'>): Set<string_parameter_name>;
12
- /**
13
- * TODO: [🔣] If script require contentLanguage
14
- */
@@ -1,27 +0,0 @@
1
- import type { ModelRequirements } from '../ModelRequirements';
2
- import type { string_name } from '../typeAliases';
3
- import type { PromptTemplateJsonCommon } from './PromptTemplateJsonCommon';
4
- /**
5
- * Template for prompt to LLM
6
- *
7
- * Note: [🚉] This is fully serializable as JSON
8
- */
9
- export type LlmTemplateJson = PromptTemplateJsonCommon & {
10
- readonly blockType: 'PROMPT_TEMPLATE';
11
- /**
12
- * Name of the persona who will be responding to this prompt
13
- */
14
- readonly personaName?: string_name;
15
- /**
16
- * Requirements for the model
17
- * - This is required only for blockType PROMPT_TEMPLATE
18
- */
19
- readonly modelRequirements?: Partial<ModelRequirements>;
20
- };
21
- /**
22
- * TODO: [🧠][🥜]
23
- * TODO: [👙][🧠] Maybe add `knowledge`, `actions` and `instruments` to be available granularly for each template
24
- * @see https://github.com/webgptorg/promptbook/discussions/79
25
- * TODO: [💕][🧠] Just selecting gpt3 or gpt4 level of model
26
- * TODO: [🍙] Make some standart order of json properties
27
- */