@promptbook/types 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 +15 -2
- 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/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
|
@@ -32,6 +32,8 @@ import { promptbookStringToJson } from '@promptbook/core';
|
|
|
32
32
|
const promptbook: PromptbookJson = promptbookStringToJson(...);
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
+
_Note: `@promptbook/types` does not export brand-specific types like `OpenAiExecutionToolsOptions`, `ClaudeExecutionToolsOptions`, `LangchainExecutionToolsOptions`,... etc._
|
|
36
|
+
|
|
35
37
|
|
|
36
38
|
---
|
|
37
39
|
|
|
@@ -313,15 +315,26 @@ _Note: We are using [postprocessing functions](#postprocessing-functions) like `
|
|
|
313
315
|
|
|
314
316
|
## 📦 Packages
|
|
315
317
|
|
|
316
|
-
This library is divided into several packages, all are published from [single monorepo](https://github.com/webgptorg/promptbook)
|
|
318
|
+
This library is divided into several packages, all are published from [single monorepo](https://github.com/webgptorg/promptbook).
|
|
319
|
+
You can install all of them at once:
|
|
320
|
+
|
|
321
|
+
```bash
|
|
322
|
+
npm i ptbk
|
|
323
|
+
```
|
|
324
|
+
|
|
325
|
+
Or you can install them separately:
|
|
317
326
|
|
|
318
327
|
<!--[🔠]-->
|
|
319
328
|
|
|
329
|
+
<!-- Add all new -->
|
|
330
|
+
|
|
320
331
|
- **[@promptbook/core](https://www.npmjs.com/package/@promptbook/core)** - Core of the library, it contains the main logic for promptbooks
|
|
321
|
-
-
|
|
332
|
+
- ⭐ **[@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
|
|
322
333
|
- _(Not finished)_ **[@promptbook/wizzard](https://www.npmjs.com/package/@promptbook/wizzard)** - Wizard for creating+running promptbooks in single line
|
|
323
334
|
- **[@promptbook/execute-javascript](https://www.npmjs.com/package/@promptbook/execute-javascript)** - Execution tools for javascript inside promptbooks
|
|
324
335
|
- **[@promptbook/openai](https://www.npmjs.com/package/@promptbook/openai)** - Execution tools for OpenAI API, wrapper around OpenAI SDK
|
|
336
|
+
- **[@promptbook/langtail](https://www.npmjs.com/package/@promptbook/langtail)** - Execution tools for Langtail API, wrapper around Langtail SDK
|
|
337
|
+
- **[@promptbook/mock](https://www.npmjs.com/package/@promptbook/mock)** - Mocked execution tools for testing the library and saving the tokens
|
|
325
338
|
- **[@promptbook/remote-client](https://www.npmjs.com/package/@promptbook/remote-client)** - Remote client for remote execution of promptbooks
|
|
326
339
|
- **[@promptbook/remote-server](https://www.npmjs.com/package/@promptbook/remote-server)** - Remote server for remote execution of promptbooks
|
|
327
340
|
- **[@promptbook/types](https://www.npmjs.com/package/@promptbook/types)** - Just typescript types used in the library
|
|
@@ -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/types",
|
|
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,
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"homepage": "https://www.npmjs.com/package/@promptbook/core",
|
|
36
36
|
"dependencies": {},
|
|
37
37
|
"peerDependencies": {
|
|
38
|
-
"@promptbook/core": "0.
|
|
38
|
+
"@promptbook/core": "0.46.0-0"
|
|
39
39
|
},
|
|
40
40
|
"main": "./umd/index.umd.js",
|
|
41
41
|
"module": "./esm/index.es.js",
|
|
@@ -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
|
*/
|