@promptbook/openai 0.40.0-2 → 0.40.0-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.
@@ -1,7 +1,7 @@
1
1
  import { PromptbookJson } from '../_packages/types.index';
2
2
  import { ExecutionTools } from './ExecutionTools';
3
3
  import { PromptbookExecutor } from './PromptbookExecutor';
4
- export type CreatePromptbookExecutorSettings = {
4
+ type CreatePromptbookExecutorSettings = {
5
5
  /**
6
6
  * When executor does not satisfy expectations it will be retried this amount of times
7
7
  *
@@ -1,4 +1,3 @@
1
- import { CreatePromptbookExecutorSettings } from '../execution/createPromptbookExecutor';
2
1
  import type { Prompt } from '../types/Prompt';
3
2
  import type { PromptbookJson } from '../types/PromptbookJson/PromptbookJson';
4
3
  import type { PromptbookString } from '../types/PromptbookString';
@@ -11,7 +10,7 @@ import { PromptbookLibrary } from './PromptbookLibrary';
11
10
  * @see https://github.com/webgptorg/promptbook#promptbook-library
12
11
  */
13
12
  export declare class SimplePromptbookLibrary implements PromptbookLibrary {
14
- private readonly options;
13
+ private readonly library;
15
14
  /**
16
15
  * Constructs Promptbook from any sources
17
16
  *
@@ -22,7 +21,7 @@ export declare class SimplePromptbookLibrary implements PromptbookLibrary {
22
21
  * @param settings settings for creating executor functions
23
22
  * @returns PromptbookLibrary
24
23
  */
25
- static fromSources(promptbookSources: Array<PromptbookJson | PromptbookString>, settings?: Partial<CreatePromptbookExecutorSettings>): SimplePromptbookLibrary;
24
+ static fromSources(...promptbookSources: Array<PromptbookJson | PromptbookString>): SimplePromptbookLibrary;
26
25
  private constructor();
27
26
  /**
28
27
  * Gets all promptbooks in the library
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@promptbook/openai",
3
- "version": "0.40.0-2",
3
+ "version": "0.40.0-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.40.0-2"
40
+ "@promptbook/core": "0.40.0-3"
41
41
  },
42
42
  "main": "./umd/index.umd.js",
43
43
  "module": "./esm/index.es.js",
@@ -1,7 +1,7 @@
1
1
  import { PromptbookJson } from '../_packages/types.index';
2
2
  import { ExecutionTools } from './ExecutionTools';
3
3
  import { PromptbookExecutor } from './PromptbookExecutor';
4
- export type CreatePromptbookExecutorSettings = {
4
+ type CreatePromptbookExecutorSettings = {
5
5
  /**
6
6
  * When executor does not satisfy expectations it will be retried this amount of times
7
7
  *
@@ -1,4 +1,3 @@
1
- import { CreatePromptbookExecutorSettings } from '../execution/createPromptbookExecutor';
2
1
  import type { Prompt } from '../types/Prompt';
3
2
  import type { PromptbookJson } from '../types/PromptbookJson/PromptbookJson';
4
3
  import type { PromptbookString } from '../types/PromptbookString';
@@ -11,7 +10,7 @@ import { PromptbookLibrary } from './PromptbookLibrary';
11
10
  * @see https://github.com/webgptorg/promptbook#promptbook-library
12
11
  */
13
12
  export declare class SimplePromptbookLibrary implements PromptbookLibrary {
14
- private readonly options;
13
+ private readonly library;
15
14
  /**
16
15
  * Constructs Promptbook from any sources
17
16
  *
@@ -22,7 +21,7 @@ export declare class SimplePromptbookLibrary implements PromptbookLibrary {
22
21
  * @param settings settings for creating executor functions
23
22
  * @returns PromptbookLibrary
24
23
  */
25
- static fromSources(promptbookSources: Array<PromptbookJson | PromptbookString>, settings?: Partial<CreatePromptbookExecutorSettings>): SimplePromptbookLibrary;
24
+ static fromSources(...promptbookSources: Array<PromptbookJson | PromptbookString>): SimplePromptbookLibrary;
26
25
  private constructor();
27
26
  /**
28
27
  * Gets all promptbooks in the library