@promptbook/types 0.52.0-9 โ 0.53.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -13
- package/esm/index.es.js.map +1 -1
- package/esm/typings/_packages/core.index.d.ts +4 -2
- package/esm/typings/_packages/utils.index.d.ts +2 -0
- package/esm/typings/conversion/prettify/prettifyPromptbookString.d.ts +1 -1
- package/esm/typings/conversion/prettify/renderPromptbookMermaid.d.ts +2 -1
- package/esm/typings/conversion/utils/extractParametersFromPromptTemplate.d.ts +3 -3
- package/esm/typings/conversion/utils/extractVariables.d.ts +2 -1
- package/esm/typings/conversion/validation/_importPromptbook.d.ts +2 -2
- package/esm/typings/errors/PromptbookLibraryError.d.ts +7 -0
- package/esm/typings/execution/ExecutionTools.d.ts +5 -3
- package/esm/typings/execution/LlmExecutionTools.d.ts +4 -2
- package/esm/typings/execution/PromptResult.d.ts +5 -1
- package/esm/typings/execution/ScriptExecutionTools.d.ts +2 -1
- package/esm/typings/execution/UserInterfaceTools.d.ts +2 -1
- package/esm/typings/execution/createPromptbookExecutor.d.ts +3 -3
- package/esm/typings/execution/plugins/llm-execution-tools/anthropic-claude/AnthropicClaudeExecutionTools.d.ts +4 -3
- package/esm/typings/execution/plugins/llm-execution-tools/anthropic-claude/anthropic-claude-models.d.ts +1 -1
- package/esm/typings/execution/plugins/llm-execution-tools/azure-openai/AzureOpenAiExecutionTools.d.ts +4 -3
- package/esm/typings/execution/plugins/llm-execution-tools/azure-openai/AzureOpenAiExecutionToolsOptions.d.ts +2 -1
- package/esm/typings/execution/plugins/llm-execution-tools/langtail/LangtailExecutionTools.d.ts +0 -3
- package/esm/typings/execution/plugins/llm-execution-tools/mocked/MockedEchoLlmExecutionTools.d.ts +4 -2
- package/esm/typings/execution/plugins/llm-execution-tools/mocked/MockedFackedLlmExecutionTools.d.ts +4 -2
- package/esm/typings/execution/plugins/llm-execution-tools/mocked/fakeTextToExpectations.d.ts +1 -1
- package/esm/typings/execution/plugins/llm-execution-tools/multiple/MultipleLlmExecutionTools.d.ts +4 -2
- package/esm/typings/execution/plugins/llm-execution-tools/multiple/MultipleLlmExecutionToolsOptions.d.ts +2 -1
- package/esm/typings/execution/plugins/llm-execution-tools/openai/OpenAiExecutionTools.d.ts +5 -3
- package/esm/typings/execution/plugins/llm-execution-tools/openai/OpenAiExecutionToolsOptions.d.ts +1 -1
- package/esm/typings/execution/plugins/llm-execution-tools/openai/openai-models.d.ts +1 -1
- package/esm/typings/execution/plugins/llm-execution-tools/remote/RemoteLlmExecutionTools.d.ts +5 -3
- package/esm/typings/execution/plugins/llm-execution-tools/remote/RemoteLlmExecutionToolsOptions.d.ts +2 -1
- package/esm/typings/execution/plugins/llm-execution-tools/remote/interfaces/Promptbook_Server_Progress.d.ts +1 -1
- package/esm/typings/execution/plugins/llm-execution-tools/remote/interfaces/Promptbook_Server_Response.d.ts +1 -1
- package/esm/typings/execution/plugins/llm-execution-tools/remote/interfaces/RemoteServerOptions.d.ts +2 -1
- package/esm/typings/execution/plugins/llm-execution-tools/remote/startRemoteServer.d.ts +2 -1
- package/esm/typings/execution/plugins/script-execution-tools/python/PythonExecutionTools.d.ts +3 -2
- package/esm/typings/execution/plugins/script-execution-tools/typescript/TypescriptExecutionTools.d.ts +3 -2
- package/esm/typings/execution/plugins/user-interface-execution-tools/callback/CallbackInterfaceTools.d.ts +3 -2
- package/esm/typings/execution/plugins/user-interface-execution-tools/simple-prompt/SimplePromptInterfaceTools.d.ts +3 -2
- package/esm/typings/execution/translation/automatic-translate/automatic-translators/DebugAutomaticTranslator.d.ts +1 -1
- package/esm/typings/execution/translation/automatic-translate/automatic-translators/FakeAutomaticTranslator.d.ts +1 -1
- package/esm/typings/execution/translation/automatic-translate/automatic-translators/LindatAutomaticTranslator.d.ts +2 -2
- package/esm/typings/execution/translation/automatic-translate/translateMessages.d.ts +2 -2
- package/esm/typings/execution/utils/forEachAsync.d.ts +18 -0
- package/esm/typings/execution/utils/replaceParameters.d.ts +2 -2
- package/esm/typings/library/SimplePromptbookLibrary.d.ts +1 -1
- package/esm/typings/library/constructors/createPromptbookLibraryFromDirectory.d.ts +30 -6
- package/esm/typings/library/constructors/createPromptbookLibraryFromDirectory.test.d.ts +1 -0
- package/esm/typings/library/constructors/createPromptbookLibraryFromPromise.d.ts +4 -4
- package/esm/typings/library/constructors/createPromptbookLibraryFromPromise.test.d.ts +1 -0
- package/esm/typings/library/constructors/createPromptbookLibraryFromSources.d.ts +2 -1
- package/esm/typings/library/constructors/createPromptbookLibraryFromSources.test.d.ts +1 -0
- package/esm/typings/library/constructors/createPromptbookLibraryFromUrl.d.ts +23 -6
- package/esm/typings/library/constructors/createPromptbookSublibrary.d.ts +1 -1
- package/esm/typings/library/constructors/justTestFsImport.d.ts +7 -0
- package/esm/typings/types/Command.d.ts +5 -2
- package/esm/typings/types/Prompt.d.ts +5 -2
- package/esm/typings/types/PromptbookJson/PromptTemplateJson.d.ts +8 -1
- package/esm/typings/types/PromptbookJson/PromptbookJson.d.ts +2 -1
- package/esm/typings/types/TaskProgress.d.ts +2 -1
- package/esm/typings/types/execution-report/ExecutionReportJson.d.ts +2 -1
- package/esm/typings/types/execution-report/countWorkingDuration.d.ts +1 -1
- package/esm/typings/types/typeAliases.d.ts +2 -2
- package/esm/typings/utils/emojis.d.ts +1 -1
- package/esm/typings/utils/expectation-counters/index.d.ts +2 -1
- package/esm/typings/utils/extractParameters.d.ts +2 -1
- package/esm/typings/utils/markdown/addAutoGeneratedSection.d.ts +2 -1
- package/esm/typings/utils/markdown/createMarkdownChart.d.ts +2 -2
- package/esm/typings/utils/markdown/createMarkdownTable.d.ts +2 -1
- package/esm/typings/utils/markdown/escapeMarkdownBlock.d.ts +1 -1
- package/esm/typings/utils/markdown/extractAllListItemsFromMarkdown.d.ts +2 -1
- package/esm/typings/utils/markdown/extractOneBlockFromMarkdown.d.ts +2 -2
- package/esm/typings/utils/markdown/removeContentComments.d.ts +2 -1
- package/esm/typings/utils/markdown/removeMarkdownFormatting.d.ts +1 -1
- package/esm/typings/utils/markdown-json/countMarkdownStructureDeepness.d.ts +1 -1
- package/esm/typings/utils/markdown-json/markdownToMarkdownStructure.d.ts +1 -1
- package/esm/typings/utils/normalization/isValidKeyword.d.ts +1 -1
- package/esm/typings/utils/normalization/parseKeywords.d.ts +1 -1
- package/esm/typings/utils/normalization/parseKeywordsFromString.d.ts +1 -1
- package/esm/typings/utils/normalization/searchKeywords.d.ts +1 -1
- package/esm/typings/utils/postprocessing/extractBlock.d.ts +1 -1
- package/package.json +2 -2
- package/umd/index.umd.js.map +1 -1
- package/umd/typings/_packages/core.index.d.ts +4 -2
- package/umd/typings/_packages/utils.index.d.ts +2 -0
- package/umd/typings/conversion/prettify/prettifyPromptbookString.d.ts +1 -1
- package/umd/typings/conversion/prettify/renderPromptbookMermaid.d.ts +2 -1
- package/umd/typings/conversion/utils/extractParametersFromPromptTemplate.d.ts +3 -3
- package/umd/typings/conversion/utils/extractVariables.d.ts +2 -1
- package/umd/typings/conversion/validation/_importPromptbook.d.ts +2 -2
- package/umd/typings/errors/PromptbookLibraryError.d.ts +7 -0
- package/umd/typings/execution/ExecutionTools.d.ts +5 -3
- package/umd/typings/execution/LlmExecutionTools.d.ts +4 -2
- package/umd/typings/execution/PromptResult.d.ts +5 -1
- package/umd/typings/execution/ScriptExecutionTools.d.ts +2 -1
- package/umd/typings/execution/UserInterfaceTools.d.ts +2 -1
- package/umd/typings/execution/createPromptbookExecutor.d.ts +3 -3
- package/umd/typings/execution/plugins/llm-execution-tools/anthropic-claude/AnthropicClaudeExecutionTools.d.ts +4 -3
- package/umd/typings/execution/plugins/llm-execution-tools/anthropic-claude/anthropic-claude-models.d.ts +1 -1
- package/umd/typings/execution/plugins/llm-execution-tools/azure-openai/AzureOpenAiExecutionTools.d.ts +4 -3
- package/umd/typings/execution/plugins/llm-execution-tools/azure-openai/AzureOpenAiExecutionToolsOptions.d.ts +2 -1
- package/umd/typings/execution/plugins/llm-execution-tools/langtail/LangtailExecutionTools.d.ts +0 -3
- package/umd/typings/execution/plugins/llm-execution-tools/mocked/MockedEchoLlmExecutionTools.d.ts +4 -2
- package/umd/typings/execution/plugins/llm-execution-tools/mocked/MockedFackedLlmExecutionTools.d.ts +4 -2
- package/umd/typings/execution/plugins/llm-execution-tools/mocked/fakeTextToExpectations.d.ts +1 -1
- package/umd/typings/execution/plugins/llm-execution-tools/multiple/MultipleLlmExecutionTools.d.ts +4 -2
- package/umd/typings/execution/plugins/llm-execution-tools/multiple/MultipleLlmExecutionToolsOptions.d.ts +2 -1
- package/umd/typings/execution/plugins/llm-execution-tools/openai/OpenAiExecutionTools.d.ts +5 -3
- package/umd/typings/execution/plugins/llm-execution-tools/openai/OpenAiExecutionToolsOptions.d.ts +1 -1
- package/umd/typings/execution/plugins/llm-execution-tools/openai/openai-models.d.ts +1 -1
- package/umd/typings/execution/plugins/llm-execution-tools/remote/RemoteLlmExecutionTools.d.ts +5 -3
- package/umd/typings/execution/plugins/llm-execution-tools/remote/RemoteLlmExecutionToolsOptions.d.ts +2 -1
- package/umd/typings/execution/plugins/llm-execution-tools/remote/interfaces/Promptbook_Server_Progress.d.ts +1 -1
- package/umd/typings/execution/plugins/llm-execution-tools/remote/interfaces/Promptbook_Server_Response.d.ts +1 -1
- package/umd/typings/execution/plugins/llm-execution-tools/remote/interfaces/RemoteServerOptions.d.ts +2 -1
- package/umd/typings/execution/plugins/llm-execution-tools/remote/startRemoteServer.d.ts +2 -1
- package/umd/typings/execution/plugins/script-execution-tools/python/PythonExecutionTools.d.ts +3 -2
- package/umd/typings/execution/plugins/script-execution-tools/typescript/TypescriptExecutionTools.d.ts +3 -2
- package/umd/typings/execution/plugins/user-interface-execution-tools/callback/CallbackInterfaceTools.d.ts +3 -2
- package/umd/typings/execution/plugins/user-interface-execution-tools/simple-prompt/SimplePromptInterfaceTools.d.ts +3 -2
- package/umd/typings/execution/translation/automatic-translate/automatic-translators/DebugAutomaticTranslator.d.ts +1 -1
- package/umd/typings/execution/translation/automatic-translate/automatic-translators/FakeAutomaticTranslator.d.ts +1 -1
- package/umd/typings/execution/translation/automatic-translate/automatic-translators/LindatAutomaticTranslator.d.ts +2 -2
- package/umd/typings/execution/translation/automatic-translate/translateMessages.d.ts +2 -2
- package/umd/typings/execution/utils/forEachAsync.d.ts +18 -0
- package/umd/typings/execution/utils/replaceParameters.d.ts +2 -2
- package/umd/typings/library/SimplePromptbookLibrary.d.ts +1 -1
- package/umd/typings/library/constructors/createPromptbookLibraryFromDirectory.d.ts +30 -6
- package/umd/typings/library/constructors/createPromptbookLibraryFromDirectory.test.d.ts +1 -0
- package/umd/typings/library/constructors/createPromptbookLibraryFromPromise.d.ts +4 -4
- package/umd/typings/library/constructors/createPromptbookLibraryFromPromise.test.d.ts +1 -0
- package/umd/typings/library/constructors/createPromptbookLibraryFromSources.d.ts +2 -1
- package/umd/typings/library/constructors/createPromptbookLibraryFromSources.test.d.ts +1 -0
- package/umd/typings/library/constructors/createPromptbookLibraryFromUrl.d.ts +23 -6
- package/umd/typings/library/constructors/createPromptbookSublibrary.d.ts +1 -1
- package/umd/typings/library/constructors/justTestFsImport.d.ts +7 -0
- package/umd/typings/types/Command.d.ts +5 -2
- package/umd/typings/types/Prompt.d.ts +5 -2
- package/umd/typings/types/PromptbookJson/PromptTemplateJson.d.ts +8 -1
- package/umd/typings/types/PromptbookJson/PromptbookJson.d.ts +2 -1
- package/umd/typings/types/TaskProgress.d.ts +2 -1
- package/umd/typings/types/execution-report/ExecutionReportJson.d.ts +2 -1
- package/umd/typings/types/execution-report/countWorkingDuration.d.ts +1 -1
- package/umd/typings/types/typeAliases.d.ts +2 -2
- package/umd/typings/utils/emojis.d.ts +1 -1
- package/umd/typings/utils/expectation-counters/index.d.ts +2 -1
- package/umd/typings/utils/extractParameters.d.ts +2 -1
- package/umd/typings/utils/markdown/addAutoGeneratedSection.d.ts +2 -1
- package/umd/typings/utils/markdown/createMarkdownChart.d.ts +2 -2
- package/umd/typings/utils/markdown/createMarkdownTable.d.ts +2 -1
- package/umd/typings/utils/markdown/escapeMarkdownBlock.d.ts +1 -1
- package/umd/typings/utils/markdown/extractAllListItemsFromMarkdown.d.ts +2 -1
- package/umd/typings/utils/markdown/extractOneBlockFromMarkdown.d.ts +2 -2
- package/umd/typings/utils/markdown/removeContentComments.d.ts +2 -1
- package/umd/typings/utils/markdown/removeMarkdownFormatting.d.ts +1 -1
- package/umd/typings/utils/markdown-json/countMarkdownStructureDeepness.d.ts +1 -1
- package/umd/typings/utils/markdown-json/markdownToMarkdownStructure.d.ts +1 -1
- package/umd/typings/utils/normalization/isValidKeyword.d.ts +1 -1
- package/umd/typings/utils/normalization/parseKeywords.d.ts +1 -1
- package/umd/typings/utils/normalization/parseKeywordsFromString.d.ts +1 -1
- package/umd/typings/utils/normalization/searchKeywords.d.ts +1 -1
- package/umd/typings/utils/postprocessing/extractBlock.d.ts +1 -1
- package/esm/typings/wizzard/Wizzard.d.ts +0 -4
- package/esm/typings/wizzard/sample.d.ts +0 -6
- package/umd/typings/wizzard/Wizzard.d.ts +0 -4
- package/umd/typings/wizzard/sample.d.ts +0 -6
package/README.md
CHANGED
|
@@ -11,7 +11,6 @@ Library to supercharge your use of large language models
|
|
|
11
11
|
[](https://github.com/webgptorg/promptbook/issues)
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
[](https://socket.dev/npm/package/@promptbook/types)
|
|
15
14
|
|
|
16
15
|
|
|
17
16
|
|
|
@@ -79,15 +78,6 @@ In any of these situations, but especially in (3), the Promptbook library can ma
|
|
|
79
78
|
- _(Not ready yet)_ Leverage the **streaming** to make super cool UI/UX.
|
|
80
79
|
- _(Not ready yet)_ **A/B testing** to determine which prompt works best for the job.
|
|
81
80
|
|
|
82
|
-

|
|
83
|
-
|
|
84
|
-
## ๐ง Promptbook _(for prompt-engeneers)_
|
|
85
|
-
|
|
86
|
-
**P**romp**t** **b**oo**k** markdown file (**PTBK** for short, or `.ptbk.md`) is document that describes a series of prompts that are chained together to form somewhat reciepe for transforming natural language input. Inside a PTBK you can use chat prompts, completion prompts, scripting or trigger interaction with user to ask for additional information.
|
|
87
|
-
|
|
88
|
-
- Multiple promptbooks forms a library which will become a **part of your application codebase**.
|
|
89
|
-
- Theese promptbooks are designed such as they **can be written by non-programmers**.
|
|
90
|
-
|
|
91
81
|
|
|
92
82
|
|
|
93
83
|
### Sample:
|
|
@@ -100,7 +90,7 @@ File `write-website-content.ptbk.md`:
|
|
|
100
90
|
>
|
|
101
91
|
> Instructions for creating web page content.
|
|
102
92
|
>
|
|
103
|
-
> - PROMPTBOOK URL https://promptbook.webgpt.com/en/write-website-content.ptbk.md
|
|
93
|
+
> - PROMPTBOOK URL https://promptbook.webgpt.com/en/write-website-content.ptbk.md
|
|
104
94
|
> - PROMPTBOOK VERSION 0.0.1
|
|
105
95
|
> - INPUTโฏโฏPARAM `{rawTitle}` Automatically suggested a site name or empty text
|
|
106
96
|
> - INPUTโฏโฏPARAM `{rawAssigment}` Automatically generated site entry from image recognition
|
|
@@ -559,8 +549,6 @@ _Note: LLMs work with tokens, not characters, but in Promptbooks we want to use
|
|
|
559
549
|
```markdown
|
|
560
550
|
# โจ Sample: Expectations
|
|
561
551
|
|
|
562
|
-
- PROMPTBOOK URL https://promptbook.example.com/samples/postprocessing-2.ptbk.md@v1
|
|
563
|
-
- PROMPTBOOK VERSION 1.0.0
|
|
564
552
|
- INPUTโฏโฏPARAMETER {yourName} Name of the hero
|
|
565
553
|
|
|
566
554
|
## ๐ฌ Question
|
package/esm/index.es.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es.js","sources":["../../../src/types/PromptbookJson/PromptTemplateJson.ts"],"sourcesContent":[null],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.es.js","sources":["../../../src/types/PromptbookJson/PromptTemplateJson.ts"],"sourcesContent":[null],"names":[],"mappings":"AA0CA;;;IAGa,iBAAiB,GAAG,CAAC,YAAY,EAAE,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,YAAY,EAAE,OAAO,EAAW;AAmH/G;;;;;;;;"}
|
|
@@ -10,17 +10,19 @@ import { CallbackInterfaceToolsOptions } from '../execution/plugins/user-interfa
|
|
|
10
10
|
import { SimplePromptInterfaceTools } from '../execution/plugins/user-interface-execution-tools/simple-prompt/SimplePromptInterfaceTools';
|
|
11
11
|
import { checkExpectations, isPassingExpectations } from '../execution/utils/checkExpectations';
|
|
12
12
|
import { createPromptbookLibraryFromDirectory } from '../library/constructors/createPromptbookLibraryFromDirectory';
|
|
13
|
-
import { createPromptbookLibraryFromPromise } from '../library/constructors/createPromptbookLibraryFromPromise';
|
|
14
13
|
import { createPromptbookLibraryFromSources } from '../library/constructors/createPromptbookLibraryFromSources';
|
|
14
|
+
import { createPromptbookLibraryFromUrl } from '../library/constructors/createPromptbookLibraryFromUrl';
|
|
15
15
|
import { createPromptbookSublibrary } from '../library/constructors/createPromptbookSublibrary';
|
|
16
|
+
import { justTestFsImport } from '../library/constructors/justTestFsImport';
|
|
16
17
|
import { SimplePromptbookLibrary } from '../library/SimplePromptbookLibrary';
|
|
17
18
|
import { executionReportJsonToString } from '../types/execution-report/executionReportJsonToString';
|
|
18
19
|
import { ExecutionReportStringOptions, ExecutionReportStringOptionsDefaults } from '../types/execution-report/ExecutionReportStringOptions';
|
|
19
20
|
import { ExecutionTypes } from '../types/ExecutionTypes';
|
|
20
21
|
import { PROMPTBOOK_VERSION } from '../version';
|
|
22
|
+
export { justTestFsImport };
|
|
21
23
|
export { ExecutionTypes, PROMPTBOOK_VERSION };
|
|
22
24
|
export { assertsExecutionSuccessful, checkExpectations, executionReportJsonToString, ExecutionReportStringOptions, ExecutionReportStringOptionsDefaults, isPassingExpectations, prettifyPromptbookString, };
|
|
23
|
-
export { createPromptbookLibraryFromDirectory,
|
|
25
|
+
export { createPromptbookLibraryFromDirectory, createPromptbookLibraryFromSources, createPromptbookLibraryFromUrl, createPromptbookSublibrary, SimplePromptbookLibrary, };
|
|
24
26
|
export { SimplePromptInterfaceTools };
|
|
25
27
|
export { promptbookJsonToString, promptbookStringToJson, validatePromptbookJson };
|
|
26
28
|
export { createPromptbookExecutor, MultipleLlmExecutionTools };
|
|
@@ -5,6 +5,7 @@ import { extractVariables } from '../conversion/utils/extractVariables';
|
|
|
5
5
|
import { parseNumber } from '../conversion/utils/parseNumber';
|
|
6
6
|
import { renameParameter } from '../conversion/utils/renameParameter';
|
|
7
7
|
import { titleToName } from '../conversion/utils/titleToName';
|
|
8
|
+
import { forEachAsync } from '../execution/utils/forEachAsync';
|
|
8
9
|
import { replaceParameters } from '../execution/utils/replaceParameters';
|
|
9
10
|
import { CountUtils } from '../utils/expectation-counters';
|
|
10
11
|
import { countCharacters } from '../utils/expectation-counters/countCharacters';
|
|
@@ -46,6 +47,7 @@ import { union } from '../utils/sets/union';
|
|
|
46
47
|
import { trimCodeBlock } from '../utils/trimCodeBlock';
|
|
47
48
|
import { trimEndOfCodeBlock } from '../utils/trimEndOfCodeBlock';
|
|
48
49
|
import { unwrapResult } from '../utils/unwrapResult';
|
|
50
|
+
export { forEachAsync };
|
|
49
51
|
export { extractAllBlocksFromMarkdown, // <- [๐ป]
|
|
50
52
|
extractAllListItemsFromMarkdown, extractBlock, // <- [๐ป]
|
|
51
53
|
extractOneBlockFromMarkdown, extractParameters, extractVariables, isValidJsonString, parseNumber, // <- [๐ป]
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { PromptbookJson
|
|
1
|
+
import type { PromptbookJson } from '../../types/PromptbookJson/PromptbookJson';
|
|
2
|
+
import type { PromptTemplateJson } from '../../types/PromptbookJson/PromptTemplateJson';
|
|
2
3
|
import type { string_href } from '../../types/typeAliases';
|
|
3
4
|
/**
|
|
4
5
|
* Addtional options for rendering Mermaid graph
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { PromptTemplateJson } from '../../types/PromptbookJson/PromptTemplateJson';
|
|
2
|
-
import { string_name } from '../../types/typeAliases';
|
|
1
|
+
import type { PromptTemplateJson } from '../../types/PromptbookJson/PromptTemplateJson';
|
|
2
|
+
import type { string_name } from '../../types/typeAliases';
|
|
3
3
|
/**
|
|
4
4
|
* Parses the prompt template and returns the set of all used parameters
|
|
5
5
|
*
|
|
@@ -10,4 +10,4 @@ import { string_name } from '../../types/typeAliases';
|
|
|
10
10
|
export declare function extractParametersFromPromptTemplate(promptTemplate: Pick<PromptTemplateJson, 'title' | 'description' | 'executionType' | 'content'>): Set<string_name>;
|
|
11
11
|
/**
|
|
12
12
|
* TODO: [๐ฃ] If script require contentLanguage
|
|
13
|
-
*/
|
|
13
|
+
*/
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { string_javascript
|
|
1
|
+
import type { string_javascript } from '../../types/typeAliases';
|
|
2
|
+
import type { string_javascript_name } from '../../types/typeAliases';
|
|
2
3
|
/**
|
|
3
4
|
* Parses the given script and returns the list of all used variables that are not defined in the script
|
|
4
5
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { PromptbookJson } from '../../types/PromptbookJson/PromptbookJson';
|
|
2
|
-
import { PromptbookString } from '../../types/PromptbookString';
|
|
1
|
+
import type { PromptbookJson } from '../../types/PromptbookJson/PromptbookJson';
|
|
2
|
+
import type { PromptbookString } from '../../types/PromptbookString';
|
|
3
3
|
/**
|
|
4
4
|
* Import the text file
|
|
5
5
|
*
|
|
@@ -9,6 +9,9 @@ import type { UserInterfaceTools } from './UserInterfaceTools';
|
|
|
9
9
|
export type ExecutionTools = {
|
|
10
10
|
/**
|
|
11
11
|
* Tools for executing prompts to large language models like GPT-4
|
|
12
|
+
*
|
|
13
|
+
* Tip: Combine multiple LLM execution tools with `MultipleLlmExecutionTools`
|
|
14
|
+
* @see https://github.com/webgptorg/promptbook/?tab=readme-ov-file#llm-execution-tools
|
|
12
15
|
*/
|
|
13
16
|
llm: LlmExecutionTools;
|
|
14
17
|
/**
|
|
@@ -16,15 +19,14 @@ export type ExecutionTools = {
|
|
|
16
19
|
*
|
|
17
20
|
* Note: You can pass multiple ScriptExecutionTools, they will be tried one by one until one of them supports the script
|
|
18
21
|
* If none of them supports the script, an error is thrown
|
|
22
|
+
* @see https://github.com/webgptorg/promptbook/?tab=readme-ov-file#script-execution-tools
|
|
19
23
|
*/
|
|
20
24
|
script: Array<ScriptExecutionTools>;
|
|
21
25
|
/**
|
|
22
26
|
* Tools for interacting with the user
|
|
23
27
|
*
|
|
24
28
|
* Note: When undefined, the user interface is disabled and promptbook which requires user interaction will fail
|
|
29
|
+
* @see https://github.com/webgptorg/promptbook/?tab=readme-ov-file#user-interface-tools
|
|
25
30
|
*/
|
|
26
31
|
userInterface?: UserInterfaceTools;
|
|
27
32
|
};
|
|
28
|
-
/**
|
|
29
|
-
* TODO: [๐] !!!! Allow to have more LlmExecutionTools
|
|
30
|
-
*/
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import type { Promisable } from 'type-fest';
|
|
2
2
|
import type { ModelVariant } from '../types/ModelRequirements';
|
|
3
3
|
import type { Prompt } from '../types/Prompt';
|
|
4
|
-
import type { string_model_name
|
|
5
|
-
import type {
|
|
4
|
+
import type { string_model_name } from '../types/typeAliases';
|
|
5
|
+
import type { string_title } from '../types/typeAliases';
|
|
6
|
+
import type { PromptChatResult } from './PromptResult';
|
|
7
|
+
import type { PromptCompletionResult } from './PromptResult';
|
|
6
8
|
/**
|
|
7
9
|
* Container for all the tools needed to execute prompts to large language models like GPT-4
|
|
8
10
|
* On its interface it exposes common methods for prompt execution.
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import type { number_positive_or_zero
|
|
1
|
+
import type { number_positive_or_zero } from '../types/typeAliases';
|
|
2
|
+
import type { number_tokens } from '../types/typeAliases';
|
|
3
|
+
import type { number_usd } from '../types/typeAliases';
|
|
4
|
+
import type { string_date_iso8601 } from '../types/typeAliases';
|
|
5
|
+
import type { string_model_name } from '../types/typeAliases';
|
|
2
6
|
/**
|
|
3
7
|
* Prompt result is the simplest concept of execution.
|
|
4
8
|
* It is the result of executing one prompt _(NOT a template)_.
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { string_name
|
|
1
|
+
import type { string_name } from '../types/typeAliases';
|
|
2
|
+
import type { string_script } from '../types/typeAliases';
|
|
2
3
|
import type { ScriptLanguage } from '../types/ScriptLanguage';
|
|
3
4
|
/**
|
|
4
5
|
* Represents all the tools needed to EXECUTE SCRIPTs
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { number_integer
|
|
1
|
+
import type { number_integer } from '../types/typeAliases';
|
|
2
|
+
import type { number_positive } from '../types/typeAliases';
|
|
2
3
|
/**
|
|
3
4
|
* Represents all the tools needed to interact with the user.
|
|
4
5
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { PromptbookJson } from '../
|
|
2
|
-
import { ExecutionTools } from './ExecutionTools';
|
|
3
|
-
import { PromptbookExecutor } from './PromptbookExecutor';
|
|
1
|
+
import type { PromptbookJson } from '../types/PromptbookJson/PromptbookJson';
|
|
2
|
+
import type { ExecutionTools } from './ExecutionTools';
|
|
3
|
+
import type { PromptbookExecutor } from './PromptbookExecutor';
|
|
4
4
|
type CreatePromptbookExecutorSettings = {
|
|
5
5
|
/**
|
|
6
6
|
* When executor does not satisfy expectations it will be retried this amount of times
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { Prompt } from '../../../../types/Prompt';
|
|
2
|
-
import type { AvailableModel
|
|
3
|
-
import type {
|
|
2
|
+
import type { AvailableModel } from '../../../LlmExecutionTools';
|
|
3
|
+
import type { LlmExecutionTools } from '../../../LlmExecutionTools';
|
|
4
|
+
import type { PromptChatResult } from '../../../PromptResult';
|
|
5
|
+
import type { PromptCompletionResult } from '../../../PromptResult';
|
|
4
6
|
import type { AnthropicClaudeExecutionToolsOptions } from './AnthropicClaudeExecutionToolsOptions';
|
|
5
7
|
/**
|
|
6
8
|
* Execution Tools for calling Anthropic Claude API.
|
|
@@ -36,7 +38,6 @@ export declare class AnthropicClaudeExecutionTools implements LlmExecutionTools
|
|
|
36
38
|
}
|
|
37
39
|
/**
|
|
38
40
|
* TODO: [๐ง ] Maybe handle errors via transformAnthropicError (like transformAzureError)
|
|
39
|
-
* TODO: [๐][โ] Allow to list compatible models with each variant
|
|
40
41
|
* TODO: Maybe Create some common util for gptChat and gptComplete
|
|
41
42
|
* TODO: Maybe make custom OpenaiError
|
|
42
43
|
*/
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { Prompt } from '../../../../types/Prompt';
|
|
2
|
-
import type { AvailableModel
|
|
3
|
-
import type {
|
|
2
|
+
import type { AvailableModel } from '../../../LlmExecutionTools';
|
|
3
|
+
import type { LlmExecutionTools } from '../../../LlmExecutionTools';
|
|
4
|
+
import type { PromptChatResult } from '../../../PromptResult';
|
|
5
|
+
import type { PromptCompletionResult } from '../../../PromptResult';
|
|
4
6
|
import type { AzureOpenAiExecutionToolsOptions } from './AzureOpenAiExecutionToolsOptions';
|
|
5
7
|
/**
|
|
6
8
|
* Execution Tools for calling Azure OpenAI API.
|
|
@@ -35,7 +37,6 @@ export declare class AzureOpenAiExecutionTools implements LlmExecutionTools {
|
|
|
35
37
|
listModels(): Promise<Array<AvailableModel>>;
|
|
36
38
|
}
|
|
37
39
|
/**
|
|
38
|
-
* TODO: [๐][โ] Allow to list compatible models with each variant
|
|
39
40
|
* TODO: Maybe Create some common util for gptChat and gptComplete
|
|
40
41
|
* TODO: Maybe make custom AzureOpenaiError
|
|
41
42
|
*/
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { string_name
|
|
1
|
+
import type { string_name } from '../../../../types/typeAliases';
|
|
2
|
+
import type { string_token } from '../../../../types/typeAliases';
|
|
2
3
|
import type { CommonExecutionToolsOptions } from '../../../CommonExecutionToolsOptions';
|
|
3
4
|
/**
|
|
4
5
|
* Options for AzureOpenAiExecutionTools
|
package/esm/typings/execution/plugins/llm-execution-tools/mocked/MockedEchoLlmExecutionTools.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import type { Prompt } from '../../../../types/Prompt';
|
|
2
2
|
import type { CommonExecutionToolsOptions } from '../../../CommonExecutionToolsOptions';
|
|
3
|
-
import type { AvailableModel
|
|
4
|
-
import type {
|
|
3
|
+
import type { AvailableModel } from '../../../LlmExecutionTools';
|
|
4
|
+
import type { LlmExecutionTools } from '../../../LlmExecutionTools';
|
|
5
|
+
import type { PromptChatResult } from '../../../PromptResult';
|
|
6
|
+
import type { PromptCompletionResult } from '../../../PromptResult';
|
|
5
7
|
/**
|
|
6
8
|
* Mocked execution Tools for just echoing the requests for testing purposes.
|
|
7
9
|
*/
|
package/esm/typings/execution/plugins/llm-execution-tools/mocked/MockedFackedLlmExecutionTools.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import type { Prompt } from '../../../../types/Prompt';
|
|
2
2
|
import type { CommonExecutionToolsOptions } from '../../../CommonExecutionToolsOptions';
|
|
3
|
-
import type { AvailableModel
|
|
4
|
-
import type {
|
|
3
|
+
import type { AvailableModel } from '../../../LlmExecutionTools';
|
|
4
|
+
import type { LlmExecutionTools } from '../../../LlmExecutionTools';
|
|
5
|
+
import type { PromptChatResult } from '../../../PromptResult';
|
|
6
|
+
import type { PromptCompletionResult } from '../../../PromptResult';
|
|
5
7
|
/**
|
|
6
8
|
* Mocked execution Tools for just faking expected responses for testing purposes
|
|
7
9
|
*/
|
package/esm/typings/execution/plugins/llm-execution-tools/mocked/fakeTextToExpectations.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Expectations } from '../../../../types/PromptbookJson/PromptTemplateJson';
|
|
2
|
-
import { PostprocessingFunction } from '../../script-execution-tools/javascript/JavascriptExecutionToolsOptions';
|
|
2
|
+
import type { PostprocessingFunction } from '../../script-execution-tools/javascript/JavascriptExecutionToolsOptions';
|
|
3
3
|
/**
|
|
4
4
|
* Gets the expectations and creates a fake text that meets the expectations
|
|
5
5
|
*
|
package/esm/typings/execution/plugins/llm-execution-tools/multiple/MultipleLlmExecutionTools.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { Prompt } from '../../../../types/Prompt';
|
|
2
|
-
import type { AvailableModel
|
|
3
|
-
import type {
|
|
2
|
+
import type { AvailableModel } from '../../../LlmExecutionTools';
|
|
3
|
+
import type { LlmExecutionTools } from '../../../LlmExecutionTools';
|
|
4
|
+
import type { PromptChatResult } from '../../../PromptResult';
|
|
5
|
+
import type { PromptCompletionResult } from '../../../PromptResult';
|
|
4
6
|
/**
|
|
5
7
|
* Multiple LLM Execution Tools is a proxy server that uses multiple execution tools internally and exposes the executor interface externally.
|
|
6
8
|
*
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { client_id
|
|
1
|
+
import type { client_id } from '../../../../types/typeAliases';
|
|
2
|
+
import type { string_uri } from '../../../../types/typeAliases';
|
|
2
3
|
import type { CommonExecutionToolsOptions } from '../../../CommonExecutionToolsOptions';
|
|
3
4
|
/**
|
|
4
5
|
* Options for MultipleLlmExecutionTools
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { Prompt } from '../../../../types/Prompt';
|
|
2
|
-
import type { AvailableModel
|
|
3
|
-
import type {
|
|
2
|
+
import type { AvailableModel } from '../../../LlmExecutionTools';
|
|
3
|
+
import type { LlmExecutionTools } from '../../../LlmExecutionTools';
|
|
4
|
+
import type { PromptChatResult } from '../../../PromptResult';
|
|
5
|
+
import type { PromptCompletionResult } from '../../../PromptResult';
|
|
4
6
|
import type { OpenAiExecutionToolsOptions } from './OpenAiExecutionToolsOptions';
|
|
5
7
|
/**
|
|
6
8
|
* Execution Tools for calling OpenAI API.
|
|
@@ -39,7 +41,7 @@ export declare class OpenAiExecutionTools implements LlmExecutionTools {
|
|
|
39
41
|
listModels(): Array<AvailableModel>;
|
|
40
42
|
}
|
|
41
43
|
/**
|
|
42
|
-
* TODO: [
|
|
44
|
+
* TODO: [๐ง ][๐งโโ๏ธ] Maybe there can be some wizzard for thoose who want to use just OpenAI
|
|
43
45
|
* TODO: Maybe Create some common util for gptChat and gptComplete
|
|
44
46
|
* TODO: Maybe make custom OpenaiError
|
|
45
47
|
*/
|
package/esm/typings/execution/plugins/llm-execution-tools/openai/OpenAiExecutionToolsOptions.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ClientOptions } from 'openai';
|
|
2
|
-
import type { string_token } from '
|
|
2
|
+
import type { string_token } from '../../../../types/typeAliases';
|
|
3
3
|
import type { CommonExecutionToolsOptions } from '../../../CommonExecutionToolsOptions';
|
|
4
4
|
/**
|
|
5
5
|
* Options for OpenAiExecutionTools
|
package/esm/typings/execution/plugins/llm-execution-tools/remote/RemoteLlmExecutionTools.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { Prompt } from '../../../../types/Prompt';
|
|
2
|
-
import type { AvailableModel
|
|
3
|
-
import type {
|
|
2
|
+
import type { AvailableModel } from '../../../LlmExecutionTools';
|
|
3
|
+
import type { LlmExecutionTools } from '../../../LlmExecutionTools';
|
|
4
|
+
import type { PromptChatResult } from '../../../PromptResult';
|
|
5
|
+
import type { PromptCompletionResult } from '../../../PromptResult';
|
|
4
6
|
import type { RemoteLlmExecutionToolsOptions } from './RemoteLlmExecutionToolsOptions';
|
|
5
7
|
/**
|
|
6
8
|
* Remote server is a proxy server that uses its execution tools internally and exposes the executor interface externally.
|
|
@@ -35,6 +37,6 @@ export declare class RemoteLlmExecutionTools implements LlmExecutionTools {
|
|
|
35
37
|
listModels(): Promise<Array<AvailableModel>>;
|
|
36
38
|
}
|
|
37
39
|
/**
|
|
38
|
-
* TODO: [๐]
|
|
40
|
+
* TODO: [๐] Allow to list compatible models with each variant
|
|
39
41
|
* TODO: [๐คนโโ๏ธ] RemoteLlmExecutionTools should extend Destroyable and implement IDestroyable
|
|
40
42
|
*/
|
package/esm/typings/execution/plugins/llm-execution-tools/remote/RemoteLlmExecutionToolsOptions.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { client_id
|
|
1
|
+
import type { client_id } from '../../../../types/typeAliases';
|
|
2
|
+
import type { string_uri } from '../../../../types/typeAliases';
|
|
2
3
|
import type { CommonExecutionToolsOptions } from '../../../CommonExecutionToolsOptions';
|
|
3
4
|
/**
|
|
4
5
|
* Options for RemoteLlmExecutionTools
|
package/esm/typings/execution/plugins/llm-execution-tools/remote/interfaces/RemoteServerOptions.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { PromptbookLibrary } from '../../../../../library/PromptbookLibrary';
|
|
2
|
-
import type { client_id
|
|
2
|
+
import type { client_id } from '../../../../../types/typeAliases';
|
|
3
|
+
import type { string_uri } from '../../../../../types/typeAliases';
|
|
3
4
|
import type { CommonExecutionToolsOptions } from '../../../../CommonExecutionToolsOptions';
|
|
4
5
|
import type { LlmExecutionTools } from '../../../../LlmExecutionTools';
|
|
5
6
|
export type RemoteServerOptions = CommonExecutionToolsOptions & {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { IDestroyable } from 'destroyable';
|
|
2
|
-
import { RemoteServerOptions } from './interfaces/RemoteServerOptions';
|
|
2
|
+
import type { RemoteServerOptions } from './interfaces/RemoteServerOptions';
|
|
3
3
|
/**
|
|
4
4
|
* Remote server is a proxy server that uses its execution tools internally and exposes the executor interface externally.
|
|
5
5
|
*
|
|
@@ -10,6 +10,7 @@ import { RemoteServerOptions } from './interfaces/RemoteServerOptions';
|
|
|
10
10
|
*/
|
|
11
11
|
export declare function startRemoteServer(options: RemoteServerOptions): IDestroyable;
|
|
12
12
|
/**
|
|
13
|
+
* TODO: [โ] Expose the library to be able to connect to same library via createPromptbookLibraryFromUrl
|
|
13
14
|
* TODO: Handle progress - support streaming
|
|
14
15
|
* TODO: [๐คนโโ๏ธ] Do not hang up immediately but wait until client closes OR timeout
|
|
15
16
|
* TODO: [๐คนโโ๏ธ] Timeout on chat to free up resources
|
package/esm/typings/execution/plugins/script-execution-tools/python/PythonExecutionTools.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { CommonExecutionToolsOptions } from '../../../CommonExecutionToolsOptions';
|
|
2
|
-
import { ScriptExecutionTools
|
|
1
|
+
import type { CommonExecutionToolsOptions } from '../../../CommonExecutionToolsOptions';
|
|
2
|
+
import type { ScriptExecutionTools } from '../../../ScriptExecutionTools';
|
|
3
|
+
import type { ScriptExecutionToolsExecuteOptions } from '../../../ScriptExecutionTools';
|
|
3
4
|
/**
|
|
4
5
|
* ScriptExecutionTools for Python
|
|
5
6
|
*
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { CommonExecutionToolsOptions } from '../../../CommonExecutionToolsOptions';
|
|
2
|
-
import { ScriptExecutionTools
|
|
1
|
+
import type { CommonExecutionToolsOptions } from '../../../CommonExecutionToolsOptions';
|
|
2
|
+
import type { ScriptExecutionTools } from '../../../ScriptExecutionTools';
|
|
3
|
+
import type { ScriptExecutionToolsExecuteOptions } from '../../../ScriptExecutionTools';
|
|
3
4
|
/**
|
|
4
5
|
* ScriptExecutionTools for TypeScript
|
|
5
6
|
*
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { UserInterfaceTools
|
|
2
|
-
import {
|
|
1
|
+
import type { UserInterfaceTools } from '../../../UserInterfaceTools';
|
|
2
|
+
import type { UserInterfaceToolsPromptDialogOptions } from '../../../UserInterfaceTools';
|
|
3
|
+
import type { CallbackInterfaceToolsOptions } from './CallbackInterfaceToolsOptions';
|
|
3
4
|
/**
|
|
4
5
|
* Delagates the user interaction to a async callback function
|
|
5
6
|
* You need to provide your own implementation of this callback function and its bind to UI.
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { CommonExecutionToolsOptions } from '../../../CommonExecutionToolsOptions';
|
|
2
|
-
import { UserInterfaceTools
|
|
1
|
+
import type { CommonExecutionToolsOptions } from '../../../CommonExecutionToolsOptions';
|
|
2
|
+
import type { UserInterfaceTools } from '../../../UserInterfaceTools';
|
|
3
|
+
import type { UserInterfaceToolsPromptDialogOptions } from '../../../UserInterfaceTools';
|
|
3
4
|
/**
|
|
4
5
|
* Wrapper around `window.prompt` synchronous function that interacts with the user via browser prompt
|
|
5
6
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AutomaticTranslator } from './AutomaticTranslator';
|
|
2
|
-
import { TranslatorOptions } from './TranslatorOptions';
|
|
1
|
+
import type { AutomaticTranslator } from './AutomaticTranslator';
|
|
2
|
+
import type { TranslatorOptions } from './TranslatorOptions';
|
|
3
3
|
interface LindatAutomaticTranslatorOptions extends TranslatorOptions {
|
|
4
4
|
apiUrl: URL;
|
|
5
5
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AutomaticTranslator } from './automatic-translators/AutomaticTranslator';
|
|
2
|
-
import { TranslatorOptions } from './automatic-translators/TranslatorOptions';
|
|
1
|
+
import type { AutomaticTranslator } from './automatic-translators/AutomaticTranslator';
|
|
2
|
+
import type { TranslatorOptions } from './automatic-translators/TranslatorOptions';
|
|
3
3
|
export declare function translateMessages({ automaticTranslator, from, to, }: {
|
|
4
4
|
automaticTranslator: AutomaticTranslator;
|
|
5
5
|
} & TranslatorOptions): Promise<void>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { Promisable } from 'type-fest';
|
|
2
|
+
type ForEachAsyncOptions = {
|
|
3
|
+
/**
|
|
4
|
+
* Maximum number of tasks running in parallel
|
|
5
|
+
*
|
|
6
|
+
* @default Infinity
|
|
7
|
+
*/
|
|
8
|
+
inParallelCount?: number;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Async version of Array.forEach
|
|
12
|
+
*
|
|
13
|
+
* @param array - Array to iterate over
|
|
14
|
+
* @param options - Options for the function
|
|
15
|
+
* @param callbackfunction - Function to call for each item
|
|
16
|
+
*/
|
|
17
|
+
export declare function forEachAsync<TItem>(array: Array<TItem>, options: ForEachAsyncOptions, callbackfunction: (value: TItem, index: number, array: Array<TItem>) => Promisable<void>): Promise<void>;
|
|
18
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Parameters } from '../../types/Parameters';
|
|
2
|
-
import { string_template } from '../../types/typeAliases';
|
|
1
|
+
import type { Parameters } from '../../types/Parameters';
|
|
2
|
+
import type { string_template } from '../../types/typeAliases';
|
|
3
3
|
/**
|
|
4
4
|
* Replaces parameters in template with values from parameters object
|
|
5
5
|
*
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Prompt } from '../types/Prompt';
|
|
2
2
|
import type { PromptbookJson } from '../types/PromptbookJson/PromptbookJson';
|
|
3
3
|
import type { string_promptbook_url } from '../types/typeAliases';
|
|
4
|
-
import { PromptbookLibrary } from './PromptbookLibrary';
|
|
4
|
+
import type { PromptbookLibrary } from './PromptbookLibrary';
|
|
5
5
|
/**
|
|
6
6
|
* Library of promptbooks that groups together promptbooks for an application.
|
|
7
7
|
* This implementation is a very thin wrapper around the Array / Map of promptbooks.
|