@promptbook/openai 0.52.0-31 → 0.52.0-33

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 CHANGED
@@ -11,7 +11,6 @@ Library to supercharge your use of large language models
11
11
  [![Issues](https://img.shields.io/github/issues/webgptorg/promptbook.svg?style=flat)](https://github.com/webgptorg/promptbook/issues)
12
12
 
13
13
 
14
- [![Socket Badge](https://socket.dev/api/badge/npm/package/@promptbook/openai)](https://socket.dev/npm/package/@promptbook/openai)
15
14
 
16
15
 
17
16
 
@@ -0,0 +1,7 @@
1
+ /**
2
+ * This error indicates that the promptbook library cannot be propperly loaded
3
+ */
4
+ export declare class PromptbookLibraryError extends Error {
5
+ readonly name = "PromptbookLibraryError";
6
+ constructor(message: string);
7
+ }
@@ -22,6 +22,13 @@ type CreatePromptbookLibraryFromDirectoryOptions = {
22
22
  * @default false
23
23
  */
24
24
  isLazyLoaded?: boolean;
25
+ /**
26
+ * If true, whole library creation crashes on error in any promptbook
27
+ * If true and isLazyLoaded is true, the error is thrown on first access to the promptbook
28
+ *
29
+ * @default true
30
+ */
31
+ isCrashOnError?: boolean;
25
32
  };
26
33
  /**
27
34
  * Constructs Promptbook from given directory
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@promptbook/openai",
3
- "version": "0.52.0-31",
3
+ "version": "0.52.0-33",
4
4
  "description": "Library to supercharge your use of large language models",
5
5
  "private": false,
6
6
  "sideEffects": false,
@@ -48,7 +48,7 @@
48
48
  }
49
49
  ],
50
50
  "peerDependencies": {
51
- "@promptbook/core": "0.52.0-31"
51
+ "@promptbook/core": "0.52.0-33"
52
52
  },
53
53
  "main": "./umd/index.umd.js",
54
54
  "module": "./esm/index.es.js",
@@ -0,0 +1,7 @@
1
+ /**
2
+ * This error indicates that the promptbook library cannot be propperly loaded
3
+ */
4
+ export declare class PromptbookLibraryError extends Error {
5
+ readonly name = "PromptbookLibraryError";
6
+ constructor(message: string);
7
+ }
@@ -22,6 +22,13 @@ type CreatePromptbookLibraryFromDirectoryOptions = {
22
22
  * @default false
23
23
  */
24
24
  isLazyLoaded?: boolean;
25
+ /**
26
+ * If true, whole library creation crashes on error in any promptbook
27
+ * If true and isLazyLoaded is true, the error is thrown on first access to the promptbook
28
+ *
29
+ * @default true
30
+ */
31
+ isCrashOnError?: boolean;
25
32
  };
26
33
  /**
27
34
  * Constructs Promptbook from given directory