@promptbook/openai 0.35.1 → 0.36.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/esm/index.es.js +1 -1
- package/esm/typings/_packages/core.index.d.ts +8 -8
- package/esm/typings/_packages/remote-server.index.d.ts +2 -2
- package/esm/typings/_packages/types.index.d.ts +8 -8
- package/esm/typings/classes/PromptbookLibrary.d.ts +61 -0
- package/esm/typings/conversion/_importPromptbook.d.ts +12 -0
- package/esm/typings/conversion/promptbookStringToJson.d.ts +13 -0
- package/esm/typings/conversion/validatePromptbookJson.d.ts +26 -0
- package/{umd/typings/execution/PtpExecutor.d.ts → esm/typings/execution/PromptbookExecutor.d.ts} +5 -5
- package/esm/typings/execution/assertsExecutionSuccessful.d.ts +2 -2
- package/esm/typings/execution/createPromptbookExecutor.d.ts +40 -0
- package/esm/typings/execution/plugins/natural-execution-tools/mocked/joker.test.d.ts +1 -1
- package/esm/typings/execution/plugins/natural-execution-tools/mocked/mocked-chat.test.d.ts +1 -1
- package/esm/typings/execution/plugins/natural-execution-tools/mocked/mocked-completion.test.d.ts +1 -1
- package/esm/typings/execution/plugins/natural-execution-tools/remote/RemoteNaturalExecutionToolsOptions.d.ts +1 -1
- package/esm/typings/execution/plugins/natural-execution-tools/remote/interfaces/{Ptps_Error.d.ts → Promptbook_Server_Error.d.ts} +1 -1
- package/esm/typings/execution/plugins/natural-execution-tools/remote/interfaces/{Ptps_Progress.d.ts → Promptbook_Server_Progress.d.ts} +1 -1
- package/esm/typings/execution/plugins/natural-execution-tools/remote/interfaces/{Ptps_Request.d.ts → Promptbook_Server_Request.d.ts} +2 -2
- package/esm/typings/execution/plugins/natural-execution-tools/remote/interfaces/{Ptps_Response.d.ts → Promptbook_Server_Response.d.ts} +2 -2
- package/esm/typings/execution/plugins/natural-execution-tools/remote/interfaces/RemoteServerOptions.d.ts +3 -3
- package/{umd/typings/execution/plugins/natural-execution-tools/remote/runRemoteServer.d.ts → esm/typings/execution/plugins/natural-execution-tools/remote/startRemoteServer.d.ts} +2 -2
- package/esm/typings/types/Command.d.ts +12 -12
- package/esm/typings/types/Parameters.d.ts +3 -3
- package/esm/typings/types/Prompt.d.ts +5 -5
- package/{umd/typings/types/PromptTemplatePipelineJson → esm/typings/types/PromptbookJson}/PromptTemplateJson.d.ts +4 -4
- package/esm/typings/types/{PromptTemplatePipelineJson → PromptbookJson}/PromptTemplateParameterJson.d.ts +2 -2
- package/{umd/typings/types/PromptTemplatePipelineJson/PromptTemplatePipelineJson.d.ts → esm/typings/types/PromptbookJson/PromptbookJson.d.ts} +11 -15
- package/esm/typings/types/PromptbookString.d.ts +12 -0
- package/esm/typings/types/TaskProgress.d.ts +1 -1
- package/esm/typings/types/execution-report/ExecutionReportJson.d.ts +10 -10
- package/esm/typings/types/typeAliases.d.ts +4 -4
- package/esm/typings/utils/expectation-counters/countCharacters.d.ts +1 -1
- package/esm/typings/utils/expectation-counters/countLines.d.ts +1 -1
- package/esm/typings/utils/expectation-counters/countPages.d.ts +1 -1
- package/esm/typings/utils/expectation-counters/countParagraphs.d.ts +1 -1
- package/esm/typings/utils/expectation-counters/countSentences.d.ts +1 -1
- package/esm/typings/utils/expectation-counters/countWords.d.ts +1 -1
- package/esm/typings/utils/expectation-counters/index.d.ts +1 -1
- package/esm/typings/utils/isRunningInWhatever.d.ts +12 -0
- package/esm/typings/version.d.ts +1 -1
- package/package.json +2 -2
- package/umd/index.umd.js +1 -1
- package/umd/typings/_packages/core.index.d.ts +8 -8
- package/umd/typings/_packages/remote-server.index.d.ts +2 -2
- package/umd/typings/_packages/types.index.d.ts +8 -8
- package/umd/typings/classes/PromptbookLibrary.d.ts +61 -0
- package/umd/typings/conversion/_importPromptbook.d.ts +12 -0
- package/umd/typings/conversion/promptbookStringToJson.d.ts +13 -0
- package/umd/typings/conversion/validatePromptbookJson.d.ts +26 -0
- package/{esm/typings/execution/PtpExecutor.d.ts → umd/typings/execution/PromptbookExecutor.d.ts} +5 -5
- package/umd/typings/execution/assertsExecutionSuccessful.d.ts +2 -2
- package/umd/typings/execution/createPromptbookExecutor.d.ts +40 -0
- package/umd/typings/execution/plugins/natural-execution-tools/mocked/joker.test.d.ts +1 -1
- package/umd/typings/execution/plugins/natural-execution-tools/mocked/mocked-chat.test.d.ts +1 -1
- package/umd/typings/execution/plugins/natural-execution-tools/mocked/mocked-completion.test.d.ts +1 -1
- package/umd/typings/execution/plugins/natural-execution-tools/remote/RemoteNaturalExecutionToolsOptions.d.ts +1 -1
- package/umd/typings/execution/plugins/natural-execution-tools/remote/interfaces/{Ptps_Error.d.ts → Promptbook_Server_Error.d.ts} +1 -1
- package/umd/typings/execution/plugins/natural-execution-tools/remote/interfaces/{Ptps_Progress.d.ts → Promptbook_Server_Progress.d.ts} +1 -1
- package/umd/typings/execution/plugins/natural-execution-tools/remote/interfaces/{Ptps_Request.d.ts → Promptbook_Server_Request.d.ts} +2 -2
- package/umd/typings/execution/plugins/natural-execution-tools/remote/interfaces/{Ptps_Response.d.ts → Promptbook_Server_Response.d.ts} +2 -2
- package/umd/typings/execution/plugins/natural-execution-tools/remote/interfaces/RemoteServerOptions.d.ts +3 -3
- package/{esm/typings/execution/plugins/natural-execution-tools/remote/runRemoteServer.d.ts → umd/typings/execution/plugins/natural-execution-tools/remote/startRemoteServer.d.ts} +2 -2
- package/umd/typings/types/Command.d.ts +12 -12
- package/umd/typings/types/Parameters.d.ts +3 -3
- package/umd/typings/types/Prompt.d.ts +5 -5
- package/{esm/typings/types/PromptTemplatePipelineJson → umd/typings/types/PromptbookJson}/PromptTemplateJson.d.ts +4 -4
- package/umd/typings/types/{PromptTemplatePipelineJson → PromptbookJson}/PromptTemplateParameterJson.d.ts +2 -2
- package/{esm/typings/types/PromptTemplatePipelineJson/PromptTemplatePipelineJson.d.ts → umd/typings/types/PromptbookJson/PromptbookJson.d.ts} +11 -15
- package/umd/typings/types/PromptbookString.d.ts +12 -0
- package/umd/typings/types/TaskProgress.d.ts +1 -1
- package/umd/typings/types/execution-report/ExecutionReportJson.d.ts +10 -10
- package/umd/typings/types/typeAliases.d.ts +4 -4
- package/umd/typings/utils/expectation-counters/countCharacters.d.ts +1 -1
- package/umd/typings/utils/expectation-counters/countLines.d.ts +1 -1
- package/umd/typings/utils/expectation-counters/countPages.d.ts +1 -1
- package/umd/typings/utils/expectation-counters/countParagraphs.d.ts +1 -1
- package/umd/typings/utils/expectation-counters/countSentences.d.ts +1 -1
- package/umd/typings/utils/expectation-counters/countWords.d.ts +1 -1
- package/umd/typings/utils/expectation-counters/index.d.ts +1 -1
- package/umd/typings/utils/isRunningInWhatever.d.ts +12 -0
- package/umd/typings/version.d.ts +1 -1
- package/esm/typings/classes/PromptTemplatePipelineLibrary.d.ts +0 -71
- package/esm/typings/config.d.ts +0 -12
- package/esm/typings/conversion/_importPtp.d.ts +0 -12
- package/esm/typings/conversion/promptTemplatePipelineStringToJson.d.ts +0 -13
- package/esm/typings/conversion/validatePromptTemplatePipelineJson.d.ts +0 -26
- package/esm/typings/execution/createPtpExecutor.d.ts +0 -40
- package/esm/typings/types/PromptTemplatePipelineString.d.ts +0 -16
- package/umd/typings/classes/PromptTemplatePipelineLibrary.d.ts +0 -71
- package/umd/typings/config.d.ts +0 -12
- package/umd/typings/conversion/_importPtp.d.ts +0 -12
- package/umd/typings/conversion/promptTemplatePipelineStringToJson.d.ts +0 -13
- package/umd/typings/conversion/validatePromptTemplatePipelineJson.d.ts +0 -26
- package/umd/typings/execution/createPtpExecutor.d.ts +0 -40
- package/umd/typings/types/PromptTemplatePipelineString.d.ts +0 -16
- /package/esm/typings/conversion/{promptTemplatePipelineStringToJson-syntaxErrors.test.d.ts → promptbookStringToJson-syntaxErrors.test.d.ts} +0 -0
- /package/esm/typings/conversion/{promptTemplatePipelineStringToJson.test.d.ts → promptbookStringToJson.test.d.ts} +0 -0
- /package/esm/typings/conversion/{validatePromptTemplatePipelineJson-logicErrors.test.d.ts → validatePromptbookJson-logicErrors.test.d.ts} +0 -0
- /package/esm/typings/conversion/{validatePromptTemplatePipelineJson.test.d.ts → validatePromptbookJson.test.d.ts} +0 -0
- /package/umd/typings/conversion/{promptTemplatePipelineStringToJson-syntaxErrors.test.d.ts → promptbookStringToJson-syntaxErrors.test.d.ts} +0 -0
- /package/umd/typings/conversion/{promptTemplatePipelineStringToJson.test.d.ts → promptbookStringToJson.test.d.ts} +0 -0
- /package/umd/typings/conversion/{validatePromptTemplatePipelineJson-logicErrors.test.d.ts → validatePromptbookJson-logicErrors.test.d.ts} +0 -0
- /package/umd/typings/conversion/{validatePromptTemplatePipelineJson.test.d.ts → validatePromptbookJson.test.d.ts} +0 -0
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { PromptTemplatePipelineJson } from '../_packages/types.index';
|
|
2
|
-
import { ExecutionTools } from './ExecutionTools';
|
|
3
|
-
import { PtpExecutor } from './PtpExecutor';
|
|
4
|
-
export interface CreatePtpExecutorSettings {
|
|
5
|
-
/**
|
|
6
|
-
* When executor does not satisfy expectations it will be retried this amount of times
|
|
7
|
-
*
|
|
8
|
-
* @default 3
|
|
9
|
-
*/
|
|
10
|
-
readonly maxExecutionAttempts: number;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Options for creating a PTP (Prompt Template Pipeline) executor
|
|
14
|
-
*/
|
|
15
|
-
interface CreatePtpExecutorOptions {
|
|
16
|
-
/**
|
|
17
|
-
* The Prompt Template Pipeline (PTP) to be executed
|
|
18
|
-
*/
|
|
19
|
-
readonly ptp: PromptTemplatePipelineJson;
|
|
20
|
-
/**
|
|
21
|
-
* The execution tools to be used during the execution of the PTP
|
|
22
|
-
*/
|
|
23
|
-
readonly tools: ExecutionTools;
|
|
24
|
-
/**
|
|
25
|
-
* Optional settings for the PTP executor
|
|
26
|
-
*/
|
|
27
|
-
readonly settings?: Partial<CreatePtpExecutorSettings>;
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* Creates executor function from prompt template pipeline and execution tools.
|
|
31
|
-
*
|
|
32
|
-
* Note: Consider using getExecutor method of the library instead of using this function
|
|
33
|
-
*/
|
|
34
|
-
export declare function createPtpExecutor(options: CreatePtpExecutorOptions): PtpExecutor;
|
|
35
|
-
export {};
|
|
36
|
-
/**
|
|
37
|
-
* TODO: [🧠] When not meet expectations in PROMPT_DIALOG, make some way to tell the user
|
|
38
|
-
* TODO: [👧] Strongly type the executors to avoid need of remove nullables whtn noUncheckedIndexedAccess in tsconfig.json
|
|
39
|
-
* Note: CreatePtpExecutorOptions are just connected to PtpExecutor so do not extract to types folder
|
|
40
|
-
*/
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Prompt template pipeline is the **core concept of this library**.
|
|
3
|
-
* It represents a series of prompt templates chained together to form a pipeline / one big prompt template with input and result parameters.
|
|
4
|
-
*
|
|
5
|
-
* It can have 3 formats:
|
|
6
|
-
* - _(this)_ **.ptbk.md file** in custom markdown format described above
|
|
7
|
-
* - **JSON** format, parsed from the .ptbk.md file
|
|
8
|
-
*
|
|
9
|
-
* @see https://github.com/webgptorg/promptbook#prompt-template-pipeline
|
|
10
|
-
*/
|
|
11
|
-
export type PromptTemplatePipelineString = string & {
|
|
12
|
-
readonly _type: 'PromptTemplatePipeline';
|
|
13
|
-
};
|
|
14
|
-
/**
|
|
15
|
-
* TODO: !! Better validation (validatePromptTemplatePipelineString) or remove branded type and make it just string
|
|
16
|
-
*/
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|