@promptbook/core 0.44.0-9 → 0.45.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 +740 -2
- package/esm/index.es.js +164 -44
- package/esm/index.es.js.map +1 -1
- package/esm/typings/_packages/utils.index.d.ts +4 -2
- package/esm/typings/conversion/promptbookStringToJson.d.ts +2 -2
- package/esm/typings/execution/ExecutionTools.d.ts +3 -3
- package/esm/typings/execution/NaturalExecutionTools.d.ts +2 -2
- package/esm/typings/execution/ScriptExecutionTools.d.ts +2 -2
- package/esm/typings/execution/UserInterfaceTools.d.ts +1 -1
- package/esm/typings/execution/plugins/natural-execution-tools/langtail/LangtailExecutionTools.d.ts +10 -0
- package/esm/typings/execution/plugins/natural-execution-tools/mocked/fakeTextToExpectations.d.ts +6 -2
- package/esm/typings/execution/plugins/natural-execution-tools/openai/OpenAiExecutionTools.d.ts +5 -0
- package/esm/typings/execution/plugins/natural-execution-tools/openai/OpenAiExecutionToolsOptions.d.ts +7 -7
- package/esm/typings/execution/plugins/natural-execution-tools/remote/RemoteNaturalExecutionToolsOptions.d.ts +1 -1
- package/esm/typings/execution/plugins/script-execution-tools/javascript/JavascriptExecutionToolsOptions.d.ts +5 -1
- package/esm/typings/execution/plugins/script-execution-tools/javascript/utils/unknownToString.d.ts +7 -0
- package/esm/typings/execution/plugins/user-interface-execution-tools/callback/CallbackInterfaceToolsOptions.d.ts +3 -3
- package/esm/typings/execution/translation/automatic-translate/automatic-translators/AutomaticTranslator.d.ts +1 -1
- package/esm/typings/library/PromptbookLibrary.d.ts +1 -1
- package/esm/typings/types/ExecutionTypes.d.ts +1 -1
- package/esm/typings/types/ModelRequirements.d.ts +1 -1
- package/esm/typings/types/Prompt.d.ts +5 -0
- package/esm/typings/types/PromptbookJson/PromptTemplateJson.d.ts +6 -5
- package/esm/typings/types/PromptbookJson/PromptTemplateParameterJson.d.ts +1 -1
- package/esm/typings/types/PromptbookJson/PromptbookJson.d.ts +3 -3
- package/esm/typings/types/ScriptLanguage.d.ts +1 -1
- package/esm/typings/types/TaskProgress.d.ts +2 -2
- package/esm/typings/types/execution-report/ExecutionReportStringOptions.d.ts +1 -1
- package/esm/typings/utils/markdown/extractAllBlocksFromMarkdown.d.ts +1 -1
- package/package.json +3 -3
- package/umd/index.umd.js +204 -88
- package/umd/index.umd.js.map +1 -1
- package/umd/typings/_packages/utils.index.d.ts +4 -2
- package/umd/typings/conversion/promptbookStringToJson.d.ts +2 -2
- package/umd/typings/execution/ExecutionTools.d.ts +3 -3
- package/umd/typings/execution/NaturalExecutionTools.d.ts +2 -2
- package/umd/typings/execution/ScriptExecutionTools.d.ts +2 -2
- package/umd/typings/execution/UserInterfaceTools.d.ts +1 -1
- package/umd/typings/execution/plugins/natural-execution-tools/langtail/LangtailExecutionTools.d.ts +10 -0
- package/umd/typings/execution/plugins/natural-execution-tools/mocked/fakeTextToExpectations.d.ts +6 -2
- package/umd/typings/execution/plugins/natural-execution-tools/openai/OpenAiExecutionTools.d.ts +5 -0
- package/umd/typings/execution/plugins/natural-execution-tools/openai/OpenAiExecutionToolsOptions.d.ts +7 -7
- package/umd/typings/execution/plugins/natural-execution-tools/remote/RemoteNaturalExecutionToolsOptions.d.ts +1 -1
- package/umd/typings/execution/plugins/script-execution-tools/javascript/JavascriptExecutionToolsOptions.d.ts +5 -1
- package/umd/typings/execution/plugins/script-execution-tools/javascript/utils/unknownToString.d.ts +7 -0
- package/umd/typings/execution/plugins/user-interface-execution-tools/callback/CallbackInterfaceToolsOptions.d.ts +3 -3
- package/umd/typings/execution/translation/automatic-translate/automatic-translators/AutomaticTranslator.d.ts +1 -1
- package/umd/typings/library/PromptbookLibrary.d.ts +1 -1
- package/umd/typings/types/ExecutionTypes.d.ts +1 -1
- package/umd/typings/types/ModelRequirements.d.ts +1 -1
- package/umd/typings/types/Prompt.d.ts +5 -0
- package/umd/typings/types/PromptbookJson/PromptTemplateJson.d.ts +6 -5
- package/umd/typings/types/PromptbookJson/PromptTemplateParameterJson.d.ts +1 -1
- package/umd/typings/types/PromptbookJson/PromptbookJson.d.ts +3 -3
- package/umd/typings/types/ScriptLanguage.d.ts +1 -1
- package/umd/typings/types/TaskProgress.d.ts +2 -2
- package/umd/typings/types/execution-report/ExecutionReportStringOptions.d.ts +1 -1
- package/umd/typings/utils/markdown/extractAllBlocksFromMarkdown.d.ts +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { string_name, string_prompt, string_promptbook_url_with_hashtemplate, string_title } from '.././types/typeAliases';
|
|
2
|
+
import type { PostprocessingFunction } from '../execution/plugins/script-execution-tools/javascript/JavascriptExecutionToolsOptions';
|
|
2
3
|
import type { ModelRequirements } from './ModelRequirements';
|
|
3
4
|
import type { Expectations } from './PromptbookJson/PromptTemplateJson';
|
|
4
5
|
/**
|
|
@@ -24,6 +25,10 @@ export type Prompt = {
|
|
|
24
25
|
* Requirements for the model
|
|
25
26
|
*/
|
|
26
27
|
readonly modelRequirements: ModelRequirements;
|
|
28
|
+
/**
|
|
29
|
+
* List of postprocessing steps that are executed after the prompt
|
|
30
|
+
*/
|
|
31
|
+
readonly postprocessing?: Array<PostprocessingFunction>;
|
|
27
32
|
/**
|
|
28
33
|
* Expectations for the answer
|
|
29
34
|
*
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { ExpectFormatCommand } from '../Command';
|
|
2
|
-
import { ExecutionType } from '../ExecutionTypes';
|
|
3
|
-
import { ModelRequirements } from '../ModelRequirements';
|
|
4
|
-
import { ScriptLanguage } from '../ScriptLanguage';
|
|
5
|
-
import { number_integer, number_positive_or_zero, string_javascript, string_javascript_name, string_markdown, string_name, string_prompt, string_template } from '../typeAliases';
|
|
1
|
+
import type { ExpectFormatCommand } from '../Command';
|
|
2
|
+
import type { ExecutionType } from '../ExecutionTypes';
|
|
3
|
+
import type { ModelRequirements } from '../ModelRequirements';
|
|
4
|
+
import type { ScriptLanguage } from '../ScriptLanguage';
|
|
5
|
+
import type { number_integer, number_positive_or_zero, string_javascript, string_javascript_name, string_markdown, string_name, string_prompt, string_template } from '../typeAliases';
|
|
6
6
|
/**
|
|
7
7
|
* Describes one prompt template in the promptbook
|
|
8
8
|
*/
|
|
@@ -121,6 +121,7 @@ interface PromptTemplateJsonCommon {
|
|
|
121
121
|
* Expect this format of the answer
|
|
122
122
|
*
|
|
123
123
|
* Note: Expectations are performed after all postprocessing steps
|
|
124
|
+
* @deprecated [💝]
|
|
124
125
|
*/
|
|
125
126
|
readonly expectFormat?: ExpectFormatCommand['format'];
|
|
126
127
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { string_promptbook_url, string_version } from '../typeAliases';
|
|
2
|
-
import { PromptTemplateJson } from './PromptTemplateJson';
|
|
3
|
-
import { PromptTemplateParameterJson } from './PromptTemplateParameterJson';
|
|
1
|
+
import type { string_promptbook_url, string_version } from '../typeAliases';
|
|
2
|
+
import type { PromptTemplateJson } from './PromptTemplateJson';
|
|
3
|
+
import type { PromptTemplateParameterJson } from './PromptTemplateParameterJson';
|
|
4
4
|
/**
|
|
5
5
|
* Promptbook is the **core concept of this library**.
|
|
6
6
|
* It represents a series of prompt templates chained together to form a pipeline / one big prompt template with input and result parameters.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ExecutionType } from './ExecutionTypes';
|
|
2
|
-
import { string_markdown_text, string_name } from './typeAliases';
|
|
1
|
+
import type { ExecutionType } from './ExecutionTypes';
|
|
2
|
+
import type { string_markdown_text, string_name } from './typeAliases';
|
|
3
3
|
/**
|
|
4
4
|
* TaskProgress represents the progress of a Promptbook execution.
|
|
5
5
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@promptbook/core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.45.0",
|
|
4
4
|
"description": "Library to supercharge your use of large language models",
|
|
5
5
|
"private": false,
|
|
6
6
|
"sideEffects": false,
|
|
@@ -28,14 +28,14 @@
|
|
|
28
28
|
"text-generation",
|
|
29
29
|
"language-model"
|
|
30
30
|
],
|
|
31
|
-
"license": "
|
|
31
|
+
"license": "CC-BY-4.0",
|
|
32
32
|
"bugs": {
|
|
33
33
|
"url": "https://github.com/webgptorg/promptbook/issues"
|
|
34
34
|
},
|
|
35
35
|
"homepage": "https://www.npmjs.com/package/@promptbook/core",
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"lorem-ipsum": "^2.0.8",
|
|
38
|
-
"spacetrim": "0.11.
|
|
38
|
+
"spacetrim": "0.11.20"
|
|
39
39
|
},
|
|
40
40
|
"main": "./umd/index.umd.js",
|
|
41
41
|
"module": "./esm/index.es.js",
|