@promptbook/openai 0.39.0 → 0.39.2

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,3 +1,4 @@
1
+ import { Promisable } from 'type-fest';
1
2
  import type { Prompt } from '../types/Prompt';
2
3
  import type { PromptbookJson } from '../types/PromptbookJson/PromptbookJson';
3
4
  import type { string_promptbook_url } from '../types/typeAliases';
@@ -10,13 +11,13 @@ export type PromptbookLibrary = {
10
11
  /**
11
12
  * Gets all promptbooks in the library
12
13
  */
13
- listPromptbooks(): Array<string_promptbook_url>;
14
+ listPromptbooks(): Promisable<Array<string_promptbook_url>>;
14
15
  /**
15
16
  * Gets promptbook by its URL
16
17
  *
17
18
  * Note: This is not a direct fetching from the URL, but a lookup in the library
18
19
  */
19
- getPromptbookByUrl(url: string_promptbook_url): PromptbookJson;
20
+ getPromptbookByUrl(url: string_promptbook_url): Promisable<PromptbookJson>;
20
21
  /**
21
22
  * Checks whether given prompt was defined in any promptbook in the library
22
23
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@promptbook/openai",
3
- "version": "0.39.0",
3
+ "version": "0.39.2",
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.39.0"
40
+ "@promptbook/core": "0.39.2"
41
41
  },
42
42
  "main": "./umd/index.umd.js",
43
43
  "module": "./esm/index.es.js",
@@ -1,3 +1,4 @@
1
+ import { Promisable } from 'type-fest';
1
2
  import type { Prompt } from '../types/Prompt';
2
3
  import type { PromptbookJson } from '../types/PromptbookJson/PromptbookJson';
3
4
  import type { string_promptbook_url } from '../types/typeAliases';
@@ -10,13 +11,13 @@ export type PromptbookLibrary = {
10
11
  /**
11
12
  * Gets all promptbooks in the library
12
13
  */
13
- listPromptbooks(): Array<string_promptbook_url>;
14
+ listPromptbooks(): Promisable<Array<string_promptbook_url>>;
14
15
  /**
15
16
  * Gets promptbook by its URL
16
17
  *
17
18
  * Note: This is not a direct fetching from the URL, but a lookup in the library
18
19
  */
19
- getPromptbookByUrl(url: string_promptbook_url): PromptbookJson;
20
+ getPromptbookByUrl(url: string_promptbook_url): Promisable<PromptbookJson>;
20
21
  /**
21
22
  * Checks whether given prompt was defined in any promptbook in the library
22
23
  */