@promptbook/remote-client 0.61.0-15 โ†’ 0.61.0-17

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/esm/index.es.js +1 -1
  2. package/esm/typings/promptbook-collection/index.d.ts +12 -15
  3. package/esm/typings/src/_packages/core.index.d.ts +2 -1
  4. package/esm/typings/src/_packages/node.index.d.ts +2 -1
  5. package/esm/typings/src/_packages/types.index.d.ts +2 -3
  6. package/esm/typings/src/_packages/utils.index.d.ts +4 -3
  7. package/esm/typings/src/commands/KNOWLEDGE/KnowledgeCommand.d.ts +2 -3
  8. package/esm/typings/src/commands/_common/types/CommandParser.d.ts +28 -3
  9. package/esm/typings/src/config.d.ts +26 -1
  10. package/esm/typings/src/config.test.d.ts +4 -0
  11. package/esm/typings/src/conversion/utils/extractParametersFromPromptTemplate.d.ts +2 -2
  12. package/esm/typings/src/conversion/utils/stringifyPipelineJson.d.ts +1 -1
  13. package/esm/typings/src/conversion/validation/validatePipeline.d.ts +3 -0
  14. package/esm/typings/src/execution/PipelineExecutor.d.ts +5 -5
  15. package/esm/typings/src/execution/PromptResultUsage.d.ts +3 -3
  16. package/esm/typings/src/execution/ScriptExecutionTools.d.ts +2 -3
  17. package/esm/typings/src/execution/createPipelineExecutor.d.ts +16 -3
  18. package/esm/typings/src/formats/_common/FormatDefinition.d.ts +1 -1
  19. package/esm/typings/src/knowledge/prepare-knowledge/_common/Scraper.d.ts +27 -0
  20. package/esm/typings/src/knowledge/prepare-knowledge/_common/prepareKnowledgePieces.d.ts +1 -1
  21. package/esm/typings/src/knowledge/prepare-knowledge/markdown/prepareKnowledgeFromMarkdown.d.ts +1 -1
  22. package/esm/typings/src/knowledge/prepare-knowledge/pdf/prepareKnowledgeFromPdf.d.ts +1 -1
  23. package/esm/typings/src/llm-providers/anthropic-claude/AnthropicClaudeExecutionTools.d.ts +1 -1
  24. package/esm/typings/src/llm-providers/azure-openai/AzureOpenAiExecutionTools.d.ts +2 -2
  25. package/esm/typings/src/llm-providers/mocked/MockedEchoLlmExecutionTools.d.ts +2 -2
  26. package/esm/typings/src/llm-providers/mocked/MockedFackedLlmExecutionTools.d.ts +3 -3
  27. package/esm/typings/src/llm-providers/openai/OpenAiExecutionTools.d.ts +3 -3
  28. package/esm/typings/src/prepare/isPipelinePrepared.d.ts +10 -0
  29. package/esm/typings/src/prepare/preparePipeline.d.ts +1 -0
  30. package/esm/typings/src/types/PipelineJson/LlmTemplateJson.d.ts +2 -1
  31. package/esm/typings/src/types/PipelineJson/PipelineJson.d.ts +1 -0
  32. package/esm/typings/src/types/PipelineJson/PromptDialogJson.d.ts +3 -0
  33. package/esm/typings/src/types/PipelineJson/PromptTemplateJson.d.ts +4 -0
  34. package/esm/typings/src/types/PipelineJson/PromptTemplateJsonCommon.d.ts +5 -3
  35. package/esm/typings/src/types/Prompt.d.ts +7 -10
  36. package/esm/typings/src/types/typeAliases.d.ts +44 -4
  37. package/esm/typings/src/utils/deepFreeze.d.ts +10 -1
  38. package/esm/typings/src/utils/extractParameters.d.ts +2 -2
  39. package/esm/typings/src/{execution/utils โ†’ utils}/replaceParameters.d.ts +2 -4
  40. package/esm/typings/src/utils/sets/difference.d.ts +3 -0
  41. package/package.json +2 -2
  42. package/umd/index.umd.js +1 -1
  43. package/umd/typings/promptbook-collection/index.d.ts +12 -15
  44. package/umd/typings/src/_packages/core.index.d.ts +2 -1
  45. package/umd/typings/src/_packages/node.index.d.ts +2 -1
  46. package/umd/typings/src/_packages/types.index.d.ts +2 -3
  47. package/umd/typings/src/_packages/utils.index.d.ts +4 -3
  48. package/umd/typings/src/commands/KNOWLEDGE/KnowledgeCommand.d.ts +2 -3
  49. package/umd/typings/src/commands/_common/types/CommandParser.d.ts +28 -3
  50. package/umd/typings/src/config.d.ts +26 -1
  51. package/umd/typings/src/config.test.d.ts +4 -0
  52. package/umd/typings/src/conversion/utils/extractParametersFromPromptTemplate.d.ts +2 -2
  53. package/umd/typings/src/conversion/utils/stringifyPipelineJson.d.ts +1 -1
  54. package/umd/typings/src/conversion/validation/validatePipeline.d.ts +3 -0
  55. package/umd/typings/src/execution/PipelineExecutor.d.ts +5 -5
  56. package/umd/typings/src/execution/PromptResultUsage.d.ts +3 -3
  57. package/umd/typings/src/execution/ScriptExecutionTools.d.ts +2 -3
  58. package/umd/typings/src/execution/createPipelineExecutor.d.ts +16 -3
  59. package/umd/typings/src/formats/_common/FormatDefinition.d.ts +1 -1
  60. package/umd/typings/src/knowledge/prepare-knowledge/_common/Scraper.d.ts +27 -0
  61. package/umd/typings/src/knowledge/prepare-knowledge/_common/prepareKnowledgePieces.d.ts +1 -1
  62. package/umd/typings/src/knowledge/prepare-knowledge/markdown/prepareKnowledgeFromMarkdown.d.ts +1 -1
  63. package/umd/typings/src/knowledge/prepare-knowledge/pdf/prepareKnowledgeFromPdf.d.ts +1 -1
  64. package/umd/typings/src/llm-providers/anthropic-claude/AnthropicClaudeExecutionTools.d.ts +1 -1
  65. package/umd/typings/src/llm-providers/azure-openai/AzureOpenAiExecutionTools.d.ts +2 -2
  66. package/umd/typings/src/llm-providers/mocked/MockedEchoLlmExecutionTools.d.ts +2 -2
  67. package/umd/typings/src/llm-providers/mocked/MockedFackedLlmExecutionTools.d.ts +3 -3
  68. package/umd/typings/src/llm-providers/openai/OpenAiExecutionTools.d.ts +3 -3
  69. package/umd/typings/src/prepare/isPipelinePrepared.d.ts +10 -0
  70. package/umd/typings/src/prepare/isPipelinePrepared.test.d.ts +1 -0
  71. package/umd/typings/src/prepare/preparePipeline.d.ts +1 -0
  72. package/umd/typings/src/types/PipelineJson/LlmTemplateJson.d.ts +2 -1
  73. package/umd/typings/src/types/PipelineJson/PipelineJson.d.ts +1 -0
  74. package/umd/typings/src/types/PipelineJson/PromptDialogJson.d.ts +3 -0
  75. package/umd/typings/src/types/PipelineJson/PromptTemplateJson.d.ts +4 -0
  76. package/umd/typings/src/types/PipelineJson/PromptTemplateJsonCommon.d.ts +5 -3
  77. package/umd/typings/src/types/Prompt.d.ts +7 -10
  78. package/umd/typings/src/types/typeAliases.d.ts +44 -4
  79. package/umd/typings/src/utils/deepFreeze.d.ts +10 -1
  80. package/umd/typings/src/utils/extractParameters.d.ts +2 -2
  81. package/umd/typings/src/{execution/utils โ†’ utils}/replaceParameters.d.ts +2 -4
  82. package/umd/typings/src/utils/replaceParameters.test.d.ts +1 -0
  83. package/umd/typings/src/utils/sets/difference.d.ts +3 -0
  84. package/esm/typings/src/types/Parameters.d.ts +0 -14
  85. package/umd/typings/src/types/Parameters.d.ts +0 -14
  86. /package/esm/typings/src/{execution/utils/replaceParameters.test.d.ts โ†’ prepare/isPipelinePrepared.test.d.ts} +0 -0
  87. /package/{umd/typings/src/execution โ†’ esm/typings/src}/utils/replaceParameters.test.d.ts +0 -0
