@promptbook/remote-server 0.56.0 → 0.57.0-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 +1 -1
- package/esm/typings/execution/plugins/llm-execution-tools/openai/OpenAiExecutionTools.d.ts +1 -1
- package/esm/typings/types/Prompt.d.ts +11 -3
- package/package.json +2 -2
- package/umd/index.umd.js +1 -1
- package/umd/typings/execution/plugins/llm-execution-tools/openai/OpenAiExecutionTools.d.ts +1 -1
- package/umd/typings/types/Prompt.d.ts +11 -3
package/esm/index.es.js
CHANGED
|
@@ -89,7 +89,7 @@ var PromptbookExecutionError = /** @class */ (function (_super) {
|
|
|
89
89
|
/**
|
|
90
90
|
* The version of the Promptbook library
|
|
91
91
|
*/
|
|
92
|
-
var PROMPTBOOK_VERSION = '0.56.0
|
|
92
|
+
var PROMPTBOOK_VERSION = '0.56.0';
|
|
93
93
|
|
|
94
94
|
/**
|
|
95
95
|
* Remote server is a proxy server that uses its execution tools internally and exposes the executor interface externally.
|
|
@@ -22,7 +22,7 @@ export declare class OpenAiExecutionTools implements LlmExecutionTools {
|
|
|
22
22
|
/**
|
|
23
23
|
* Calls OpenAI API to use a chat model.
|
|
24
24
|
*/
|
|
25
|
-
gptChat(prompt: Pick<Prompt, 'content' | 'modelRequirements'>): Promise<PromptChatResult>;
|
|
25
|
+
gptChat(prompt: Pick<Prompt, 'content' | 'modelRequirements' | 'expectFormat'>): Promise<PromptChatResult>;
|
|
26
26
|
/**
|
|
27
27
|
* Calls OpenAI API to use a complete model.
|
|
28
28
|
*/
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import type { PostprocessingFunction } from '../execution/plugins/script-execution-tools/javascript/JavascriptExecutionToolsOptions';
|
|
2
|
+
import type { ExpectFormatCommand } from './Command';
|
|
3
|
+
import type { ModelRequirements } from './ModelRequirements';
|
|
4
|
+
import type { Expectations } from './PromptbookJson/PromptTemplateJson';
|
|
1
5
|
import type { string_name } from './typeAliases';
|
|
2
6
|
import type { string_prompt } from './typeAliases';
|
|
3
7
|
import type { string_promptbook_url_with_hashtemplate } from './typeAliases';
|
|
4
8
|
import type { string_title } from './typeAliases';
|
|
5
|
-
import type { PostprocessingFunction } from '../execution/plugins/script-execution-tools/javascript/JavascriptExecutionToolsOptions';
|
|
6
|
-
import type { ModelRequirements } from './ModelRequirements';
|
|
7
|
-
import type { Expectations } from './PromptbookJson/PromptTemplateJson';
|
|
8
9
|
/**
|
|
9
10
|
* Prompt in a text along with model requirements, but without any execution or templating logic.
|
|
10
11
|
*
|
|
@@ -39,6 +40,13 @@ export type Prompt = {
|
|
|
39
40
|
* If not set, nothing is expected from the answer
|
|
40
41
|
*/
|
|
41
42
|
readonly expectations?: Expectations;
|
|
43
|
+
/**
|
|
44
|
+
* Expect this format of the answer
|
|
45
|
+
*
|
|
46
|
+
* Note: Expectations are performed after all postprocessing steps
|
|
47
|
+
* @deprecated [💝]
|
|
48
|
+
*/
|
|
49
|
+
readonly expectFormat?: ExpectFormatCommand['format'];
|
|
42
50
|
/**
|
|
43
51
|
* Unique identifier of the promptbook with specific template name as hash
|
|
44
52
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@promptbook/remote-server",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.57.0-0",
|
|
4
4
|
"description": "Library to supercharge your use of large language models",
|
|
5
5
|
"private": false,
|
|
6
6
|
"sideEffects": false,
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
}
|
|
50
50
|
],
|
|
51
51
|
"peerDependencies": {
|
|
52
|
-
"@promptbook/core": "0.
|
|
52
|
+
"@promptbook/core": "0.57.0-0"
|
|
53
53
|
},
|
|
54
54
|
"main": "./umd/index.umd.js",
|
|
55
55
|
"module": "./esm/index.es.js",
|
package/umd/index.umd.js
CHANGED
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
/**
|
|
96
96
|
* The version of the Promptbook library
|
|
97
97
|
*/
|
|
98
|
-
var PROMPTBOOK_VERSION = '0.56.0
|
|
98
|
+
var PROMPTBOOK_VERSION = '0.56.0';
|
|
99
99
|
|
|
100
100
|
/**
|
|
101
101
|
* Remote server is a proxy server that uses its execution tools internally and exposes the executor interface externally.
|
|
@@ -22,7 +22,7 @@ export declare class OpenAiExecutionTools implements LlmExecutionTools {
|
|
|
22
22
|
/**
|
|
23
23
|
* Calls OpenAI API to use a chat model.
|
|
24
24
|
*/
|
|
25
|
-
gptChat(prompt: Pick<Prompt, 'content' | 'modelRequirements'>): Promise<PromptChatResult>;
|
|
25
|
+
gptChat(prompt: Pick<Prompt, 'content' | 'modelRequirements' | 'expectFormat'>): Promise<PromptChatResult>;
|
|
26
26
|
/**
|
|
27
27
|
* Calls OpenAI API to use a complete model.
|
|
28
28
|
*/
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import type { PostprocessingFunction } from '../execution/plugins/script-execution-tools/javascript/JavascriptExecutionToolsOptions';
|
|
2
|
+
import type { ExpectFormatCommand } from './Command';
|
|
3
|
+
import type { ModelRequirements } from './ModelRequirements';
|
|
4
|
+
import type { Expectations } from './PromptbookJson/PromptTemplateJson';
|
|
1
5
|
import type { string_name } from './typeAliases';
|
|
2
6
|
import type { string_prompt } from './typeAliases';
|
|
3
7
|
import type { string_promptbook_url_with_hashtemplate } from './typeAliases';
|
|
4
8
|
import type { string_title } from './typeAliases';
|
|
5
|
-
import type { PostprocessingFunction } from '../execution/plugins/script-execution-tools/javascript/JavascriptExecutionToolsOptions';
|
|
6
|
-
import type { ModelRequirements } from './ModelRequirements';
|
|
7
|
-
import type { Expectations } from './PromptbookJson/PromptTemplateJson';
|
|
8
9
|
/**
|
|
9
10
|
* Prompt in a text along with model requirements, but without any execution or templating logic.
|
|
10
11
|
*
|
|
@@ -39,6 +40,13 @@ export type Prompt = {
|
|
|
39
40
|
* If not set, nothing is expected from the answer
|
|
40
41
|
*/
|
|
41
42
|
readonly expectations?: Expectations;
|
|
43
|
+
/**
|
|
44
|
+
* Expect this format of the answer
|
|
45
|
+
*
|
|
46
|
+
* Note: Expectations are performed after all postprocessing steps
|
|
47
|
+
* @deprecated [💝]
|
|
48
|
+
*/
|
|
49
|
+
readonly expectFormat?: ExpectFormatCommand['format'];
|
|
42
50
|
/**
|
|
43
51
|
* Unique identifier of the promptbook with specific template name as hash
|
|
44
52
|
*
|