@promptbook/openai 0.52.0-7 → 0.52.0-9

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,4 +1,16 @@
1
+ import { string_folder_path } from '../../types/typeAliases';
1
2
  import { PromptbookLibrary } from '../PromptbookLibrary';
3
+ /**
4
+ * Options for `createPromptbookLibraryFromDirectory` function
5
+ */
6
+ type CreatePromptbookLibraryFromDirectoryOptions = {
7
+ /**
8
+ * If true, the directory is searched recursively for promptbooks
9
+ *
10
+ * @default true
11
+ */
12
+ isRecursive?: boolean;
13
+ };
2
14
  /**
3
15
  * Constructs Promptbook from given directory
4
16
  *
@@ -6,9 +18,12 @@ import { PromptbookLibrary } from '../PromptbookLibrary';
6
18
  * Note: The function does NOT return promise it returns the library directly which dynamically loads promptbooks when needed
7
19
  * SO during the construction syntax and logic sources IS NOT validated
8
20
  *
21
+ * @param path - path to the directory with promptbooks
22
+ * @param options - Misc options for the library
9
23
  * @returns PromptbookLibrary
10
24
  */
11
- export declare function createPromptbookLibraryFromDirectory(): PromptbookLibrary;
25
+ export declare function createPromptbookLibraryFromDirectory(path: string_folder_path, options?: CreatePromptbookLibraryFromDirectoryOptions): PromptbookLibrary;
26
+ export {};
12
27
  /***
13
28
  * TODO: [🍓][🚯] !!! Add to README and samples + maybe make `@promptbook/library` package
14
29
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@promptbook/openai",
3
- "version": "0.52.0-7",
3
+ "version": "0.52.0-9",
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-7"
51
+ "@promptbook/core": "0.52.0-9"
52
52
  },
53
53
  "main": "./umd/index.umd.js",
54
54
  "module": "./esm/index.es.js",
@@ -1,4 +1,16 @@
1
+ import { string_folder_path } from '../../types/typeAliases';
1
2
  import { PromptbookLibrary } from '../PromptbookLibrary';
3
+ /**
4
+ * Options for `createPromptbookLibraryFromDirectory` function
5
+ */
6
+ type CreatePromptbookLibraryFromDirectoryOptions = {
7
+ /**
8
+ * If true, the directory is searched recursively for promptbooks
9
+ *
10
+ * @default true
11
+ */
12
+ isRecursive?: boolean;
13
+ };
2
14
  /**
3
15
  * Constructs Promptbook from given directory
4
16
  *
@@ -6,9 +18,12 @@ import { PromptbookLibrary } from '../PromptbookLibrary';
6
18
  * Note: The function does NOT return promise it returns the library directly which dynamically loads promptbooks when needed
7
19
  * SO during the construction syntax and logic sources IS NOT validated
8
20
  *
21
+ * @param path - path to the directory with promptbooks
22
+ * @param options - Misc options for the library
9
23
  * @returns PromptbookLibrary
10
24
  */
11
- export declare function createPromptbookLibraryFromDirectory(): PromptbookLibrary;
25
+ export declare function createPromptbookLibraryFromDirectory(path: string_folder_path, options?: CreatePromptbookLibraryFromDirectoryOptions): PromptbookLibrary;
26
+ export {};
12
27
  /***
13
28
  * TODO: [🍓][🚯] !!! Add to README and samples + maybe make `@promptbook/library` package
14
29
  */