@promptbook/core 0.23.2 → 0.24.0-1.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/esm/index.es.js +418 -97
- package/esm/index.es.js.map +1 -1
- package/esm/typings/_packages/types.index.d.ts +2 -2
- package/esm/typings/_packages/utils.index.d.ts +11 -1
- package/esm/typings/classes/PromptTemplatePipeline.d.ts +4 -1
- package/esm/typings/classes/PromptTemplatePipelineLibrary.d.ts +8 -2
- package/esm/typings/conversion/parseCommand.d.ts +2 -2
- package/esm/typings/execution/PromptResult.d.ts +1 -1
- package/esm/typings/execution/PtpExecutor.d.ts +24 -4
- package/esm/typings/execution/createPtpExecutor.d.ts +9 -0
- package/esm/typings/types/Command.d.ts +17 -4
- package/esm/typings/types/Prompt.d.ts +8 -2
- package/esm/typings/types/PromptTemplatePipelineJson/PromptTemplateJson.d.ts +21 -2
- package/esm/typings/types/execution-report/ExecutionReportJson.d.ts +56 -0
- package/esm/typings/types/execution-report/ExecutionReportString.d.ts +16 -0
- package/esm/typings/types/execution-report/executionReportJsonToString.d.ts +6 -0
- package/esm/typings/types/typeAliases.d.ts +3 -1
- package/esm/typings/utils/expectation-counters/countCharacters.d.ts +5 -0
- package/esm/typings/utils/expectation-counters/countCharacters.test.d.ts +1 -0
- package/esm/typings/utils/expectation-counters/countLines.d.ts +5 -0
- package/esm/typings/utils/expectation-counters/countLines.test.d.ts +1 -0
- package/esm/typings/utils/expectation-counters/countPages.d.ts +5 -0
- package/esm/typings/utils/expectation-counters/countPages.test.d.ts +1 -0
- package/esm/typings/utils/expectation-counters/countParagraphs.d.ts +5 -0
- package/esm/typings/utils/expectation-counters/countParagraphs.test.d.ts +1 -0
- package/esm/typings/utils/expectation-counters/countSentences.d.ts +5 -0
- package/esm/typings/utils/expectation-counters/countSentences.test.d.ts +1 -0
- package/esm/typings/utils/expectation-counters/countWords.d.ts +5 -0
- package/esm/typings/utils/expectation-counters/countWords.test.d.ts +1 -0
- package/esm/typings/utils/expectation-counters/index.d.ts +5 -0
- package/esm/typings/utils/markdown/prettifyMarkdown.d.ts +8 -0
- package/esm/typings/utils/markdown/prettifyMarkdown.test.d.ts +1 -0
- package/esm/typings/utils/parseNumber.d.ts +10 -0
- package/esm/typings/utils/parseNumber.test.d.ts +1 -0
- package/esm/typings/utils/trimCodeBlock.d.ts +8 -0
- package/esm/typings/utils/trimCodeBlock.test.d.ts +1 -0
- package/esm/typings/utils/trimEndOfCodeBlock.d.ts +2 -1
- package/package.json +1 -1
- package/umd/index.umd.js +417 -96
- package/umd/index.umd.js.map +1 -1
- package/umd/typings/_packages/types.index.d.ts +2 -2
- package/umd/typings/_packages/utils.index.d.ts +11 -1
- package/umd/typings/classes/PromptTemplatePipeline.d.ts +4 -1
- package/umd/typings/classes/PromptTemplatePipelineLibrary.d.ts +8 -2
- package/umd/typings/conversion/parseCommand.d.ts +2 -2
- package/umd/typings/execution/PromptResult.d.ts +1 -1
- package/umd/typings/execution/PtpExecutor.d.ts +24 -4
- package/umd/typings/execution/createPtpExecutor.d.ts +9 -0
- package/umd/typings/types/Command.d.ts +17 -4
- package/umd/typings/types/Prompt.d.ts +8 -2
- package/umd/typings/types/PromptTemplatePipelineJson/PromptTemplateJson.d.ts +21 -2
- package/umd/typings/types/execution-report/ExecutionReportJson.d.ts +56 -0
- package/umd/typings/types/execution-report/ExecutionReportString.d.ts +16 -0
- package/umd/typings/types/execution-report/executionReportJsonToString.d.ts +6 -0
- package/umd/typings/types/typeAliases.d.ts +3 -1
- package/umd/typings/utils/expectation-counters/countCharacters.d.ts +5 -0
- package/umd/typings/utils/expectation-counters/countCharacters.test.d.ts +1 -0
- package/umd/typings/utils/expectation-counters/countLines.d.ts +5 -0
- package/umd/typings/utils/expectation-counters/countLines.test.d.ts +1 -0
- package/umd/typings/utils/expectation-counters/countPages.d.ts +5 -0
- package/umd/typings/utils/expectation-counters/countPages.test.d.ts +1 -0
- package/umd/typings/utils/expectation-counters/countParagraphs.d.ts +5 -0
- package/umd/typings/utils/expectation-counters/countParagraphs.test.d.ts +1 -0
- package/umd/typings/utils/expectation-counters/countSentences.d.ts +5 -0
- package/umd/typings/utils/expectation-counters/countSentences.test.d.ts +1 -0
- package/umd/typings/utils/expectation-counters/countWords.d.ts +5 -0
- package/umd/typings/utils/expectation-counters/countWords.test.d.ts +1 -0
- package/umd/typings/utils/expectation-counters/index.d.ts +5 -0
- package/umd/typings/utils/markdown/prettifyMarkdown.d.ts +8 -0
- package/umd/typings/utils/markdown/prettifyMarkdown.test.d.ts +1 -0
- package/umd/typings/utils/parseNumber.d.ts +10 -0
- package/umd/typings/utils/parseNumber.test.d.ts +1 -0
- package/umd/typings/utils/trimCodeBlock.d.ts +8 -0
- package/umd/typings/utils/trimCodeBlock.test.d.ts +1 -0
- package/umd/typings/utils/trimEndOfCodeBlock.d.ts +2 -1
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ExecutionReportJson } from './ExecutionReportJson';
|
|
2
|
+
import type { ExecutionReportString } from './ExecutionReportString';
|
|
3
|
+
/**
|
|
4
|
+
* Converts execution report from JSON to string format
|
|
5
|
+
*/
|
|
6
|
+
export declare function executionReportJsonToString(executionReportJson: ExecutionReportJson): ExecutionReportString;
|
|
@@ -406,6 +406,8 @@ export type string_ssh_key = string;
|
|
|
406
406
|
export type string_pgp_key = string;
|
|
407
407
|
export type number_positive = number;
|
|
408
408
|
export type number_negative = number;
|
|
409
|
+
export type number_positive_or_zero = number;
|
|
410
|
+
export type number_negative_or_zero = number;
|
|
409
411
|
export type number_integer = number;
|
|
410
412
|
/**
|
|
411
413
|
* Semantic helper;
|
|
@@ -429,7 +431,7 @@ export type number_days = number;
|
|
|
429
431
|
export type number_weeks = number;
|
|
430
432
|
export type number_months = number;
|
|
431
433
|
export type number_years = number;
|
|
432
|
-
export type number_bytes =
|
|
434
|
+
export type number_bytes = number_integer & number_positive;
|
|
433
435
|
export type number_kilobytes = number_positive;
|
|
434
436
|
export type number_megabytes = number_positive;
|
|
435
437
|
export type number_gigabytes = number_positive;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Function parseNumber will parse number from string
|
|
3
|
+
*
|
|
4
|
+
* Unlike Number.parseInt, Number.parseFloat it will never ever result in NaN
|
|
5
|
+
* Note: it also works only with decimal numbers
|
|
6
|
+
*/
|
|
7
|
+
export declare function parseNumber(value: string | number): number;
|
|
8
|
+
/**
|
|
9
|
+
* TODO: Maybe use sth. like safe-eval in fraction/calculation case @see https://www.npmjs.com/package/safe-eval
|
|
10
|
+
*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Function trimCodeBlock will trim starting and ending code block from the string if it is present.
|
|
3
|
+
*
|
|
4
|
+
* Note: This is usefull for post-processing of the result of the chat LLM model
|
|
5
|
+
* when the model wraps the result in the (markdown) code block.
|
|
6
|
+
*
|
|
7
|
+
*/
|
|
8
|
+
export declare function trimCodeBlock(value: string): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Function trimEndOfCodeBlock will remove ending code block from the string if it is present.
|
|
3
3
|
*
|
|
4
|
-
* This is usefull for post-processing of the result of the completion LLM model
|
|
4
|
+
* Note: This is usefull for post-processing of the result of the completion LLM model
|
|
5
|
+
* if you want to start code block in the prompt but you don't want to end it in the result.
|
|
5
6
|
*/
|
|
6
7
|
export declare function trimEndOfCodeBlock(value: string): string;
|