@promptbook/remote-client 0.61.0-10 → 0.61.0-12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/index.es.js +40 -4
- package/esm/index.es.js.map +1 -1
- package/esm/typings/promptbook-collection/index.d.ts +83 -2
- package/esm/typings/src/_packages/core.index.d.ts +2 -2
- package/esm/typings/src/_packages/types.index.d.ts +2 -2
- package/esm/typings/src/_packages/utils.index.d.ts +3 -1
- package/esm/typings/src/cli/cli-commands/hello.d.ts +3 -0
- package/esm/typings/src/cli/cli-commands/make.d.ts +3 -0
- package/esm/typings/src/cli/cli-commands/prettify.d.ts +3 -0
- package/esm/typings/src/cli/promptbookCli.d.ts +1 -0
- package/esm/typings/src/collection/PipelineCollection.d.ts +1 -1
- package/esm/typings/src/collection/SimplePipelineCollection.d.ts +1 -1
- package/esm/typings/src/collection/constructors/createCollectionFromDirectory.d.ts +1 -0
- package/esm/typings/src/commands/_BOILERPLATE/boilerplateCommandParser.d.ts +1 -0
- package/esm/typings/src/commands/_common/types/CommandParser.d.ts +4 -1
- package/esm/typings/src/config.d.ts +4 -0
- package/esm/typings/src/conversion/pipelineJsonToString.d.ts +1 -1
- package/esm/typings/src/conversion/pipelineStringToJson.d.ts +1 -0
- package/esm/typings/src/conversion/pipelineStringToJsonSync.d.ts +2 -0
- package/esm/typings/src/conversion/validation/validatePipeline.d.ts +6 -0
- package/esm/typings/src/errors/EnvironmentMismatchError.d.ts +7 -0
- package/{umd/typings/src/errors/VersionMismatch.d.ts → esm/typings/src/errors/VersionMismatchError.d.ts} +1 -1
- package/esm/typings/src/execution/CommonExecutionToolsOptions.d.ts +1 -0
- package/esm/typings/src/execution/LlmExecutionTools.d.ts +3 -1
- package/esm/typings/src/execution/PipelineExecutor.d.ts +4 -3
- package/esm/typings/src/execution/PromptResult.d.ts +12 -0
- package/esm/typings/src/execution/ScriptExecutionTools.d.ts +4 -2
- package/esm/typings/src/execution/createPipelineExecutor.d.ts +2 -0
- package/esm/typings/src/formats/csv/ListFormatDefinition.d.ts +1 -0
- package/esm/typings/src/formats/json/JsonFormatDefinition.d.ts +1 -0
- package/esm/typings/src/formats/list/ListFormatDefinition.d.ts +1 -0
- package/esm/typings/src/formats/xml/XmlFormatDefinition.d.ts +1 -0
- package/esm/typings/src/knowledge/dialogs/simple-prompt/SimplePromptInterfaceTools.d.ts +3 -0
- package/esm/typings/src/knowledge/prepare-knowledge/_common/prepareKnowledgePieces.d.ts +1 -1
- package/esm/typings/src/knowledge/prepare-knowledge/markdown/prepareKnowledgeFromMarkdown.d.ts +1 -0
- package/esm/typings/src/knowledge/prepare-knowledge/markdown/prepareKnowledgeFromMarkdown.test.d.ts +3 -0
- package/esm/typings/src/knowledge/prepare-knowledge/pdf/prepareKnowledgeFromPdf.d.ts +1 -0
- package/esm/typings/src/llm-providers/_common/createLlmToolsFromEnv.d.ts +22 -0
- package/esm/typings/src/llm-providers/_common/getLlmToolsForCli.d.ts +10 -0
- package/esm/typings/src/llm-providers/_common/getLlmToolsForTestingAndScriptsAndPlayground.d.ts +10 -0
- package/esm/typings/src/llm-providers/_common/utils/cache/CacheItem.d.ts +29 -0
- package/esm/typings/src/llm-providers/_common/utils/cache/CacheLlmToolsOptions.d.ts +10 -0
- package/esm/typings/src/llm-providers/_common/utils/cache/cacheLlmTools.d.ts +16 -0
- package/esm/typings/src/llm-providers/_common/utils/count-total-cost/LlmExecutionToolsWithTotalCost.d.ts +11 -0
- package/esm/typings/src/llm-providers/_common/utils/count-total-cost/countTotalCost.d.ts +14 -0
- package/esm/typings/src/llm-providers/anthropic-claude/AnthropicClaudeExecutionTools.d.ts +1 -0
- package/esm/typings/src/llm-providers/anthropic-claude/anthropic-claude-models.d.ts +1 -1
- package/esm/typings/src/llm-providers/anthropic-claude/playground/playground.d.ts +3 -0
- package/esm/typings/src/llm-providers/azure-openai/AzureOpenAiExecutionTools.d.ts +1 -0
- package/esm/typings/src/llm-providers/azure-openai/playground/playground.d.ts +3 -0
- package/esm/typings/src/llm-providers/langtail/LangtailExecutionTools.d.ts +3 -0
- package/esm/typings/src/llm-providers/langtail/LangtailExecutionToolsOptions.d.ts +1 -1
- package/esm/typings/src/llm-providers/mocked/MockedEchoLlmExecutionTools.d.ts +1 -1
- package/esm/typings/src/llm-providers/mocked/MockedFackedLlmExecutionTools.d.ts +1 -1
- package/esm/typings/src/llm-providers/multiple/MultipleLlmExecutionTools.d.ts +3 -1
- package/esm/typings/src/llm-providers/openai/OpenAiExecutionTools.d.ts +1 -0
- package/esm/typings/src/llm-providers/openai/computeUsage.d.ts +2 -2
- package/esm/typings/src/llm-providers/openai/openai-models.d.ts +1 -0
- package/esm/typings/src/llm-providers/openai/playground/playground.d.ts +3 -0
- package/esm/typings/src/personas/preparePersona.d.ts +4 -2
- package/esm/typings/src/prepare/preparePipeline.d.ts +3 -1
- package/esm/typings/src/prepare/unpreparePipeline.d.ts +1 -0
- package/esm/typings/src/storage/_common/PromptbookStorage.d.ts +25 -0
- package/esm/typings/src/storage/_common/PromptbookStorage.test-type.d.ts +5 -0
- package/esm/typings/src/storage/files-storage/FilesStorage.d.ts +30 -0
- package/esm/typings/src/storage/files-storage/FilesStorageOptions.d.ts +13 -0
- package/esm/typings/src/storage/files-storage/utils/nameToSubfolderPath.d.ts +7 -0
- package/esm/typings/src/storage/files-storage/utils/nameToSubfolderPath.test.d.ts +1 -0
- package/esm/typings/src/storage/local-storage/getLocalStorage.d.ts +9 -0
- package/esm/typings/src/storage/local-storage/getSessionStorage.d.ts +9 -0
- package/esm/typings/src/storage/memory/MemoryStorage.d.ts +34 -0
- package/esm/typings/src/storage/utils/PrefixStorage.d.ts +26 -0
- package/esm/typings/src/storage/utils/makePromptbookStorageFromWebStorage.d.ts +11 -0
- package/esm/typings/src/types/ModelRequirements.d.ts +21 -1
- package/esm/typings/src/types/Parameters.d.ts +0 -1
- package/esm/typings/src/types/PipelineJson/PipelineJson.d.ts +1 -2
- package/esm/typings/src/types/PipelineJson/PreparationJson.d.ts +1 -5
- package/esm/typings/src/types/PipelineJson/PromptTemplateJsonCommon.d.ts +1 -0
- package/esm/typings/src/types/PipelineJson/PromptTemplateParameterJson.d.ts +11 -2
- package/esm/typings/src/types/PipelineString.d.ts +1 -1
- package/esm/typings/src/types/Prompt.d.ts +5 -2
- package/esm/typings/src/types/execution-report/countWorkingDuration.d.ts +1 -1
- package/esm/typings/src/types/typeAliases.d.ts +35 -1
- package/esm/typings/src/utils/emojis.d.ts +2 -2
- package/esm/typings/src/utils/formatNumber.d.ts +1 -1
- package/esm/typings/src/utils/isRunningInWhatever.d.ts +3 -0
- package/esm/typings/src/utils/markdown/addAutoGeneratedSection.d.ts +1 -1
- package/esm/typings/src/utils/markdown/createMarkdownChart.d.ts +1 -1
- package/esm/typings/src/utils/markdown/createMarkdownTable.d.ts +1 -1
- package/esm/typings/src/utils/markdown/extractAllBlocksFromMarkdown-real.test.d.ts +1 -0
- package/esm/typings/src/utils/markdown/extractAllBlocksFromMarkdown.d.ts +7 -0
- package/esm/typings/src/utils/markdown/extractOneBlockFromMarkdown.d.ts +1 -1
- package/esm/typings/src/utils/organization/TODO.d.ts +2 -0
- package/esm/typings/src/utils/organization/TODO_USE.d.ts +1 -0
- package/esm/typings/src/utils/organization/___.d.ts +2 -0
- package/esm/typings/src/utils/organization/just.d.ts +1 -0
- package/esm/typings/src/utils/organization/keepImported.d.ts +12 -0
- package/esm/typings/src/utils/organization/notUsing.d.ts +12 -0
- package/esm/typings/src/utils/organization/really_any.d.ts +2 -0
- package/esm/typings/src/utils/random/randomSeed.d.ts +7 -0
- package/esm/typings/src/version.d.ts +3 -0
- package/package.json +2 -2
- package/umd/index.umd.js +40 -4
- package/umd/index.umd.js.map +1 -1
- package/umd/typings/promptbook-collection/index.d.ts +83 -2
- package/umd/typings/src/_packages/core.index.d.ts +2 -2
- package/umd/typings/src/_packages/types.index.d.ts +2 -2
- package/umd/typings/src/_packages/utils.index.d.ts +3 -1
- package/umd/typings/src/cli/cli-commands/hello.d.ts +3 -0
- package/umd/typings/src/cli/cli-commands/make.d.ts +3 -0
- package/umd/typings/src/cli/cli-commands/prettify.d.ts +3 -0
- package/umd/typings/src/cli/promptbookCli.d.ts +1 -0
- package/umd/typings/src/collection/PipelineCollection.d.ts +1 -1
- package/umd/typings/src/collection/SimplePipelineCollection.d.ts +1 -1
- package/umd/typings/src/collection/constructors/createCollectionFromDirectory.d.ts +1 -0
- package/umd/typings/src/commands/_BOILERPLATE/boilerplateCommandParser.d.ts +1 -0
- package/umd/typings/src/commands/_common/types/CommandParser.d.ts +4 -1
- package/umd/typings/src/config.d.ts +4 -0
- package/umd/typings/src/conversion/pipelineJsonToString.d.ts +1 -1
- package/umd/typings/src/conversion/pipelineStringToJson.d.ts +1 -0
- package/umd/typings/src/conversion/pipelineStringToJsonSync.d.ts +2 -0
- package/umd/typings/src/conversion/validation/validatePipeline.d.ts +6 -0
- package/umd/typings/src/errors/EnvironmentMismatchError.d.ts +7 -0
- package/{esm/typings/src/errors/VersionMismatch.d.ts → umd/typings/src/errors/VersionMismatchError.d.ts} +1 -1
- package/umd/typings/src/execution/CommonExecutionToolsOptions.d.ts +1 -0
- package/umd/typings/src/execution/LlmExecutionTools.d.ts +3 -1
- package/umd/typings/src/execution/PipelineExecutor.d.ts +4 -3
- package/umd/typings/src/execution/PromptResult.d.ts +12 -0
- package/umd/typings/src/execution/ScriptExecutionTools.d.ts +4 -2
- package/umd/typings/src/execution/createPipelineExecutor.d.ts +2 -0
- package/umd/typings/src/formats/csv/ListFormatDefinition.d.ts +1 -0
- package/umd/typings/src/formats/json/JsonFormatDefinition.d.ts +1 -0
- package/umd/typings/src/formats/list/ListFormatDefinition.d.ts +1 -0
- package/umd/typings/src/formats/xml/XmlFormatDefinition.d.ts +1 -0
- package/umd/typings/src/knowledge/dialogs/simple-prompt/SimplePromptInterfaceTools.d.ts +3 -0
- package/umd/typings/src/knowledge/prepare-knowledge/_common/prepareKnowledgePieces.d.ts +1 -1
- package/umd/typings/src/knowledge/prepare-knowledge/markdown/prepareKnowledgeFromMarkdown.d.ts +1 -0
- package/umd/typings/src/knowledge/prepare-knowledge/markdown/prepareKnowledgeFromMarkdown.test.d.ts +3 -0
- package/umd/typings/src/knowledge/prepare-knowledge/pdf/prepareKnowledgeFromPdf.d.ts +1 -0
- package/umd/typings/src/llm-providers/_common/createLlmToolsFromEnv.d.ts +22 -0
- package/umd/typings/src/llm-providers/_common/getLlmToolsForCli.d.ts +10 -0
- package/umd/typings/src/llm-providers/_common/getLlmToolsForTestingAndScriptsAndPlayground.d.ts +10 -0
- package/umd/typings/src/llm-providers/_common/utils/cache/CacheItem.d.ts +29 -0
- package/umd/typings/src/llm-providers/_common/utils/cache/CacheLlmToolsOptions.d.ts +10 -0
- package/umd/typings/src/llm-providers/_common/utils/cache/cacheLlmTools.d.ts +16 -0
- package/umd/typings/src/llm-providers/_common/utils/count-total-cost/LlmExecutionToolsWithTotalCost.d.ts +11 -0
- package/umd/typings/src/llm-providers/_common/utils/count-total-cost/countTotalCost.d.ts +14 -0
- package/umd/typings/src/llm-providers/anthropic-claude/AnthropicClaudeExecutionTools.d.ts +1 -0
- package/umd/typings/src/llm-providers/anthropic-claude/anthropic-claude-models.d.ts +1 -1
- package/umd/typings/src/llm-providers/anthropic-claude/playground/playground.d.ts +3 -0
- package/umd/typings/src/llm-providers/azure-openai/AzureOpenAiExecutionTools.d.ts +1 -0
- package/umd/typings/src/llm-providers/azure-openai/playground/playground.d.ts +3 -0
- package/umd/typings/src/llm-providers/langtail/LangtailExecutionTools.d.ts +3 -0
- package/umd/typings/src/llm-providers/langtail/LangtailExecutionToolsOptions.d.ts +1 -1
- package/umd/typings/src/llm-providers/mocked/MockedEchoLlmExecutionTools.d.ts +1 -1
- package/umd/typings/src/llm-providers/mocked/MockedFackedLlmExecutionTools.d.ts +1 -1
- package/umd/typings/src/llm-providers/multiple/MultipleLlmExecutionTools.d.ts +3 -1
- package/umd/typings/src/llm-providers/openai/OpenAiExecutionTools.d.ts +1 -0
- package/umd/typings/src/llm-providers/openai/computeUsage.d.ts +2 -2
- package/umd/typings/src/llm-providers/openai/openai-models.d.ts +1 -0
- package/umd/typings/src/llm-providers/openai/playground/playground.d.ts +3 -0
- package/umd/typings/src/personas/preparePersona.d.ts +4 -2
- package/umd/typings/src/prepare/preparePipeline.d.ts +3 -1
- package/umd/typings/src/prepare/unpreparePipeline.d.ts +1 -0
- package/umd/typings/src/storage/_common/PromptbookStorage.d.ts +25 -0
- package/umd/typings/src/storage/_common/PromptbookStorage.test-type.d.ts +5 -0
- package/umd/typings/src/storage/files-storage/FilesStorage.d.ts +30 -0
- package/umd/typings/src/storage/files-storage/FilesStorageOptions.d.ts +13 -0
- package/umd/typings/src/storage/files-storage/utils/nameToSubfolderPath.d.ts +7 -0
- package/umd/typings/src/storage/files-storage/utils/nameToSubfolderPath.test.d.ts +1 -0
- package/umd/typings/src/storage/local-storage/getLocalStorage.d.ts +9 -0
- package/umd/typings/src/storage/local-storage/getSessionStorage.d.ts +9 -0
- package/umd/typings/src/storage/memory/MemoryStorage.d.ts +34 -0
- package/umd/typings/src/storage/utils/PrefixStorage.d.ts +26 -0
- package/umd/typings/src/storage/utils/makePromptbookStorageFromWebStorage.d.ts +11 -0
- package/umd/typings/src/types/ModelRequirements.d.ts +21 -1
- package/umd/typings/src/types/Parameters.d.ts +0 -1
- package/umd/typings/src/types/PipelineJson/PipelineJson.d.ts +1 -2
- package/umd/typings/src/types/PipelineJson/PreparationJson.d.ts +1 -5
- package/umd/typings/src/types/PipelineJson/PromptTemplateJsonCommon.d.ts +1 -0
- package/umd/typings/src/types/PipelineJson/PromptTemplateParameterJson.d.ts +11 -2
- package/umd/typings/src/types/PipelineString.d.ts +1 -1
- package/umd/typings/src/types/Prompt.d.ts +5 -2
- package/umd/typings/src/types/execution-report/countWorkingDuration.d.ts +1 -1
- package/umd/typings/src/types/typeAliases.d.ts +35 -1
- package/umd/typings/src/utils/emojis.d.ts +2 -2
- package/umd/typings/src/utils/formatNumber.d.ts +1 -1
- package/umd/typings/src/utils/isRunningInWhatever.d.ts +3 -0
- package/umd/typings/src/utils/markdown/addAutoGeneratedSection.d.ts +1 -1
- package/umd/typings/src/utils/markdown/createMarkdownChart.d.ts +1 -1
- package/umd/typings/src/utils/markdown/createMarkdownTable.d.ts +1 -1
- package/umd/typings/src/utils/markdown/extractAllBlocksFromMarkdown-real.test.d.ts +1 -0
- package/umd/typings/src/utils/markdown/extractAllBlocksFromMarkdown.d.ts +7 -0
- package/umd/typings/src/utils/markdown/extractOneBlockFromMarkdown.d.ts +1 -1
- package/umd/typings/src/utils/organization/TODO.d.ts +2 -0
- package/umd/typings/src/utils/organization/TODO_USE.d.ts +1 -0
- package/umd/typings/src/utils/organization/___.d.ts +2 -0
- package/umd/typings/src/utils/organization/just.d.ts +1 -0
- package/umd/typings/src/utils/organization/keepImported.d.ts +12 -0
- package/umd/typings/src/utils/organization/notUsing.d.ts +12 -0
- package/umd/typings/src/utils/organization/really_any.d.ts +2 -0
- package/umd/typings/src/utils/random/randomSeed.d.ts +7 -0
- package/umd/typings/src/version.d.ts +3 -0
- package/esm/typings/src/collection/constructors/justTestFsImport.d.ts +0 -7
- package/esm/typings/src/knowledge/prepare-knowledge/_common/utils/getLlmToolsForTests.d.ts +0 -7
- package/umd/typings/src/collection/constructors/justTestFsImport.d.ts +0 -7
- package/umd/typings/src/knowledge/prepare-knowledge/_common/utils/getLlmToolsForTests.d.ts +0 -7
|
@@ -29,6 +29,6 @@ export declare class MockedEchoLlmExecutionTools implements LlmExecutionTools {
|
|
|
29
29
|
listModels(): Array<AvailableModel>;
|
|
30
30
|
}
|
|
31
31
|
/**
|
|
32
|
-
* TODO: [
|
|
32
|
+
* TODO: [🧠][🈁] Maybe use `isDeterministic` from options
|
|
33
33
|
* TODO: Allow in spaceTrim: nesting with > ${block(prompt.request)}, same as replace params
|
|
34
34
|
*/
|
|
@@ -41,10 +41,12 @@ export declare class MultipleLlmExecutionTools implements LlmExecutionTools {
|
|
|
41
41
|
private callModelCommon;
|
|
42
42
|
/**
|
|
43
43
|
* List all available models that can be used
|
|
44
|
-
* This
|
|
44
|
+
* This lists is a combination of all available models from all execution tools
|
|
45
45
|
*/
|
|
46
46
|
listModels(): Promise<Array<AvailableModel>>;
|
|
47
47
|
}
|
|
48
48
|
/**
|
|
49
49
|
* TODO: [🧠][🎛] Aggregating multiple models - have result not only from one first aviable model BUT all of them
|
|
50
|
+
* TODO: [🏖] If no llmTools have for example not defined `callCompletionModel` this will still return object with defined `callCompletionModel` which just throws `PipelineExecutionError`, make it undefined instead
|
|
51
|
+
* Look how `countTotalUsage` (and `cacheLlmTools`) implements it
|
|
50
52
|
*/
|
|
@@ -62,4 +62,5 @@ export declare class OpenAiExecutionTools implements LlmExecutionTools {
|
|
|
62
62
|
* TODO: [🧠][🧙♂️] Maybe there can be some wizzard for thoose who want to use just OpenAI
|
|
63
63
|
* TODO: Maybe Create some common util for callChatModel and callCompletionModel
|
|
64
64
|
* TODO: Maybe make custom OpenaiError
|
|
65
|
+
* TODO: [🧠][🈁] Maybe use `isDeterministic` from options
|
|
65
66
|
*/
|
|
@@ -4,13 +4,13 @@
|
|
|
4
4
|
* @see https://openai.com/api/pricing/
|
|
5
5
|
* @see https://docs.anthropic.com/en/docs/models-overview
|
|
6
6
|
*
|
|
7
|
-
* @private within the
|
|
7
|
+
* @private within the repository, used only as internal helper for `OPENAI_MODELS` and `computeUsage`
|
|
8
8
|
*/
|
|
9
9
|
type string_model_price = `$${number}.${number} / ${number}M tokens`;
|
|
10
10
|
/**
|
|
11
11
|
* Function computeUsage will create price per one token based on the string value found on openai page
|
|
12
12
|
*
|
|
13
|
-
* @private within the
|
|
13
|
+
* @private within the repository, used only as internal helper for `OPENAI_MODELS`
|
|
14
14
|
*/
|
|
15
15
|
export declare function computeUsage(value: string_model_price): number;
|
|
16
16
|
export {};
|
|
@@ -24,4 +24,5 @@ export declare const OPENAI_MODELS: Array<AvailableModel & {
|
|
|
24
24
|
* @see /other/playground/playground.ts
|
|
25
25
|
* TODO: [🍓] Make better
|
|
26
26
|
* TODO: Change model titles to human eg: "gpt-4-turbo-2024-04-09" -> "GPT-4 Turbo (2024-04-09)"
|
|
27
|
+
* TODO: [🚸] Not all models are compatible with JSON mode, add this information here and use it
|
|
27
28
|
*/
|
|
@@ -5,9 +5,11 @@ import type { string_persona_description } from '../types/typeAliases';
|
|
|
5
5
|
* Prepares the persona for the pipeline
|
|
6
6
|
*
|
|
7
7
|
* @see https://github.com/webgptorg/promptbook/discussions/22
|
|
8
|
-
* @private within the package
|
|
9
8
|
*/
|
|
10
9
|
export declare function preparePersona(personaDescription: string_persona_description, options: PrepareOptions): Promise<PersonaPreparedJson['modelRequirements']>;
|
|
11
10
|
/**
|
|
12
|
-
* TODO: [
|
|
11
|
+
* TODO: [🔼] !!! Export via `@promptbook/core`
|
|
12
|
+
* TODO: [🏢] !! Check validity of `modelName` in pipeline
|
|
13
|
+
* TODO: [🏢] !! Check validity of `systemMessage` in pipeline
|
|
14
|
+
* TODO: [🏢] !! Check validity of `temperature` in pipeline
|
|
13
15
|
*/
|
|
@@ -8,8 +8,10 @@ import type { PrepareOptions } from './PrepareOptions';
|
|
|
8
8
|
*/
|
|
9
9
|
export declare function preparePipeline(pipeline: PipelineJson, options: PrepareOptions): Promise<PipelineJson>;
|
|
10
10
|
/**
|
|
11
|
+
* TODO: [🔼] !!! Export via `@promptbook/core`
|
|
11
12
|
* TODO: Write tests for `preparePipeline`
|
|
12
13
|
* TODO: [🏏] Leverage the batch API and build queues @see https://platform.openai.com/docs/guides/batch
|
|
13
14
|
* TODO: [🧊] In future one preparation can take data from previous preparation and save tokens and time
|
|
14
|
-
* TODO: [
|
|
15
|
+
* TODO: [🎐] !!!! Use here countTotalUsage
|
|
16
|
+
* TODO: [🛠] Actions, instruments (and maybe knowledge) => Functions and tools
|
|
15
17
|
*/
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Promisable } from 'type-fest';
|
|
2
|
+
/**
|
|
3
|
+
* Storage of objects with asynchronous API
|
|
4
|
+
*
|
|
5
|
+
* Note: Naming `PromptbookStorage` not `Storage` to avoid name collision with global `Storage` interface.
|
|
6
|
+
* Note: This is simmilar to Web Storage API interface but everything is asynchronous and can store JSON objects.
|
|
7
|
+
*/
|
|
8
|
+
export type PromptbookStorage<TItem> = {
|
|
9
|
+
/**
|
|
10
|
+
* Returns the current value associated with the given key, or null if the given key does not exist in the list associated with the object
|
|
11
|
+
*/
|
|
12
|
+
getItem(key: string): Promisable<TItem | null>;
|
|
13
|
+
/**
|
|
14
|
+
* Sets the value of the pair identified by key to value, creating a new key/value pair if none existed for key previously
|
|
15
|
+
*/
|
|
16
|
+
setItem(key: string, value: TItem): Promisable<void>;
|
|
17
|
+
/**
|
|
18
|
+
* Removes the key/value pair with the given key from the list associated with the object, if a key/value pair with the given key exists
|
|
19
|
+
*/
|
|
20
|
+
removeItem(key: string): Promisable<void>;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* TODO: [🔼] !!! Export via `@promptbook/types`
|
|
24
|
+
* TODO: [🧠][🛫] Constrain `TItem` to JSON-serializable objects only
|
|
25
|
+
*/
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { PromptbookStorage } from '../_common/PromptbookStorage';
|
|
2
|
+
import type { FilesStorageOptions } from './FilesStorageOptions';
|
|
3
|
+
/**
|
|
4
|
+
* @@@
|
|
5
|
+
*/
|
|
6
|
+
export declare class FilesStorage<TItem> implements PromptbookStorage<TItem> {
|
|
7
|
+
private readonly options;
|
|
8
|
+
constructor(options: FilesStorageOptions);
|
|
9
|
+
/**
|
|
10
|
+
* @@@
|
|
11
|
+
*/
|
|
12
|
+
private getFilenameForKey;
|
|
13
|
+
/**
|
|
14
|
+
* @@@ Returns the current value associated with the given key, or null if the given key does not exist in the list associated with the object.
|
|
15
|
+
*/
|
|
16
|
+
getItem(key: string): Promise<TItem | null>;
|
|
17
|
+
/**
|
|
18
|
+
* @@@ Sets the value of the pair identified by key to value, creating a new key/value pair if none existed for key previously.
|
|
19
|
+
*/
|
|
20
|
+
setItem(key: string, value: TItem): Promise<void>;
|
|
21
|
+
/**
|
|
22
|
+
* @@@ Removes the key/value pair with the given key from the list associated with the object, if a key/value pair with the given key exists.
|
|
23
|
+
*/
|
|
24
|
+
removeItem(key: string): Promise<void>;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* TODO: [🔼] !!! Export via `@promptbook/node`
|
|
28
|
+
* TODO: [🌗] Maybe some checkers, not all valid JSONs are desired and valid values
|
|
29
|
+
* Note: [🟢] This code should never be published outside of `@promptbook/node`
|
|
30
|
+
*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { PromptbookStorage } from '../_common/PromptbookStorage';
|
|
2
|
+
/**
|
|
3
|
+
* Gets wrapper around `localStorage` object which can be used as `PromptbookStorage`
|
|
4
|
+
*/
|
|
5
|
+
export declare function getLocalStorage<TItem>(): PromptbookStorage<TItem>;
|
|
6
|
+
/**
|
|
7
|
+
* TODO: [🔼] !!! Export via `@promptbook/browser`
|
|
8
|
+
* Note: [🔵] This code should never be published outside of `@promptbook/browser`
|
|
9
|
+
*/
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { PromptbookStorage } from '../_common/PromptbookStorage';
|
|
2
|
+
/**
|
|
3
|
+
* Gets wrapper around `sessionStorage` object which can be used as `PromptbookStorage`
|
|
4
|
+
*/
|
|
5
|
+
export declare function getSessionStorage<TItem>(): PromptbookStorage<TItem>;
|
|
6
|
+
/**
|
|
7
|
+
* TODO: [🔼] !!! Export via `@promptbook/browser`
|
|
8
|
+
* Note: [🔵] This code should never be published outside of `@promptbook/browser`
|
|
9
|
+
*/
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { PromptbookStorage } from '../_common/PromptbookStorage';
|
|
2
|
+
/**
|
|
3
|
+
* Stores
|
|
4
|
+
*/
|
|
5
|
+
export declare class MemoryStorage<TItem> implements PromptbookStorage<TItem> {
|
|
6
|
+
private storage;
|
|
7
|
+
/**
|
|
8
|
+
* Returns the number of key/value pairs currently present in the list associated with the object.
|
|
9
|
+
*/
|
|
10
|
+
get length(): number;
|
|
11
|
+
/**
|
|
12
|
+
* Empties the list associated with the object of all key/value pairs, if there are any.
|
|
13
|
+
*/
|
|
14
|
+
clear(): void;
|
|
15
|
+
/**
|
|
16
|
+
* Returns the current value associated with the given key, or null if the given key does not exist in the list associated with the object.
|
|
17
|
+
*/
|
|
18
|
+
getItem(key: string): TItem | null;
|
|
19
|
+
/**
|
|
20
|
+
* Returns the name of the nth key in the list, or null if n is greater than or equal to the number of key/value pairs in the object.
|
|
21
|
+
*/
|
|
22
|
+
key(index: number): string | null;
|
|
23
|
+
/**
|
|
24
|
+
* Sets the value of the pair identified by key to value, creating a new key/value pair if none existed for key previously.
|
|
25
|
+
*/
|
|
26
|
+
setItem(key: string, value: TItem): void;
|
|
27
|
+
/**
|
|
28
|
+
* Removes the key/value pair with the given key from the list associated with the object, if a key/value pair with the given key exists.
|
|
29
|
+
*/
|
|
30
|
+
removeItem(key: string): void;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* TODO: [🔼] !!! Export via `@promptbook/core`
|
|
34
|
+
*/
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Promisable } from 'type-fest';
|
|
2
|
+
import type { PromptbookStorage } from '../_common/PromptbookStorage';
|
|
3
|
+
/**
|
|
4
|
+
* This class behaves like LocalStorage but separates keys by prefix
|
|
5
|
+
*/
|
|
6
|
+
export declare class PrefixStorage<TItem> implements PromptbookStorage<TItem> {
|
|
7
|
+
private baseStorage;
|
|
8
|
+
private keyPrefix;
|
|
9
|
+
private separator;
|
|
10
|
+
constructor(baseStorage: PromptbookStorage<TItem>, keyPrefix: string, separator?: string);
|
|
11
|
+
/**
|
|
12
|
+
* Returns the current value associated with the given key, or null if the given key does not exist in the list associated with the object.
|
|
13
|
+
*/
|
|
14
|
+
getItem(key: string): Promisable<TItem | null>;
|
|
15
|
+
/**
|
|
16
|
+
* Sets the value of the pair identified by key to value, creating a new key/value pair if none existed for key previously.
|
|
17
|
+
*/
|
|
18
|
+
setItem(key: string, value: TItem): Promisable<void>;
|
|
19
|
+
/**
|
|
20
|
+
* Removes the key/value pair with the given key from the list associated with the object, if a key/value pair with the given key exists.
|
|
21
|
+
*/
|
|
22
|
+
removeItem(key: string): void;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* TODO: [🔼] !!! Export via `@promptbook/core`
|
|
26
|
+
*/
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { PromptbookStorage } from '../_common/PromptbookStorage';
|
|
2
|
+
/**
|
|
3
|
+
* @@@
|
|
4
|
+
*
|
|
5
|
+
* @private for `getLocalStorage` and `getSessionStorage`
|
|
6
|
+
*/
|
|
7
|
+
export declare function makePromptbookStorageFromWebStorage<TValue>(webStorage: Storage): PromptbookStorage<TValue>;
|
|
8
|
+
/**
|
|
9
|
+
* TODO: [🧠] Should this be named `makePromptbookStorageFromWebStorage` vs `createPromptbookStorageFromWebStorage`
|
|
10
|
+
* TODO: [🌗] Maybe some checkers, not all valid JSONs are desired and valid values
|
|
11
|
+
*/
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
+
import type { number_model_temperature } from './typeAliases';
|
|
2
|
+
import type { number_seed } from './typeAliases';
|
|
1
3
|
import type { string_model_name } from './typeAliases';
|
|
4
|
+
import type { string_system_message } from './typeAliases';
|
|
2
5
|
export declare const MODEL_VARIANTS: readonly ["COMPLETION", "CHAT", "EMBEDDING"];
|
|
3
6
|
/**
|
|
4
7
|
* Model variant describes the very general type of the model
|
|
@@ -31,13 +34,30 @@ export type ModelRequirements = {
|
|
|
31
34
|
* @example 'gpt-4', 'gpt-4-32k-0314', 'gpt-3.5-turbo-instruct',...
|
|
32
35
|
*/
|
|
33
36
|
readonly modelName?: string_model_name;
|
|
37
|
+
/**
|
|
38
|
+
* System message to be used in the model
|
|
39
|
+
*/
|
|
40
|
+
readonly systemMessage?: string_system_message;
|
|
41
|
+
/**
|
|
42
|
+
* The temperature of the model
|
|
43
|
+
*
|
|
44
|
+
* Note: [💱] Promptbook is using just `temperature` (not `top_k` and `top_p`)
|
|
45
|
+
*/
|
|
46
|
+
readonly temperature?: number_model_temperature;
|
|
47
|
+
/**
|
|
48
|
+
* Seed for the model
|
|
49
|
+
*/
|
|
50
|
+
readonly seed?: number_seed;
|
|
34
51
|
/**
|
|
35
52
|
* Maximum number of tokens that can be generated by the model
|
|
36
53
|
*/
|
|
37
54
|
readonly maxTokens?: number;
|
|
38
55
|
};
|
|
39
56
|
/**
|
|
40
|
-
* TODO:
|
|
57
|
+
* TODO: [🧠][🈁] `seed` should maybe be somewhere else (not in `ModelRequirements`) (simmilar that `user` identification is not here)
|
|
58
|
+
* TODO: [🧠][💱] Add more model options: `stop_token`, `logit_bias`, `logprobs` (`top_logprobs`), `top_k`, `top_p`, `presence_penalty`, `frequency_penalty`, `bestOf`, `logitBias`, `logitBiasType`,...
|
|
59
|
+
* [💱] Probbably keep using just `temperature` in Promptbook (not `top_k` and `top_p`)
|
|
60
|
+
* TODO: [🛠] Actions, instruments (and maybe knowledge) => Functions and tools
|
|
41
61
|
* TODO: Maybe figure out better word than "variant"
|
|
42
62
|
* TODO: Add here more requirement options like max context size, max tokens, etc.
|
|
43
63
|
* TODO: [💕][🧠] Just selecting gpt3 or gpt4 level of model
|
|
@@ -14,7 +14,7 @@ import type { PromptTemplateParameterJson } from './PromptTemplateParameterJson'
|
|
|
14
14
|
* Promptbook is the **core concept of this package**.
|
|
15
15
|
* It represents a series of prompt templates chained together to form a pipeline / one big prompt template with input and result parameters.
|
|
16
16
|
*
|
|
17
|
-
* @see
|
|
17
|
+
* @see @@@ https://github.com/webgptorg/promptbook#promptbook
|
|
18
18
|
*/
|
|
19
19
|
export type PipelineJson = {
|
|
20
20
|
/**
|
|
@@ -79,7 +79,6 @@ export type PipelineJson = {
|
|
|
79
79
|
readonly preparations: Array<PreparationJson>;
|
|
80
80
|
};
|
|
81
81
|
/**
|
|
82
|
-
* TODO: !!!!! Implement new commands
|
|
83
82
|
* Note: There was a proposal for multiple types of promptbook objects 78816ff33e2705ee1a187aa2eb8affd976d4ea1a
|
|
84
83
|
* But then immediately reverted back to the single type
|
|
85
84
|
* With knowledge as part of the promptbook and collection just as a collection of promptbooks
|
|
@@ -1,16 +1,11 @@
|
|
|
1
1
|
import type { PromptResultUsage } from '../../execution/PromptResult';
|
|
2
2
|
import type { string_promptbook_version } from '../../version';
|
|
3
3
|
import type { number_id } from '../typeAliases';
|
|
4
|
-
import type { string_date_iso8601 } from '../typeAliases';
|
|
5
4
|
export type PreparationJson = {
|
|
6
5
|
/**
|
|
7
6
|
* Incremental ID of the preparation
|
|
8
7
|
*/
|
|
9
8
|
readonly id: number_id;
|
|
10
|
-
/**
|
|
11
|
-
* Date and time of the preparation
|
|
12
|
-
*/
|
|
13
|
-
readonly date: string_date_iso8601;
|
|
14
9
|
/**
|
|
15
10
|
* Version of the promptbook used for the preparation
|
|
16
11
|
*/
|
|
@@ -22,4 +17,5 @@ export type PreparationJson = {
|
|
|
22
17
|
};
|
|
23
18
|
/**
|
|
24
19
|
* TODO: Maybe put here used `modelName`
|
|
20
|
+
* 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
|
|
25
21
|
*/
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { string_markdown_text } from '../typeAliases';
|
|
2
|
-
import type {
|
|
2
|
+
import type { string_parameter_name } from '../typeAliases';
|
|
3
|
+
import type { string_parameter_value } from '../typeAliases';
|
|
3
4
|
/**
|
|
4
5
|
* Describes one parameter of the promptbook
|
|
5
6
|
*/
|
|
@@ -9,7 +10,7 @@ export type PromptTemplateParameterJson = {
|
|
|
9
10
|
* - It must be unique across the pipeline
|
|
10
11
|
* - It should start lowercase and contain letters and numbers
|
|
11
12
|
*/
|
|
12
|
-
readonly name:
|
|
13
|
+
readonly name: string_parameter_name;
|
|
13
14
|
/**
|
|
14
15
|
* The parameter is input of the pipeline
|
|
15
16
|
*/
|
|
@@ -23,4 +24,12 @@ export type PromptTemplateParameterJson = {
|
|
|
23
24
|
* - It can use simple markdown formatting like **bold**, *italic*, [link](https://example.com), ... BUT not code blocks and structure
|
|
24
25
|
*/
|
|
25
26
|
readonly description?: string_markdown_text;
|
|
27
|
+
/**
|
|
28
|
+
* Sample values of the parameter
|
|
29
|
+
* Note: This values won't be actually used as some default values, but they are just for better understanding of the parameter
|
|
30
|
+
*/
|
|
31
|
+
readonly sampleValues?: Array<string_parameter_value>;
|
|
26
32
|
};
|
|
33
|
+
/**
|
|
34
|
+
* TODO: [♈] Probbably move expectations from templates to parameters
|
|
35
|
+
*/
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Promptbook is the **core concept of this package**.
|
|
3
3
|
* It represents a series of prompt templates chained together to form a pipeline / one big prompt template with input and result parameters.
|
|
4
4
|
*
|
|
5
|
-
* @see
|
|
5
|
+
* @see @@@ https://github.com/webgptorg/promptbook#promptbook
|
|
6
6
|
*/
|
|
7
7
|
export type PipelineString = string & {
|
|
8
8
|
readonly _type: 'Promptbook';
|
|
@@ -2,13 +2,15 @@ import type { ExpectFormatCommand } from '../commands/EXPECT/ExpectFormatCommand
|
|
|
2
2
|
import type { PostprocessingFunction } from '../scripting/javascript/JavascriptExecutionToolsOptions';
|
|
3
3
|
import type { ModelRequirements } from './ModelRequirements';
|
|
4
4
|
import type { Expectations } from './PipelineJson/Expectations';
|
|
5
|
-
import type {
|
|
5
|
+
import type { string_parameter_name } from './typeAliases';
|
|
6
|
+
import type { string_parameter_value } from './typeAliases';
|
|
6
7
|
import type { string_pipeline_url_with_hashtemplate } from './typeAliases';
|
|
7
8
|
import type { string_prompt } from './typeAliases';
|
|
8
9
|
import type { string_title } from './typeAliases';
|
|
9
10
|
/**
|
|
10
11
|
* Prompt in a text along with model requirements, but without any execution or templating logic.
|
|
11
12
|
*
|
|
13
|
+
* Note: [🛫] This is NOT fully serializable as JSON, it contains functions which are not serializable
|
|
12
14
|
* @see https://github.com/webgptorg/promptbook#prompt
|
|
13
15
|
*/
|
|
14
16
|
export type Prompt = {
|
|
@@ -58,8 +60,9 @@ export type Prompt = {
|
|
|
58
60
|
*
|
|
59
61
|
* Note: This is redundant (same information is in pipelineUrl+content) but useful for logging and debugging
|
|
60
62
|
*/
|
|
61
|
-
readonly parameters: Record<
|
|
63
|
+
readonly parameters: Record<string_parameter_name, string_parameter_value>;
|
|
62
64
|
};
|
|
63
65
|
/**
|
|
64
66
|
* TODO: [✔] Check ModelRequirements in runtime
|
|
67
|
+
* TODO: [🏳] Add options for translation - maybe create `TranslationPrompt`
|
|
65
68
|
*/
|
|
@@ -32,6 +32,12 @@ export type string_text_prompt = string_prompt;
|
|
|
32
32
|
* For example `"How many hats does the cat wear?"`
|
|
33
33
|
*/
|
|
34
34
|
export type string_chat_prompt = string_text_prompt;
|
|
35
|
+
/**
|
|
36
|
+
* Semantic helper
|
|
37
|
+
*
|
|
38
|
+
* For example `"You are an AI assistant. You are here to help me with my work."`
|
|
39
|
+
*/
|
|
40
|
+
export type string_system_message = string_text_prompt;
|
|
35
41
|
/**
|
|
36
42
|
* Semantic helper
|
|
37
43
|
*
|
|
@@ -73,6 +79,20 @@ export type string_char = string;
|
|
|
73
79
|
* For example `"ainautes"`
|
|
74
80
|
*/
|
|
75
81
|
export type string_name = string;
|
|
82
|
+
/**
|
|
83
|
+
* Semantic helper
|
|
84
|
+
* Unique identifier of anything
|
|
85
|
+
*
|
|
86
|
+
* For example `"eventName"`
|
|
87
|
+
*/
|
|
88
|
+
export type string_parameter_name = string;
|
|
89
|
+
/**
|
|
90
|
+
* Semantic helper
|
|
91
|
+
* Unique identifier of anything
|
|
92
|
+
*
|
|
93
|
+
* For example `"DevConf 2024"`
|
|
94
|
+
*/
|
|
95
|
+
export type string_parameter_value = string;
|
|
76
96
|
/**
|
|
77
97
|
* Semantic helper
|
|
78
98
|
* Title of anything
|
|
@@ -462,9 +482,22 @@ export type number_negative = number;
|
|
|
462
482
|
export type number_integer = number;
|
|
463
483
|
/**
|
|
464
484
|
* Semantic helper;
|
|
465
|
-
* Percentage from 0 to 1 (100%)
|
|
485
|
+
* Percentage from 0 to 1 (100%) (and bellow and above)
|
|
466
486
|
*/
|
|
467
487
|
export type number_percent = number;
|
|
488
|
+
/**
|
|
489
|
+
* Semantic helper;
|
|
490
|
+
* Model temperature
|
|
491
|
+
*/
|
|
492
|
+
export type number_model_temperature = number_percent;
|
|
493
|
+
/**
|
|
494
|
+
* Semantic helper;
|
|
495
|
+
* Seed for random generator
|
|
496
|
+
*
|
|
497
|
+
* Percentage from 0 to 1 (100%)
|
|
498
|
+
* TODO: Is seed (in OpenAI) number from 0 to 1?
|
|
499
|
+
*/
|
|
500
|
+
export type number_seed = number_percent;
|
|
468
501
|
/**
|
|
469
502
|
* Likeness of the wallpaper
|
|
470
503
|
*
|
|
@@ -491,4 +524,5 @@ export type number_terabytes = number_positive;
|
|
|
491
524
|
* TODO: !!! Change "For example" to @example
|
|
492
525
|
* TODO: !! Cleanup
|
|
493
526
|
* TODO: !! Change to branded types
|
|
527
|
+
* TODO: [📂] Export all this file through `@promptbook/types`
|
|
494
528
|
*/
|
|
@@ -5,7 +5,7 @@ import type { string_char_emoji } from '../types/typeAliasEmoji';
|
|
|
5
5
|
*
|
|
6
6
|
* @see https://getemoji.com/
|
|
7
7
|
*
|
|
8
|
-
* @private within the
|
|
8
|
+
* @private within the repository
|
|
9
9
|
* @deprecated Use /\p{Extended_Pictographic}/ instead
|
|
10
10
|
*/
|
|
11
11
|
export declare const EMOJIS_IN_CATEGORIES: Record<string, Array<string_char_emoji>>;
|
|
@@ -13,7 +13,7 @@ export declare const EMOJIS_IN_CATEGORIES: Record<string, Array<string_char_emoj
|
|
|
13
13
|
*
|
|
14
14
|
* All possible emoji chars like "🍆", "🍡", "🍤"...
|
|
15
15
|
*
|
|
16
|
-
* @private within the
|
|
16
|
+
* @private within the repository
|
|
17
17
|
* @deprecated Use /\p{Extended_Pictographic}/ instead
|
|
18
18
|
*/
|
|
19
19
|
export declare const EMOJIS: Set<string_char_emoji>;
|
|
@@ -3,7 +3,7 @@ import type { string_name } from '../../types/typeAliases';
|
|
|
3
3
|
/**
|
|
4
4
|
* Add or modify an auto-generated section in a markdown file
|
|
5
5
|
*
|
|
6
|
-
* @private within the
|
|
6
|
+
* @private within the repository
|
|
7
7
|
*/
|
|
8
8
|
export declare function addAutoGeneratedSection(content: string_markdown, options: {
|
|
9
9
|
readonly sectionName: string_name;
|
|
@@ -28,7 +28,7 @@ type CreateMarkdownChartOptions = {
|
|
|
28
28
|
/**
|
|
29
29
|
* Function createMarkdownChart will draw a chart in markdown from ⬛+🟦 tiles
|
|
30
30
|
*
|
|
31
|
-
* @private within the
|
|
31
|
+
* @private within the repository
|
|
32
32
|
*/
|
|
33
33
|
export declare function createMarkdownChart(options: CreateMarkdownChartOptions): string_markdown;
|
|
34
34
|
export {};
|
|
@@ -3,6 +3,6 @@ import type { string_markdown_text } from '../../types/typeAliases';
|
|
|
3
3
|
/**
|
|
4
4
|
* Create a markdown table from a 2D array of strings
|
|
5
5
|
*
|
|
6
|
-
* @private within the
|
|
6
|
+
* @private within the repository
|
|
7
7
|
*/
|
|
8
8
|
export declare function createMarkdownTable(table: Array<Array<string_markdown_text>>): string_markdown;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -3,6 +3,10 @@ import type { string_markdown } from '../../types/typeAliases';
|
|
|
3
3
|
* Single code block inside markdown.
|
|
4
4
|
*/
|
|
5
5
|
export type CodeBlock = {
|
|
6
|
+
/**
|
|
7
|
+
* Which notation was used to open the code block
|
|
8
|
+
*/
|
|
9
|
+
readonly blockNotation: '```' | '>';
|
|
6
10
|
/**
|
|
7
11
|
* Language of the code block OR null if the language is not specified in opening ```
|
|
8
12
|
*/
|
|
@@ -25,3 +29,6 @@ export type CodeBlock = {
|
|
|
25
29
|
*
|
|
26
30
|
*/
|
|
27
31
|
export declare function extractAllBlocksFromMarkdown(markdown: string_markdown): Array<CodeBlock>;
|
|
32
|
+
/**
|
|
33
|
+
* TODO: Maybe name for `blockNotation` instead of '```' and '>'
|
|
34
|
+
*/
|
|
@@ -15,5 +15,5 @@ import type { CodeBlock } from './extractAllBlocksFromMarkdown';
|
|
|
15
15
|
*/
|
|
16
16
|
export declare function extractOneBlockFromMarkdown(markdown: string_markdown): CodeBlock;
|
|
17
17
|
/***
|
|
18
|
-
* TODO: [🍓][🌻]
|
|
18
|
+
* TODO: [🍓][🌻] Decide of this is internal util, external util OR validator/postprocessor
|
|
19
19
|
*/
|