@promptbook/cli 0.45.0 → 0.46.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/README.md +13 -2
- package/esm/index.es.js +1 -1
- package/esm/typings/_packages/core.index.d.ts +0 -3
- package/esm/typings/_packages/langtail.index.d.ts +3 -0
- package/esm/typings/_packages/mock.index.d.ts +6 -0
- package/esm/typings/execution/plugins/natural-execution-tools/langtail/LangtailExecutionToolsOptions.d.ts +11 -0
- package/esm/typings/execution/plugins/natural-execution-tools/mocked/fakeTextToExpectations.d.ts +1 -1
- package/package.json +2 -2
- package/umd/index.umd.js +1 -1
- package/umd/typings/_packages/core.index.d.ts +0 -3
- package/umd/typings/_packages/langtail.index.d.ts +3 -0
- package/umd/typings/_packages/mock.index.d.ts +6 -0
- package/umd/typings/execution/plugins/natural-execution-tools/langtail/LangtailExecutionToolsOptions.d.ts +11 -0
- package/umd/typings/execution/plugins/natural-execution-tools/mocked/fakeTextToExpectations.d.ts +1 -1
package/README.md
CHANGED
|
@@ -316,15 +316,26 @@ _Note: We are using [postprocessing functions](#postprocessing-functions) like `
|
|
|
316
316
|
|
|
317
317
|
## 📦 Packages
|
|
318
318
|
|
|
319
|
-
This library is divided into several packages, all are published from [single monorepo](https://github.com/webgptorg/promptbook)
|
|
319
|
+
This library is divided into several packages, all are published from [single monorepo](https://github.com/webgptorg/promptbook).
|
|
320
|
+
You can install all of them at once:
|
|
321
|
+
|
|
322
|
+
```bash
|
|
323
|
+
npm i ptbk
|
|
324
|
+
```
|
|
325
|
+
|
|
326
|
+
Or you can install them separately:
|
|
320
327
|
|
|
321
328
|
<!--[🔠]-->
|
|
322
329
|
|
|
330
|
+
<!-- Add all new -->
|
|
331
|
+
|
|
323
332
|
- **[@promptbook/core](https://www.npmjs.com/package/@promptbook/core)** - Core of the library, it contains the main logic for promptbooks
|
|
324
|
-
-
|
|
333
|
+
- ⭐ **[@promptbook/utils](https://www.npmjs.com/package/@promptbook/utils)** - Utility functions used in the library but also useful for individual use in preprocessing and postprocessing LLM inputs and outputs
|
|
325
334
|
- _(Not finished)_ **[@promptbook/wizzard](https://www.npmjs.com/package/@promptbook/wizzard)** - Wizard for creating+running promptbooks in single line
|
|
326
335
|
- **[@promptbook/execute-javascript](https://www.npmjs.com/package/@promptbook/execute-javascript)** - Execution tools for javascript inside promptbooks
|
|
327
336
|
- **[@promptbook/openai](https://www.npmjs.com/package/@promptbook/openai)** - Execution tools for OpenAI API, wrapper around OpenAI SDK
|
|
337
|
+
- **[@promptbook/langtail](https://www.npmjs.com/package/@promptbook/langtail)** - Execution tools for Langtail API, wrapper around Langtail SDK
|
|
338
|
+
- **[@promptbook/mock](https://www.npmjs.com/package/@promptbook/mock)** - Mocked execution tools for testing the library and saving the tokens
|
|
328
339
|
- **[@promptbook/remote-client](https://www.npmjs.com/package/@promptbook/remote-client)** - Remote client for remote execution of promptbooks
|
|
329
340
|
- **[@promptbook/remote-server](https://www.npmjs.com/package/@promptbook/remote-server)** - Remote server for remote execution of promptbooks
|
|
330
341
|
- **[@promptbook/types](https://www.npmjs.com/package/@promptbook/types)** - Just typescript types used in the library
|
package/esm/index.es.js
CHANGED
|
@@ -143,7 +143,7 @@ new Function("\n try {\n if (typeof WorkerGlobalScope !== 'undefined'
|
|
|
143
143
|
/**
|
|
144
144
|
* The version of the Promptbook library
|
|
145
145
|
*/
|
|
146
|
-
var PROMPTBOOK_VERSION = '0.
|
|
146
|
+
var PROMPTBOOK_VERSION = '0.45.0';
|
|
147
147
|
|
|
148
148
|
/**
|
|
149
149
|
* This error indicates that the promptbook in a markdown format cannot be parsed into a valid promptbook object
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { promptbookStringToJson } from '../conversion/promptbookStringToJson';
|
|
2
2
|
import { validatePromptbookJson } from '../conversion/validation/validatePromptbookJson';
|
|
3
3
|
import { createPromptbookExecutor } from '../execution/createPromptbookExecutor';
|
|
4
|
-
import { MockedEchoNaturalExecutionTools } from '../execution/plugins/natural-execution-tools/mocked/MockedEchoNaturalExecutionTools';
|
|
5
|
-
import { MockedFackedNaturalExecutionTools } from '../execution/plugins/natural-execution-tools/mocked/MockedFackedNaturalExecutionTools';
|
|
6
4
|
import { CallbackInterfaceTools } from '../execution/plugins/user-interface-execution-tools/callback/CallbackInterfaceTools';
|
|
7
5
|
import { CallbackInterfaceToolsOptions } from '../execution/plugins/user-interface-execution-tools/callback/CallbackInterfaceToolsOptions';
|
|
8
6
|
import { SimplePromptInterfaceTools } from '../execution/plugins/user-interface-execution-tools/simple-prompt/SimplePromptInterfaceTools';
|
|
@@ -16,6 +14,5 @@ export { ExecutionTypes, PROMPTBOOK_VERSION };
|
|
|
16
14
|
export { createPromptbookLibraryFromPromise, createPromptbookLibraryFromSources, createPromptbookSublibrary, SimplePromptbookLibrary, };
|
|
17
15
|
export { SimplePromptInterfaceTools };
|
|
18
16
|
export { promptbookStringToJson, validatePromptbookJson };
|
|
19
|
-
export { MockedEchoNaturalExecutionTools, MockedFackedNaturalExecutionTools };
|
|
20
17
|
export { createPromptbookExecutor };
|
|
21
18
|
export { CallbackInterfaceTools, CallbackInterfaceToolsOptions };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { LangtailExecutionTools } from '../execution/plugins/natural-execution-tools/langtail/LangtailExecutionTools';
|
|
2
|
+
import { LangtailExecutionToolsOptions } from '../execution/plugins/natural-execution-tools/langtail/LangtailExecutionToolsOptions';
|
|
3
|
+
export { LangtailExecutionTools, LangtailExecutionToolsOptions };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { MockedEchoNaturalExecutionTools } from '../execution/plugins/natural-execution-tools/mocked/MockedEchoNaturalExecutionTools';
|
|
2
|
+
import { MockedFackedNaturalExecutionTools } from '../execution/plugins/natural-execution-tools/mocked/MockedFackedNaturalExecutionTools';
|
|
3
|
+
export { MockedEchoNaturalExecutionTools, MockedFackedNaturalExecutionTools };
|
|
4
|
+
/**
|
|
5
|
+
* TODO: [🚏] FakeLLM
|
|
6
|
+
*/
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { OpenAiExecutionToolsOptions } from '../openai/OpenAiExecutionToolsOptions';
|
|
2
|
+
/**
|
|
3
|
+
* Options for LangtailExecutionTools
|
|
4
|
+
*
|
|
5
|
+
* This extends OpenAI's `ClientOptions` with are directly passed to the OpenAI client.
|
|
6
|
+
* Rest is used by the `OpenAiExecutionTools`.
|
|
7
|
+
*/
|
|
8
|
+
export type LangtailExecutionToolsOptions = OpenAiExecutionToolsOptions;
|
|
9
|
+
/**
|
|
10
|
+
* TODO: !!! Use or remove
|
|
11
|
+
*/
|
package/esm/typings/execution/plugins/natural-execution-tools/mocked/fakeTextToExpectations.d.ts
CHANGED
|
@@ -10,6 +10,6 @@ import { PostprocessingFunction } from '../../script-execution-tools/javascript/
|
|
|
10
10
|
*/
|
|
11
11
|
export declare function $fakeTextToExpectations(expectations: Expectations, postprocessing?: Array<PostprocessingFunction>): Promise<string>;
|
|
12
12
|
/**
|
|
13
|
-
* TODO: Implement better - create FakeLLM from this
|
|
13
|
+
* TODO: [🚏] Implement better - create FakeLLM from this
|
|
14
14
|
* TODO: [💝] Unite object for expecting amount and format - use here also a format
|
|
15
15
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@promptbook/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.46.0-0",
|
|
4
4
|
"description": "Library to supercharge your use of large language models",
|
|
5
5
|
"private": false,
|
|
6
6
|
"sideEffects": false,
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"waitasecond": "1.11.33"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
|
-
"@promptbook/core": "0.
|
|
45
|
+
"@promptbook/core": "0.46.0-0"
|
|
46
46
|
},
|
|
47
47
|
"main": "./umd/index.umd.js",
|
|
48
48
|
"module": "./esm/index.es.js",
|
package/umd/index.umd.js
CHANGED
|
@@ -146,7 +146,7 @@
|
|
|
146
146
|
/**
|
|
147
147
|
* The version of the Promptbook library
|
|
148
148
|
*/
|
|
149
|
-
var PROMPTBOOK_VERSION = '0.
|
|
149
|
+
var PROMPTBOOK_VERSION = '0.45.0';
|
|
150
150
|
|
|
151
151
|
/**
|
|
152
152
|
* This error indicates that the promptbook in a markdown format cannot be parsed into a valid promptbook object
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { promptbookStringToJson } from '../conversion/promptbookStringToJson';
|
|
2
2
|
import { validatePromptbookJson } from '../conversion/validation/validatePromptbookJson';
|
|
3
3
|
import { createPromptbookExecutor } from '../execution/createPromptbookExecutor';
|
|
4
|
-
import { MockedEchoNaturalExecutionTools } from '../execution/plugins/natural-execution-tools/mocked/MockedEchoNaturalExecutionTools';
|
|
5
|
-
import { MockedFackedNaturalExecutionTools } from '../execution/plugins/natural-execution-tools/mocked/MockedFackedNaturalExecutionTools';
|
|
6
4
|
import { CallbackInterfaceTools } from '../execution/plugins/user-interface-execution-tools/callback/CallbackInterfaceTools';
|
|
7
5
|
import { CallbackInterfaceToolsOptions } from '../execution/plugins/user-interface-execution-tools/callback/CallbackInterfaceToolsOptions';
|
|
8
6
|
import { SimplePromptInterfaceTools } from '../execution/plugins/user-interface-execution-tools/simple-prompt/SimplePromptInterfaceTools';
|
|
@@ -16,6 +14,5 @@ export { ExecutionTypes, PROMPTBOOK_VERSION };
|
|
|
16
14
|
export { createPromptbookLibraryFromPromise, createPromptbookLibraryFromSources, createPromptbookSublibrary, SimplePromptbookLibrary, };
|
|
17
15
|
export { SimplePromptInterfaceTools };
|
|
18
16
|
export { promptbookStringToJson, validatePromptbookJson };
|
|
19
|
-
export { MockedEchoNaturalExecutionTools, MockedFackedNaturalExecutionTools };
|
|
20
17
|
export { createPromptbookExecutor };
|
|
21
18
|
export { CallbackInterfaceTools, CallbackInterfaceToolsOptions };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { LangtailExecutionTools } from '../execution/plugins/natural-execution-tools/langtail/LangtailExecutionTools';
|
|
2
|
+
import { LangtailExecutionToolsOptions } from '../execution/plugins/natural-execution-tools/langtail/LangtailExecutionToolsOptions';
|
|
3
|
+
export { LangtailExecutionTools, LangtailExecutionToolsOptions };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { MockedEchoNaturalExecutionTools } from '../execution/plugins/natural-execution-tools/mocked/MockedEchoNaturalExecutionTools';
|
|
2
|
+
import { MockedFackedNaturalExecutionTools } from '../execution/plugins/natural-execution-tools/mocked/MockedFackedNaturalExecutionTools';
|
|
3
|
+
export { MockedEchoNaturalExecutionTools, MockedFackedNaturalExecutionTools };
|
|
4
|
+
/**
|
|
5
|
+
* TODO: [🚏] FakeLLM
|
|
6
|
+
*/
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { OpenAiExecutionToolsOptions } from '../openai/OpenAiExecutionToolsOptions';
|
|
2
|
+
/**
|
|
3
|
+
* Options for LangtailExecutionTools
|
|
4
|
+
*
|
|
5
|
+
* This extends OpenAI's `ClientOptions` with are directly passed to the OpenAI client.
|
|
6
|
+
* Rest is used by the `OpenAiExecutionTools`.
|
|
7
|
+
*/
|
|
8
|
+
export type LangtailExecutionToolsOptions = OpenAiExecutionToolsOptions;
|
|
9
|
+
/**
|
|
10
|
+
* TODO: !!! Use or remove
|
|
11
|
+
*/
|
package/umd/typings/execution/plugins/natural-execution-tools/mocked/fakeTextToExpectations.d.ts
CHANGED
|
@@ -10,6 +10,6 @@ import { PostprocessingFunction } from '../../script-execution-tools/javascript/
|
|
|
10
10
|
*/
|
|
11
11
|
export declare function $fakeTextToExpectations(expectations: Expectations, postprocessing?: Array<PostprocessingFunction>): Promise<string>;
|
|
12
12
|
/**
|
|
13
|
-
* TODO: Implement better - create FakeLLM from this
|
|
13
|
+
* TODO: [🚏] Implement better - create FakeLLM from this
|
|
14
14
|
* TODO: [💝] Unite object for expecting amount and format - use here also a format
|
|
15
15
|
*/
|