@promptbook/openai 0.36.2 → 0.36.3

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.
@@ -5,6 +5,19 @@ import { PromptbookExecutor } from '../execution/PromptbookExecutor';
5
5
  import { Prompt } from '../types/Prompt';
6
6
  import { PromptbookJson } from '../types/PromptbookJson/PromptbookJson';
7
7
  import { PromptbookString } from '../types/PromptbookString';
8
+ /**
9
+ * Options for PromptbookLibrary
10
+ */
11
+ type PromptbookLibraryOptions = {
12
+ /**
13
+ * The library of promptbooks
14
+ */
15
+ readonly library: Record<string_name, PromptbookJson>;
16
+ /**
17
+ * Optional settings for creating a PromptbookExecutor
18
+ */
19
+ readonly settings?: Partial<CreatePromptbookExecutorSettings>;
20
+ };
8
21
  /**
9
22
  * Library of promptbooks that groups together promptbooks for an application. This is a very thin wrapper around the Array / Set of promptbooks.
10
23
  *
@@ -15,7 +28,7 @@ import { PromptbookString } from '../types/PromptbookString';
15
28
  * @see https://github.com/webgptorg/promptbook#prompt-template-pipeline-library
16
29
  */
17
30
  export declare class PromptbookLibrary {
18
- private readonly options;
31
+ protected readonly options: PromptbookLibraryOptions;
19
32
  /**
20
33
  * Constructs Promptbook from any sources
21
34
  *
@@ -45,6 +58,7 @@ export declare class PromptbookLibrary {
45
58
  */
46
59
  createExecutor(name: string_name, tools: ExecutionTools): PromptbookExecutor;
47
60
  }
61
+ export {};
48
62
  /**
49
63
  * TODO: [🈴] Identify promptbooks by url `promptbookUrls` + `getPromptbookByUrl`
50
64
  * TODO: !! [👐][🧠] Split of Promptbook,PromptbookLibrary between interface and class
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@promptbook/openai",
3
- "version": "0.36.2",
3
+ "version": "0.36.3",
4
4
  "description": "Library to supercharge your use of large language models",
5
5
  "private": false,
6
6
  "sideEffects": false,
@@ -37,7 +37,7 @@
37
37
  "openai": "4.2.0"
38
38
  },
39
39
  "peerDependencies": {
40
- "@promptbook/core": "0.36.2"
40
+ "@promptbook/core": "0.36.3"
41
41
  },
42
42
  "main": "./umd/index.umd.js",
43
43
  "module": "./esm/index.es.js",
@@ -5,6 +5,19 @@ import { PromptbookExecutor } from '../execution/PromptbookExecutor';
5
5
  import { Prompt } from '../types/Prompt';
6
6
  import { PromptbookJson } from '../types/PromptbookJson/PromptbookJson';
7
7
  import { PromptbookString } from '../types/PromptbookString';
8
+ /**
9
+ * Options for PromptbookLibrary
10
+ */
11
+ type PromptbookLibraryOptions = {
12
+ /**
13
+ * The library of promptbooks
14
+ */
15
+ readonly library: Record<string_name, PromptbookJson>;
16
+ /**
17
+ * Optional settings for creating a PromptbookExecutor
18
+ */
19
+ readonly settings?: Partial<CreatePromptbookExecutorSettings>;
20
+ };
8
21
  /**
9
22
  * Library of promptbooks that groups together promptbooks for an application. This is a very thin wrapper around the Array / Set of promptbooks.
10
23
  *
@@ -15,7 +28,7 @@ import { PromptbookString } from '../types/PromptbookString';
15
28
  * @see https://github.com/webgptorg/promptbook#prompt-template-pipeline-library
16
29
  */
17
30
  export declare class PromptbookLibrary {
18
- private readonly options;
31
+ protected readonly options: PromptbookLibraryOptions;
19
32
  /**
20
33
  * Constructs Promptbook from any sources
21
34
  *
@@ -45,6 +58,7 @@ export declare class PromptbookLibrary {
45
58
  */
46
59
  createExecutor(name: string_name, tools: ExecutionTools): PromptbookExecutor;
47
60
  }
61
+ export {};
48
62
  /**
49
63
  * TODO: [🈴] Identify promptbooks by url `promptbookUrls` + `getPromptbookByUrl`
50
64
  * TODO: !! [👐][🧠] Split of Promptbook,PromptbookLibrary between interface and class