package/esm/index.es.js CHANGED
@@ -214,7 +214,7 @@ var RemoteLlmExecutionTools = /** @class */ (function () {
214
214
  /**
215
215
  * The version of the Promptbook library
216
216
  */
217
- var PROMPTBOOK_VERSION = '0.61.0-14';
217
+ var PROMPTBOOK_VERSION = '0.61.0-16';
218
218
  // TODO: !!!! List here all the versions and annotate + put into script
219
219
 
220
220
  export { PROMPTBOOK_VERSION, RemoteLlmExecutionTools };
@@ -9,16 +9,15 @@ declare const _default: ({
9
9
  isOutput: boolean;
10
10
  }[];
11
11
  promptTemplates: {
12
+ blockType: string;
12
13
  name: string;
13
14
  title: string;
14
- dependentParameterNames: string[];
15
- blockType: string;
16
- personaName: null;
17
15
  modelRequirements: {
18
16
  modelVariant: string;
19
17
  modelName: string;
20
18
  };
21
19
  content: string;
20
+ dependentParameterNames: string[];
22
21
  resultingParameterName: string;
23
22
  }[];
24
23
  knowledgeSources: never[];
@@ -91,22 +90,21 @@ declare const _default: ({
91
90
  isOutput: boolean;
92
91
  }[];
93
92
  promptTemplates: {
93
+ blockType: string;
94
94
  name: string;
95
95
  title: string;
96
- dependentParameterNames: string[];
97
- blockType: string;
96
+ modelRequirements: {
97
+ modelVariant: string;
98
+ modelName: string;
99
+ };
100
+ content: string;
98
101
  expectations: {
99
102
  words: {
100
103
  min: number;
101
104
  max: number;
102
105
  };
103
106
  };
104
- personaName: null;
105
- modelRequirements: {
106
- modelVariant: string;
107
- modelName: string;
108
- };
109
- content: string;
107
+ dependentParameterNames: string[];
110
108
  resultingParameterName: string;
111
109
  }[];
112
110
  knowledgeSources: never[];
@@ -179,17 +177,16 @@ declare const _default: ({
179
177
  isOutput: boolean;
180
178
  }[];
181
179
  promptTemplates: {
180
+ blockType: string;
182
181
  name: string;
183
182
  title: string;
184
- dependentParameterNames: string[];
185
- blockType: string;
186
- expectFormat: string;
187
- personaName: null;
188
183
  modelRequirements: {
189
184
  modelVariant: string;
190
185
  modelName: string;
191
186
  };
192
187
  content: string;
188
+ expectFormat: string;
189
+ dependentParameterNames: string[];
193
190
  resultingParameterName: string;
194
191
  }[];
195
192
  knowledgeSources: never[];
@@ -9,6 +9,7 @@ import { pipelineJsonToString } from '../conversion/pipelineJsonToString';
9
9
  import { pipelineStringToJson } from '../conversion/pipelineStringToJson';
10
10
  import { pipelineStringToJsonSync } from '../conversion/pipelineStringToJsonSync';
11
11
  import { prettifyPipelineString } from '../conversion/prettify/prettifyPipelineString';
12
+ import { stringifyPipelineJson } from '../conversion/utils/stringifyPipelineJson';
12
13
  import { validatePipeline } from '../conversion/validation/validatePipeline';
13
14
  import { CollectionError } from '../errors/CollectionError';
14
15
  import { NotFoundError } from '../errors/NotFoundError';
@@ -41,7 +42,7 @@ export { BlockTypes, RESERVED_PARAMETER_NAMES };
41
42
  export { addUsage, assertsExecutionSuccessful, checkExpectations, embeddingVectorToString, executionReportJsonToString, ExecutionReportStringOptions, ExecutionReportStringOptionsDefaults, isPassingExpectations, prepareKnowledgeFromMarkdown, prettifyPipelineString, usageToWorktime, };
42
43
  export { collectionToJson, createCollectionFromJson, createCollectionFromPromise, createCollectionFromUrl, createSubcollection, };
43
44
  export { SimplePromptInterfaceTools };
44
- export { pipelineJsonToString, pipelineStringToJson, pipelineStringToJsonSync, validatePipeline };
45
+ export { pipelineJsonToString, pipelineStringToJson, pipelineStringToJsonSync, stringifyPipelineJson, validatePipeline, };
45
46
  export { preparePipeline, unpreparePipeline };
46
47
  export { createPipelineExecutor, joinLlmExecutionTools };
47
48
  export { CallbackInterfaceTools, CallbackInterfaceToolsOptions };
@@ -1,4 +1,5 @@
1
1
  import { createCollectionFromDirectory } from '../collection/constructors/createCollectionFromDirectory';
2
+ import { createLlmToolsFromEnv } from '../llm-providers/_common/createLlmToolsFromEnv';
2
3
  import { PROMPTBOOK_VERSION } from '../version';
3
4
  export { PROMPTBOOK_VERSION };
4
- export { createCollectionFromDirectory };
5
+ export { createCollectionFromDirectory, createLlmToolsFromEnv };
@@ -12,7 +12,6 @@ import type { UncertainNumber } from '../execution/UncertainNumber';
12
12
  import type { UserInterfaceTools, UserInterfaceToolsPromptDialogOptions } from '../execution/UserInterfaceTools';
13
13
  import type { ModelRequirements } from '../types/ModelRequirements';
14
14
  import type { ModelVariant } from '../types/ModelVariant';
15
- import type { Parameters } from '../types/Parameters';
16
15
  import type { ExpectationAmount, ExpectationUnit, Expectations } from '../types/PipelineJson/Expectations';
17
16
  import { EXPECTATION_UNITS } from '../types/PipelineJson/Expectations';
18
17
  import { KnowledgePiecePreparedJson } from '../types/PipelineJson/KnowledgePieceJson';
@@ -32,12 +31,12 @@ import type { ScriptLanguage } from '../types/ScriptLanguage';
32
31
  import type { TaskProgress } from '../types/TaskProgress';
33
32
  import type { ExecutionReportJson } from '../types/execution-report/ExecutionReportJson';
34
33
  import type { string_char_emoji } from '../types/typeAliasEmoji';
35
- import type { client_id, number_model_temperature, number_seed, string_char, string_chat_prompt, string_completion_prompt, string_data_url, string_domain, string_email, string_emails, string_file_absolute_path, string_file_extension, string_file_path, string_file_relative_path, string_filename, string_folder_absolute_path, string_folder_path, string_folder_relative_path, string_host, string_hostname, string_href, string_html, string_javascript, string_javascript_name, string_license, string_markdown, string_markdown_text, string_mime_type, string_mime_type_with_wildcard, string_model_name, string_name, string_parameter_name, string_parameter_value, string_person_fullname, string_pipeline_url, string_pipeline_url_with_hashtemplate, string_prompt, string_script, string_semantic_version, string_sha256, string_system_message, string_tdl, string_template, string_text_prompt, string_title, string_token, string_translate_language, string_uri, string_uri_part, string_url, string_url_image, string_uuid } from '../types/typeAliases';
34
+ import type { Parameters, ReservedParameters, client_id, number_model_temperature, number_seed, string_char, string_chat_prompt, string_completion_prompt, string_data_url, string_domain, string_email, string_emails, string_file_absolute_path, string_file_extension, string_file_path, string_file_relative_path, string_filename, string_folder_absolute_path, string_folder_path, string_folder_relative_path, string_host, string_hostname, string_href, string_html, string_javascript, string_javascript_name, string_license, string_markdown, string_markdown_text, string_mime_type, string_mime_type_with_wildcard, string_model_name, string_name, string_parameter_name, string_parameter_value, string_person_fullname, string_pipeline_url, string_pipeline_url_with_hashtemplate, string_prompt, string_promptbook_documentation_url, string_reserved_parameter_name, string_script, string_semantic_version, string_sha256, string_system_message, string_tdl, string_template, string_text_prompt, string_title, string_token, string_translate_language, string_uri, string_uri_part, string_url, string_url_image, string_uuid } from '../types/typeAliases';
36
35
  import type { FromtoItems } from '../utils/FromtoItems';
37
36
  import { PROMPTBOOK_VERSION, string_promptbook_version } from '../version';
38
37
  export { PROMPTBOOK_VERSION };
39
38
  export { EXPECTATION_UNITS };
40
- export type { AvailableModel, BlockType, CommonExecutionToolsOptions, EmbeddingVector, ExecutionReportJson, ExecutionTools, ExpectationAmount, ExpectationUnit, Expectations, FromtoItems, KnowledgePiecePreparedJson, KnowledgeSourceJson, KnowledgeSourcePreparedJson, LlmExecutionTools, LlmTemplateJson, ModelRequirements, ModelVariant, Parameters, PersonaJson, PersonaPreparedJson, PipelineCollection, PipelineExecutor, PipelineJson, PipelineString, PreparationJson, Prompt, ChatPromptResult as PromptChatResult, CommonPromptResult as PromptCommonResult, CompletionPromptResult as PromptCompletionResult, PromptDialogJson, EmbeddingPromptResult as PromptEmbeddingResult, PromptResult, PromptResultUsage, PromptResultUsageCounts, PromptTemplateJson, PromptTemplateParameterJson, ScriptExecutionTools, ScriptExecutionToolsExecuteOptions, ScriptJson, ScriptLanguage, SimpleTemplateJson, TaskProgress, UncertainNumber, UserInterfaceTools, UserInterfaceToolsPromptDialogOptions, client_id, number_model_temperature, number_seed, string_char, string_char_emoji, string_chat_prompt, string_completion_prompt, string_data_url, string_domain, string_email, string_emails, string_file_absolute_path, string_file_extension, string_file_path, string_file_relative_path, string_filename, string_folder_absolute_path, string_folder_path, string_folder_relative_path, string_host, string_hostname, string_href, string_html, string_javascript, string_javascript_name, string_license, string_markdown, string_markdown_text, string_mime_type, string_mime_type_with_wildcard, string_model_name, string_name, string_parameter_name, string_parameter_value, string_person_fullname, string_pipeline_url, string_pipeline_url_with_hashtemplate, string_prompt, string_promptbook_version, string_script, string_semantic_version, string_sha256, string_system_message, string_tdl, string_template, string_text_prompt, string_title, string_token, string_translate_language, string_uri, string_uri_part, string_url, string_url_image, string_uuid, };
39
+ export type { AvailableModel, BlockType, CommonExecutionToolsOptions, EmbeddingVector, ExecutionReportJson, ExecutionTools, ExpectationAmount, ExpectationUnit, Expectations, FromtoItems, KnowledgePiecePreparedJson, KnowledgeSourceJson, KnowledgeSourcePreparedJson, LlmExecutionTools, LlmTemplateJson, ModelRequirements, ModelVariant, Parameters, PersonaJson, PersonaPreparedJson, PipelineCollection, PipelineExecutor, PipelineJson, PipelineString, PreparationJson, Prompt, ChatPromptResult as PromptChatResult, CommonPromptResult as PromptCommonResult, CompletionPromptResult as PromptCompletionResult, PromptDialogJson, EmbeddingPromptResult as PromptEmbeddingResult, PromptResult, PromptResultUsage, PromptResultUsageCounts, PromptTemplateJson, PromptTemplateParameterJson, ReservedParameters, ScriptExecutionTools, ScriptExecutionToolsExecuteOptions, ScriptJson, ScriptLanguage, SimpleTemplateJson, TaskProgress, UncertainNumber, UserInterfaceTools, UserInterfaceToolsPromptDialogOptions, client_id, number_model_temperature, number_seed, string_char, string_char_emoji, string_chat_prompt, string_completion_prompt, string_data_url, string_domain, string_email, string_emails, string_file_absolute_path, string_file_extension, string_file_path, string_file_relative_path, string_filename, string_folder_absolute_path, string_folder_path, string_folder_relative_path, string_host, string_hostname, string_href, string_html, string_javascript, string_javascript_name, string_license, string_markdown, string_markdown_text, string_mime_type, string_mime_type_with_wildcard, string_model_name, string_name, string_parameter_name, string_parameter_value, string_person_fullname, string_pipeline_url, string_pipeline_url_with_hashtemplate, string_prompt, string_promptbook_documentation_url, string_promptbook_version, string_reserved_parameter_name, string_script, string_semantic_version, string_sha256, string_system_message, string_tdl, string_template, string_text_prompt, string_title, string_token, string_translate_language, string_uri, string_uri_part, string_url, string_url_image, string_uuid, };
41
40
  /**
42
41
  * TODO: Delete type aliases (from ../types/typeAliases) that are not exported here
43
42
  */
@@ -5,7 +5,6 @@ import { extractVariables } from '../conversion/utils/extractVariables';
5
5
  import { renameParameter } from '../conversion/utils/renameParameter';
6
6
  import { titleToName } from '../conversion/utils/titleToName';
7
7
  import { forEachAsync } from '../execution/utils/forEachAsync';
8
- import { replaceParameters } from '../execution/utils/replaceParameters';
9
8
  import { isValidJsonString } from '../formats/json/utils/isValidJsonString';
10
9
  import { extractBlock } from '../postprocessing/utils/extractBlock';
11
10
  import { $currentDate } from '../utils/currentDate';
@@ -38,6 +37,7 @@ import { parseNumber } from '../utils/parseNumber';
38
37
  import { $randomSeed } from '../utils/random/randomSeed';
39
38
  import { removeEmojis } from '../utils/removeEmojis';
40
39
  import { removeQuotes } from '../utils/removeQuotes';
40
+ import { replaceParameters } from '../utils/replaceParameters';
41
41
  import { difference } from '../utils/sets/difference';
42
42
  import { intersection } from '../utils/sets/intersection';
43
43
  import { union } from '../utils/sets/union';
@@ -55,9 +55,10 @@ 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 { extractParameters, extractVariables, replaceParameters, spaceTrim };
58
59
  export { $currentDate, $randomSeed, extractBlock, // <- [๐ŸŒป] + maybe export through `@promptbook/markdown-utils`
59
- extractParameters, extractVariables, isHostnameOnPrivateNetwork, isUrlOnPrivateNetwork, isValidFilePath, isValidJavascriptName, isValidJsonString, isValidPipelineUrl, isValidPromptbookVersion, isValidSemanticVersion, isValidUrl, isValidUuid, parseNumber, // <- [๐ŸŒป]
60
- removeEmojis, removeQuotes, replaceParameters, spaceTrim, trimCodeBlock, trimEndOfCodeBlock, unwrapResult, };
60
+ isHostnameOnPrivateNetwork, isUrlOnPrivateNetwork, isValidFilePath, isValidJavascriptName, isValidJsonString, isValidPipelineUrl, isValidPromptbookVersion, isValidSemanticVersion, isValidUrl, isValidUuid, parseNumber, // <- [๐ŸŒป]
61
+ removeEmojis, removeQuotes, trimCodeBlock, trimEndOfCodeBlock, unwrapResult, };
61
62
  export { countCharacters, countLines, countPages, countParagraphs, countSentences, CountUtils, countWords };
62
63
  export { splitIntoSentences };
63
64
  export declare const normalizeTo: {
@@ -1,5 +1,4 @@
1
- import type { string_file_relative_path } from '../../types/typeAliases';
2
- import type { string_url } from '../../types/typeAliases';
1
+ import type { string_knowledge_source } from '../../types/typeAliases';
3
2
  /**
4
3
  * Parsed KNOWLEDGE command
5
4
  *
@@ -8,5 +7,5 @@ import type { string_url } from '../../types/typeAliases';
8
7
  */
9
8
  export type KnowledgeCommand = {
10
9
  readonly type: 'KNOWLEDGE';
11
- readonly source: string_url | string_file_relative_path;
10
+ readonly source: string_knowledge_source;
12
11
  };
@@ -1,7 +1,9 @@
1
1
  import type { WritableDeep } from 'type-fest';
2
+ import type { PromptTemplateJson } from '../../../types/PipelineJson/PromptTemplateJson';
2
3
  import type { PipelineJson } from '../../../types/PipelineJson/PipelineJson';
3
4
  import type { string_markdown_text } from '../../../types/typeAliases';
4
5
  import type { string_name } from '../../../types/typeAliases';
6
+ import type { string_promptbook_documentation_url } from '../../../types/typeAliases';
5
7
  import type { string_SCREAMING_CASE } from '../../../utils/normalization/normalizeTo_SCREAMING_CASE';
6
8
  import type { CommandUsagePlace } from './CommandUsagePlaces';
7
9
  export type CommandParser<TCommand extends {
@@ -12,13 +14,16 @@ export type CommandParser<TCommand extends {
12
14
  readonly deprecatedNames?: Array<string_name & string_SCREAMING_CASE>;
13
15
  readonly usagePlaces: Array<CommandUsagePlace>;
14
16
  readonly description: string_markdown_text;
15
- readonly discussionUrl: `https://github.com/webgptorg/promptbook/discussions/${number | '@@'}`;
17
+ readonly documentationUrl: string_promptbook_documentation_url;
16
18
  readonly examples: Array<string_markdown_text>;
17
19
  /**
18
20
  * @throws {ParsingError} if the parsing fails
19
21
  */
20
22
  parse(input: CommandParserInput): TCommand;
21
- applyToPipelineJson?(pipelineJson: WritableDeep<PipelineJson>, personaCommand: TCommand): void;
23
+ /**
24
+ * @@@ Mutated by the command
25
+ */
26
+ applyToPipelineJson?(command: TCommand, subjects: ApplyToPipelineJsonSubjects): void;
22
27
  };
23
28
  export type CommandParserInput = {
24
29
  readonly usagePlace: CommandUsagePlace;
@@ -27,10 +32,30 @@ export type CommandParserInput = {
27
32
  readonly normalized: string_name & string_SCREAMING_CASE;
28
33
  readonly args: Array<string_name & string_SCREAMING_CASE>;
29
34
  };
35
+ /**
36
+ * @@@ Mutated by the command
37
+ */
38
+ export type ApplyToPipelineJsonSubjects = {
39
+ /**
40
+ * @@@ Mutated by the command
41
+ */
42
+ readonly pipelineJson: WritableDeep<PipelineJson>;
43
+ /**
44
+ * @@@
45
+ *
46
+ * @@@ Mutated by the command
47
+ *
48
+ * When used in
49
+ * - `PIPELINE_HEAD` it is `null`
50
+ * - `PIPELINE_TEMPLATE` it is the prompt template
51
+ */
52
+ readonly templateJson: null | Partial<WritableDeep<PromptTemplateJson>>;
53
+ };
30
54
  /**
31
55
  * TODO: @@@ Annotate all
56
+ * TODO: [๐Ÿง][โ™“๏ธ] Add order here
32
57
  * TODO: [๐Ÿง ] Maybe put flag if it is for whole `.ptbk.md` file of just one section
33
- * TODO: [๐Ÿง] CommandParser should have applyToPipelineJson method
58
+ * TODO: [๐Ÿง] All commands must implement `applyToPipelineJson` method
34
59
  * which will apply parsed command to the pipeline JSON
35
60
  * it will be called from `pipelineStringToJsonSync`
36
61
  * and replace hardcoded switch statement and [๐Ÿ’]
@@ -10,10 +10,28 @@ export declare const CHARACTER_LOOP_LIMIT = 100000;
10
10
  * The maximum number of (LLM) tasks running in parallel
11
11
  */
12
12
  export declare const MAX_PARALLEL_COUNT = 5;
13
+ /**
14
+ * The maximum number of attempts to execute LLM task before giving up
15
+ */
16
+ export declare const MAX_EXECUTION_ATTEMPTS = 3;
13
17
  /**
14
18
  * The maximum length of the (generated) filename
15
19
  */
16
20
  export declare const MAX_FILENAME_LENGTH = 30;
21
+ /**
22
+ * @@@
23
+ * TODO: [๐Ÿ] !!! Use
24
+ */
25
+ export declare const MAX_KNOWLEDGE_SOURCES_SCRAPING_DEPTH = 3;
26
+ /**
27
+ * @@@
28
+ * TODO: [๐Ÿ] !!! Use
29
+ */
30
+ export declare const MAX_KNOWLEDGE_SOURCES_SCRAPING_TOTAL = 200;
31
+ /**
32
+ * Where to store the cache of executions for promptbook CLI
33
+ */
34
+ export declare const EXECUTIONS_CACHE_DIRNAME = "/.promptbook/executions-cache";
17
35
  /**
18
36
  * The name of the builded pipeline collection made by CLI `ptbk make` and for lookup in `createCollectionFromDirectory`
19
37
  */
@@ -21,8 +39,15 @@ export declare const PIPELINE_COLLECTION_BASE_FILENAME = "index";
21
39
  /**
22
40
  * The names of the parameters that are reserved for special purposes
23
41
  */
24
- export declare const RESERVED_PARAMETER_NAMES: readonly string[];
42
+ export declare const RESERVED_PARAMETER_NAMES: readonly ["context", "currentDate"];
43
+ /**
44
+ * @@@
45
+ */
46
+ export declare const DEBUG_ALLOW_PAYED_TESTING: boolean;
25
47
  /**
26
48
  * Nonce which is used for replacing things in strings
27
49
  */
28
50
  export declare const REPLACING_NONCE = "u$k42k%!V2zo34w7Fu#@QUHYPW";
51
+ /**
52
+ * TODO: [๐Ÿ”ผ] Export all to core
53
+ */
@@ -0,0 +1,4 @@
1
+ export {};
2
+ /**
3
+ * TODO: [๐Ÿง ] Maybe more elegant how to prevent accidental costs
4
+ */
@@ -1,5 +1,5 @@
1
1
  import type { PromptTemplateJson } from '../../types/PipelineJson/PromptTemplateJson';
2
- import type { string_name } from '../../types/typeAliases';
2
+ import type { string_parameter_name } from '../../types/typeAliases';
3
3
  /**
4
4
  * Parses the prompt template and returns the set of all used parameters
5
5
  *
@@ -7,7 +7,7 @@ import type { string_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 extractParametersFromPromptTemplate(promptTemplate: Pick<PromptTemplateJson, 'title' | 'description' | 'blockType' | 'content'>): Set<string_name>;
10
+ export declare function extractParametersFromPromptTemplate(promptTemplate: Pick<PromptTemplateJson, 'title' | 'description' | 'blockType' | 'content' | 'jokerParameterNames'>): Set<string_parameter_name>;
11
11
  /**
12
12
  * TODO: [๐Ÿ”ฃ] If script require contentLanguage
13
13
  */
@@ -7,7 +7,7 @@ import type { string_json } from '../../types/typeAliases';
7
7
  */
8
8
  export declare function stringifyPipelineJson<TType>(pipeline: TType): string_json<TType>;
9
9
  /**
10
+ * TODO: !!!! Not Working propperly @see https://promptbook.studio/samples/mixed-knowledge.ptbk.md
10
11
  * TODO: [๐Ÿง ][0] Maybe rename to `stringifyPipelineJson`, `stringifyIndexedJson`,...
11
- * TODO: [๐Ÿ”ผ] Export alongside pipelineStringToJson
12
12
  * TODO: [๐Ÿง ] Maybe more elegant solution than replacing via regex
13
13
  */
@@ -28,6 +28,9 @@ export declare function validatePipeline(pipeline: PipelineJson): PipelineJson;
28
28
  /**
29
29
  * TODO: [๐Ÿง ][๐Ÿฃ] !!!! Validate that all samples match expectations
30
30
  * TODO: [๐Ÿง ][๐Ÿฃ] !!!! Validate that knowledge is valid (non-void)
31
+ * TODO: [๐Ÿง ][๐Ÿฃ] !!!! Validate that persona can be used only with CHAT variant
32
+ * TODO: !!!! Validate that parameter with reserved name not used RESERVED_PARAMETER_NAMES
33
+ * TODO: !!!! Validate that reserved parameter is not used as joker
31
34
  * TODO: [๐Ÿง ] !!! Validationg not only logic itself but imports around - files and websites and rerefenced pipelines exists
32
35
  * TODO: [๐Ÿ› ] Actions, instruments (and maybe knowledge) => Functions and tools
33
36
  */
@@ -1,8 +1,8 @@
1
1
  import type { Promisable } from 'type-fest';
2
+ import { PipelineExecutionError } from '../errors/PipelineExecutionError';
2
3
  import type { TaskProgress } from '../types/TaskProgress';
3
4
  import type { ExecutionReportJson } from '../types/execution-report/ExecutionReportJson';
4
- import type { string_parameter_name } from '../types/typeAliases';
5
- import type { string_parameter_value } from '../types/typeAliases';
5
+ import type { Parameters } from '../types/typeAliases';
6
6
  import type { PromptResultUsage } from './PromptResultUsage';
7
7
  /**
8
8
  * Executor is a simple async function that takes INPUT PARAMETERs and returns result parameters _(along with all intermediate parameters and INPUT PARAMETERs = it extends input object)_.
@@ -13,7 +13,7 @@ import type { PromptResultUsage } from './PromptResultUsage';
13
13
  * @see https://github.com/webgptorg/promptbook#executor
14
14
  */
15
15
  export type PipelineExecutor = {
16
- (inputParameters: Record<string_parameter_name, string_parameter_value>, onProgress?: (taskProgress: TaskProgress) => Promisable<void>): Promise<{
16
+ (inputParameters: Parameters, onProgress?: (taskProgress: TaskProgress) => Promisable<void>): Promise<{
17
17
  /**
18
18
  * Whether the execution was successful, details are aviable in `executionReport`
19
19
  */
@@ -25,7 +25,7 @@ export type PipelineExecutor = {
25
25
  /**
26
26
  * Errors that occured during the execution, details are aviable in `executionReport`
27
27
  */
28
- readonly errors: Array<Error>;
28
+ readonly errors: Array<PipelineExecutionError | Error>;
29
29
  /**
30
30
  * The report of the execution with all details
31
31
  */
@@ -35,7 +35,7 @@ export type PipelineExecutor = {
35
35
  *
36
36
  * Note: If the execution was not successful, there are only some of the result parameters
37
37
  */
38
- readonly outputParameters: Record<string_parameter_name, string_parameter_value>;
38
+ readonly outputParameters: Parameters;
39
39
  }>;
40
40
  };
41
41
  /**
@@ -10,15 +10,15 @@ export type PromptResultUsage = {
10
10
  *
11
11
  * Note: If the cost is unknown, the value 0 and isUncertain is true
12
12
  */
13
- price: UncertainNumber;
13
+ readonly price: UncertainNumber;
14
14
  /**
15
15
  * Number of whatever used in the input aka. `prompt_tokens`
16
16
  */
17
- input: PromptResultUsageCounts;
17
+ readonly input: PromptResultUsageCounts;
18
18
  /**
19
19
  * Number of tokens used in the output aka. `completion_tokens`
20
20
  */
21
- output: PromptResultUsageCounts;
21
+ readonly output: PromptResultUsageCounts;
22
22
  };
23
23
  /**
24
24
  * Record of all possible measurable units
@@ -1,6 +1,5 @@
1
1
  import type { ScriptLanguage } from '../types/ScriptLanguage';
2
- import type { string_parameter_name } from '../types/typeAliases';
3
- import type { string_parameter_value } from '../types/typeAliases';
2
+ import type { Parameters } from '../types/typeAliases';
4
3
  import type { string_script } from '../types/typeAliases';
5
4
  /**
6
5
  * Represents all the tools needed to EXECUTE SCRIPTs
@@ -23,7 +22,7 @@ export type ScriptExecutionToolsExecuteOptions = {
23
22
  * Theese parameters are passed to the script as variables
24
23
  * For example: { "name": "John" } => const name = "John";
25
24
  */
26
- readonly parameters: Record<string_parameter_name, string_parameter_value>;
25
+ readonly parameters: Parameters;
27
26
  /**
28
27
  * The content of the script to execute
29
28
  * - It can be a single statement
@@ -5,9 +5,21 @@ type CreatePipelineExecutorSettings = {
5
5
  /**
6
6
  * When executor does not satisfy expectations it will be retried this amount of times
7
7
  *
8
- * @default 3
8
+ * @default MAX_EXECUTION_ATTEMPTS
9
9
  */
10
- readonly maxExecutionAttempts: number;
10
+ readonly maxExecutionAttempts?: number;
11
+ /**
12
+ * Maximum number of tasks running in parallel
13
+ *
14
+ * @default MAX_PARALLEL_COUNT
15
+ */
16
+ readonly maxParallelCount?: number;
17
+ /**
18
+ * If true, the preparation logs additional information
19
+ *
20
+ * @default false
21
+ */
22
+ readonly isVerbose?: boolean;
11
23
  };
12
24
  /**
13
25
  * Options for `createPipelineExecutor`
@@ -35,7 +47,8 @@ interface CreatePipelineExecutorOptions {
35
47
  export declare function createPipelineExecutor(options: CreatePipelineExecutorOptions): PipelineExecutor;
36
48
  export {};
37
49
  /**
38
- * TODO: [๐Ÿช‚] Pass maxParallelCount here
50
+ * TODO: Use isVerbose here (not only pass to `preparePipeline`)
51
+ * TODO: [๐Ÿช‚] Use maxParallelCount here (not only pass to `preparePipeline`)
39
52
  * TODO: [โ™ˆ] Probbably move expectations from templates to parameters
40
53
  * TODO: [๐Ÿง ] When not meet expectations in PROMPT_DIALOG, make some way to tell the user
41
54
  * TODO: [๐Ÿ‘ง] Strongly type the executors to avoid need of remove nullables whtn noUncheckedIndexedAccess in tsconfig.json
@@ -65,5 +65,5 @@ export type FormatDefinition<TValue extends TPartialValue, TPartialValue extends
65
65
  * TODO: [๐Ÿ“][๐Ÿ‘จโ€โš–๏ธ] Compute TPartialValue dynamically - PartialString<TValue>
66
66
  * TODO: [๐Ÿ“][๐Ÿง ] Should execution tools be aviable to heal, canBeValid and isValid?
67
67
  * TODO: [๐Ÿ“][๐Ÿง ] llm Provider Bindings
68
- * TODO: [๐Ÿ“]Export via some package
68
+ * TODO: [๐Ÿ“][๐Ÿ”ผ] Export via some package
69
69
  */
@@ -0,0 +1,27 @@
1
+ import type { Promisable } from 'type-fest';
2
+ import type { string_file_path } from '../../../types/typeAliases';
3
+ import type { string_knowledge_source_link } from '../../../types/typeAliases';
4
+ import type { string_markdown } from '../../../types/typeAliases';
5
+ import type { string_markdown_text } from '../../../types/typeAliases';
6
+ import type { string_mime_type } from '../../../types/typeAliases';
7
+ import type { string_mime_type_with_wildcard } from '../../../types/typeAliases';
8
+ import type { string_promptbook_documentation_url } from '../../../types/typeAliases';
9
+ import type { really_unknown } from '../../../utils/organization/really_unknown';
10
+ export type Scraper = {
11
+ readonly description: string_markdown_text;
12
+ readonly documentationUrl: string_promptbook_documentation_url;
13
+ readonly examples: Array<string_file_path>;
14
+ readonly mimeTypes: Array<string_mime_type_with_wildcard>;
15
+ scrape(source: ScraperSourceOptions): Promisable<string_markdown>;
16
+ };
17
+ export type ScraperSourceOptions = {
18
+ readonly source: string_knowledge_source_link;
19
+ readonly mimeType: string_mime_type;
20
+ asJson(): Promise<really_unknown>;
21
+ asText(): Promise<really_unknown>;
22
+ asBlob(): Promise<really_unknown>;
23
+ };
24
+ /**
25
+ * TODO: [๐Ÿ] @@@ Annotate all
26
+ * TODO: [๐Ÿ”ผ] Export via types
27
+ */
@@ -8,7 +8,7 @@ import type { KnowledgeSourceJson } from '../../../types/PipelineJson/KnowledgeS
8
8
  */
9
9
  export declare function prepareKnowledgePieces(knowledgeSources: Array<KnowledgeSourceJson>, options: PrepareOptions): Promise<Array<Omit<KnowledgePiecePreparedJson, 'preparationIds'>>>;
10
10
  /**
11
- * TODO: [๐Ÿ”ผ] !!! Export via `@promptbook/core`
11
+ * TODO: [๐Ÿ][๐Ÿ”ผ] !!! Export via `@promptbook/core`
12
12
  * TODO: [๐ŸงŠ] In future one preparation can take data from previous preparation and save tokens and time
13
13
  * Put `knowledgePieces` into `PrepareKnowledgeOptions`
14
14
  * TODO: [๐Ÿช‚] More than max things can run in parallel by acident [1,[2a,2b,_],[3a,3b,_]]
@@ -6,7 +6,7 @@ import type { string_markdown } from '../../../types/typeAliases';
6
6
  */
7
7
  export declare function prepareKnowledgeFromMarkdown(content: string_markdown, options: PrepareOptions): Promise<Array<Omit<KnowledgePiecePreparedJson, 'sources' | 'preparationIds'>>>;
8
8
  /**
9
- * TODO: [๐Ÿ”ผ] !!! Export via `@promptbook/markdown`
9
+ * TODO: [๐Ÿ][๐Ÿ”ผ] !!! Export via `@promptbook/markdown`
10
10
  * TODO: [๐Ÿช‚] Do it in parallel 11:11
11
11
  * Note: No need to aggregate usage here, it is done by intercepting the llmTools
12
12
  */
@@ -6,7 +6,7 @@ import type { string_base64 } from '../../../types/typeAliases';
6
6
  */
7
7
  export declare function prepareKnowledgeFromPdf(content: string_base64, options: PrepareOptions): Promise<Array<Omit<KnowledgePiecePreparedJson, 'sources' | 'preparationIds'>>>;
8
8
  /**
9
- * TODO: [๐Ÿ”ผ] !!! Export via `@promptbook/pdf`
9
+ * TODO: [๐Ÿ][๐Ÿ”ผ] !!! Export via `@promptbook/pdf`
10
10
  * TODO: [๐Ÿงบ] In future, content can be alse File or Blob BUT for now for wider compatibility its only base64
11
11
  * @see https://stackoverflow.com/questions/14653349/node-js-cant-create-blobs
12
12
  * TODO: [๐Ÿช‚] Do it in parallel
@@ -26,7 +26,7 @@ export declare class AnthropicClaudeExecutionTools implements LlmExecutionTools
26
26
  /**
27
27
  * Calls Anthropic Claude API to use a chat model.
28
28
  */
29
- callChatModel(prompt: Pick<Prompt, 'content' | 'modelRequirements'>): Promise<ChatPromptResult>;
29
+ callChatModel(prompt: Pick<Prompt, 'content' | 'parameters' | 'modelRequirements'>): Promise<ChatPromptResult>;
30
30
  /**
31
31
  * Get the model that should be used as default
32
32
  */
@@ -27,11 +27,11 @@ export declare class AzureOpenAiExecutionTools implements LlmExecutionTools {
27
27
  /**
28
28
  * Calls OpenAI API to use a chat model.
29
29
  */
30
- callChatModel(prompt: Pick<Prompt, 'content' | 'modelRequirements'>): Promise<ChatPromptResult>;
30
+ callChatModel(prompt: Pick<Prompt, 'content' | 'parameters' | 'modelRequirements'>): Promise<ChatPromptResult>;
31
31
  /**
32
32
  * Calls Azure OpenAI API to use a complete model.
33
33
  */
34
- callCompletionModel(prompt: Pick<Prompt, 'content' | 'modelRequirements'>): Promise<CompletionPromptResult>;
34
+ callCompletionModel(prompt: Pick<Prompt, 'content' | 'parameters' | 'modelRequirements'>): Promise<CompletionPromptResult>;
35
35
  /**
36
36
  * Changes Azure error (which is not propper Error but object) to propper Error
37
37
  */
@@ -18,11 +18,11 @@ export declare class MockedEchoLlmExecutionTools implements LlmExecutionTools {
18
18
  /**
19
19
  * Mocks chat model
20
20
  */
21
- callChatModel(prompt: Pick<Prompt, 'content' | 'modelRequirements'>): Promise<ChatPromptResult>;
21
+ callChatModel(prompt: Pick<Prompt, 'content' | 'parameters' | 'modelRequirements'>): Promise<ChatPromptResult>;
22
22
  /**
23
23
  * Mocks completion model
24
24
  */
25
- callCompletionModel(prompt: Pick<Prompt, 'content' | 'modelRequirements'>): Promise<CompletionPromptResult>;
25
+ callCompletionModel(prompt: Pick<Prompt, 'content' | 'parameters' | 'modelRequirements'>): Promise<CompletionPromptResult>;
26
26
  /**
27
27
  * List all available mocked-models that can be used
28
28
  */
@@ -19,15 +19,15 @@ export declare class MockedFackedLlmExecutionTools implements LlmExecutionTools
19
19
  /**
20
20
  * Fakes chat model
21
21
  */
22
- callChatModel(prompt: Pick<Prompt, 'content' | 'modelRequirements' | 'expectations' | 'postprocessing'>): Promise<ChatPromptResult & CompletionPromptResult>;
22
+ callChatModel(prompt: Pick<Prompt, 'content' | 'parameters' | 'modelRequirements' | 'expectations' | 'postprocessing'>): Promise<ChatPromptResult & CompletionPromptResult>;
23
23
  /**
24
24
  * Fakes completion model
25
25
  */
26
- callCompletionModel(prompt: Pick<Prompt, 'content' | 'modelRequirements' | 'expectations' | 'postprocessing'>): Promise<CompletionPromptResult>;
26
+ callCompletionModel(prompt: Pick<Prompt, 'content' | 'parameters' | 'modelRequirements' | 'expectations' | 'postprocessing'>): Promise<CompletionPromptResult>;
27
27
  /**
28
28
  * Fakes embedding model
29
29
  */
30
- callEmbeddingModel(prompt: Pick<Prompt, 'content' | 'modelRequirements' | 'expectations' | 'postprocessing'>): Promise<EmbeddingPromptResult>;
30
+ callEmbeddingModel(prompt: Pick<Prompt, 'content' | 'parameters' | 'modelRequirements' | 'expectations' | 'postprocessing'>): Promise<EmbeddingPromptResult>;
31
31
  /**
32
32
  * List all available fake-models that can be used
33
33
  */
@@ -28,15 +28,15 @@ export declare class OpenAiExecutionTools implements LlmExecutionTools {
28
28
  /**
29
29
  * Calls OpenAI API to use a chat model.
30
30
  */
31
- callChatModel(prompt: Pick<Prompt, 'content' | 'modelRequirements' | 'expectFormat'>): Promise<ChatPromptResult>;
31
+ callChatModel(prompt: Pick<Prompt, 'content' | 'parameters' | 'modelRequirements' | 'expectFormat'>): Promise<ChatPromptResult>;
32
32
  /**
33
33
  * Calls OpenAI API to use a complete model.
34
34
  */
35
- callCompletionModel(prompt: Pick<Prompt, 'content' | 'modelRequirements'>): Promise<CompletionPromptResult>;
35
+ callCompletionModel(prompt: Pick<Prompt, 'content' | 'parameters' | 'modelRequirements'>): Promise<CompletionPromptResult>;
36
36
  /**
37
37
  * Calls OpenAI API to use a embedding model
38
38
  */
39
- callEmbeddingModel(prompt: Pick<Prompt, 'content' | 'modelRequirements'>): Promise<EmbeddingPromptResult>;
39
+ callEmbeddingModel(prompt: Pick<Prompt, 'content' | 'parameters' | 'modelRequirements'>): Promise<EmbeddingPromptResult>;
40
40
  /**
41
41
  * Get the model that should be used as default
42
42
  */
@@ -0,0 +1,10 @@
1
+ import type { PipelineJson } from '../types/PipelineJson/PipelineJson';
2
+ /**
3
+ * Determine if the pipeline is fully prepared
4
+ */
5
+ export declare function isPipelinePrepared(pipeline: PipelineJson): boolean;
6
+ /**
7
+ * TODO: [๐Ÿ ] Maybe base this on `makeValidator`
8
+ * TODO: [๐Ÿ”ผ] Export via core or utils
9
+ * TODO: [๐ŸงŠ] Pipeline can be partially prepared, this should return true ONLY if fully prepared
10
+ */
@@ -8,6 +8,7 @@ import type { PrepareOptions } from './PrepareOptions';
8
8
  */
9
9
  export declare function preparePipeline(pipeline: PipelineJson, options: PrepareOptions): Promise<PipelineJson>;
10
10
  /**
11
+ * TODO: !!!!! Index the samples and maybe templates
11
12
  * TODO: [๐Ÿ”ผ] !!! Export via `@promptbook/core`
12
13
  * TODO: Write tests for `preparePipeline`
13
14
  * TODO: [๐Ÿ] Leverage the batch API and build queues @see https://platform.openai.com/docs/guides/batch
@@ -9,7 +9,7 @@ export type LlmTemplateJson = PromptTemplateJsonCommon & {
9
9
  /**
10
10
  * Name of the persona who will be responding to this prompt
11
11
  */
12
- readonly personaName: string_name | null;
12
+ readonly personaName?: string_name;
13
13
  /**
14
14
  * Requirements for the model
15
15
  * - This is required only for blockType PROMPT_TEMPLATE
@@ -17,6 +17,7 @@ export type LlmTemplateJson = PromptTemplateJsonCommon & {
17
17
  readonly modelRequirements: ModelRequirements;
18
18
  };
19
19
  /**
20
+ * TODO: [๐Ÿง ][๐Ÿฅœ]
20
21
  * TODO: [๐Ÿ‘™][๐Ÿง ] Maybe add `knowledge`, `actions` and `instruments` to be available granularly for each template
21
22
  * @see https://github.com/webgptorg/promptbook/discussions/79
22
23
  * TODO: [๐Ÿ’•][๐Ÿง ] Just selecting gpt3 or gpt4 level of model