@promptbook/remote-server 0.68.0-0 → 0.68.0-1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. package/README.md +2 -2
  2. package/esm/index.es.js +11 -8
  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/CommandParser.d.ts +137 -30
  30. package/esm/typings/src/commands/index.d.ts +1 -1
  31. package/esm/typings/src/conversion/pipelineJsonToString.d.ts +1 -1
  32. package/esm/typings/src/conversion/pipelineStringToJson.d.ts +1 -1
  33. package/esm/typings/src/conversion/pipelineStringToJsonSync.d.ts +2 -2
  34. package/esm/typings/src/conversion/prettify/renderPipelineMermaidOptions.d.ts +2 -2
  35. package/esm/typings/src/conversion/utils/extractParameterNamesFromTemplate.d.ts +14 -0
  36. package/esm/typings/src/conversion/utils/extractParameterNamesFromTemplate.test.d.ts +1 -0
  37. package/esm/typings/src/conversion/utils/extractVariables.d.ts +1 -1
  38. package/esm/typings/src/conversion/utils/stringifyPipelineJson.d.ts +1 -1
  39. package/esm/typings/src/errors/{ParsingError.d.ts → ParseError.d.ts} +5 -2
  40. package/esm/typings/src/errors/index.d.ts +2 -2
  41. package/esm/typings/src/execution/CommonExecutionToolsOptions.d.ts +5 -0
  42. package/esm/typings/src/execution/PromptResult.d.ts +2 -0
  43. package/esm/typings/src/execution/PromptResultUsage.d.ts +1 -1
  44. package/esm/typings/src/execution/createPipelineExecutor.d.ts +1 -1
  45. package/esm/typings/src/knowledge/dialogs/simple-prompt/SimplePromptInterfaceTools.d.ts +1 -1
  46. package/esm/typings/src/llm-providers/openai/OpenAiExecutionTools.d.ts +1 -1
  47. package/esm/typings/src/postprocessing/utils/extractBlock.d.ts +2 -2
  48. package/esm/typings/src/postprocessing/utils/extractJsonBlock.d.ts +3 -3
  49. package/esm/typings/src/prepare/prepareTemplates.d.ts +3 -4
  50. package/esm/typings/src/prepare/unpreparePipeline.d.ts +1 -1
  51. package/esm/typings/src/storage/_common/PromptbookStorage.d.ts +1 -1
  52. package/esm/typings/src/storage/utils/PrefixStorage.d.ts +1 -1
  53. package/esm/typings/src/types/ModelRequirements.d.ts +2 -0
  54. package/esm/typings/src/types/PipelineJson/DialogTemplateJson.d.ts +13 -0
  55. package/esm/typings/src/types/PipelineJson/Expectations.d.ts +1 -1
  56. package/esm/typings/src/types/PipelineJson/KnowledgePieceJson.d.ts +1 -1
  57. package/esm/typings/src/types/PipelineJson/KnowledgeSourceJson.d.ts +1 -1
  58. package/esm/typings/src/types/PipelineJson/{PromptTemplateParameterJson.d.ts → ParameterJson.d.ts} +2 -2
  59. package/esm/typings/src/types/PipelineJson/PersonaJson.d.ts +1 -1
  60. package/esm/typings/src/types/PipelineJson/PipelineJson.d.ts +10 -5
  61. package/esm/typings/src/types/PipelineJson/PreparationJson.d.ts +1 -1
  62. package/esm/typings/src/types/PipelineJson/PromptTemplateJson.d.ts +20 -9
  63. package/esm/typings/src/types/PipelineJson/{ScriptJson.d.ts → ScriptTemplateJson.d.ts} +4 -4
  64. package/esm/typings/src/types/PipelineJson/SimpleTemplateJson.d.ts +3 -3
  65. package/esm/typings/src/types/PipelineJson/TemplateJson.d.ts +11 -0
  66. package/esm/typings/src/types/PipelineJson/{PromptTemplateJsonCommon.d.ts → TemplateJsonCommon.d.ts} +3 -4
  67. package/esm/typings/src/types/Prompt.d.ts +4 -2
  68. package/esm/typings/src/utils/markdown/addAutoGeneratedSection.d.ts +1 -0
  69. package/esm/typings/src/utils/markdown/extractAllBlocksFromMarkdown.d.ts +1 -1
  70. package/esm/typings/src/utils/markdown/extractOneBlockFromMarkdown.d.ts +2 -2
  71. package/esm/typings/src/utils/organization/___and___.d.ts +7 -0
  72. package/esm/typings/src/utils/organization/{___.d.ts → ___or___.d.ts} +1 -1
  73. package/esm/typings/src/utils/parseNumber.d.ts +1 -1
  74. package/esm/typings/src/utils/serialization/clonePipeline.d.ts +1 -1
  75. package/package.json +2 -2
  76. package/umd/index.umd.js +11 -8
  77. package/umd/index.umd.js.map +1 -1
  78. package/esm/typings/src/commands/EXPECT/ExpectAmountCommand.d.ts +0 -17
  79. package/esm/typings/src/conversion/utils/extractParameterNamesFromPromptTemplate.d.ts +0 -14
  80. package/esm/typings/src/types/PipelineJson/LlmTemplateJson.d.ts +0 -27
  81. package/esm/typings/src/types/PipelineJson/PromptDialogJson.d.ts +0 -14
  82. /package/esm/typings/src/{conversion/utils/extractParameterNamesFromPromptTemplate.test.d.ts → commands/FOREACH/foreachCommand.test.d.ts} +0 -0
@@ -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
- */
@@ -1,14 +0,0 @@
1
- import type { PromptTemplateJsonCommon } from './PromptTemplateJsonCommon';
2
- /**
3
- * Template for prompt to user
4
- *
5
- * Note: [🚉] This is fully serializable as JSON
6
- * @see https://github.com/webgptorg/promptbook/discussions/76
7
- */
8
- export type PromptDialogJson = PromptTemplateJsonCommon & {
9
- readonly blockType: 'PROMPT_DIALOG';
10
- };
11
- /**
12
- * TODO: [🧠][🥜]
13
- * TODO: [🍙] Make some standart order of json properties
14
- */