File tree Expand file tree Collapse file tree 2 files changed +32
-0
lines changed
adminforth/types/adapters Expand file tree Collapse file tree 2 files changed +32
-0
lines changed Original file line number Diff line number Diff line change
1
+ export interface ImageVisionAdapter {
2
+
3
+ /**
4
+ * This method is called to validate the configuration of the adapter
5
+ * and should throw a clear user-readable error if the configuration is invalid.
6
+ */
7
+ validate ( ) : void ;
8
+
9
+ /**
10
+ * Input file extension supported
11
+ */
12
+ inputFileExtensionSupported ( ) : string [ ] ;
13
+
14
+ /**
15
+ * This method should generate an image based on the provided prompt and input files.
16
+ * @param prompt - The prompt to generate the image
17
+ * @param inputFileUrls - An array of input file paths (optional)
18
+ * @returns A promise that resolves to an object containing the generated image and any error message
19
+ */
20
+ generate ( {
21
+ prompt,
22
+ inputFileUrls,
23
+ } : {
24
+ prompt : string ,
25
+ fieldsToFill : Record < string , string > ,
26
+ inputFileUrls : string [ ] ,
27
+ } ) : Promise < {
28
+ response : string ;
29
+ error ?: string ;
30
+ } > ;
31
+ }
Original file line number Diff line number Diff line change 1
1
export type { EmailAdapter } from './EmailAdapter.js' ;
2
2
export type { CompletionAdapter } from './CompletionAdapter.js' ;
3
3
export type { ImageGenerationAdapter } from './ImageGenerationAdapter.js' ;
4
+ export type { ImageVisionAdapter } from './ImageVisionAdapter.js' ;
4
5
export type { OAuth2Adapter } from './OAuth2Adapter.js' ;
5
6
export type { StorageAdapter } from './StorageAdapter.js' ;
You can’t perform that action at this time.
0 commit comments