@adminforth/bulk-ai-flow 1.0.6 → 1.0.7
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/dist/index.js +1 -1
- package/index.ts +1 -1
- package/package.json +1 -1
- package/types.ts +1 -1
package/dist/index.js
CHANGED
|
@@ -101,7 +101,7 @@ export default class BulkAiFlowPlugin extends AdminForthPlugin {
|
|
|
101
101
|
Each object must contain the following fields: ${JSON.stringify(compiledOutputFields)} Use the exact field names. If it's number field - return only number.
|
|
102
102
|
Image URLs:`;
|
|
103
103
|
//send prompt to OpenAI and get response
|
|
104
|
-
const chatResponse = yield this.options.
|
|
104
|
+
const chatResponse = yield this.options.visionAdapter.generate({ prompt, inputFileUrls: attachmentFiles });
|
|
105
105
|
const resp = chatResponse.response;
|
|
106
106
|
const topLevelError = chatResponse.error;
|
|
107
107
|
if (topLevelError || (resp === null || resp === void 0 ? void 0 : resp.error)) {
|
package/index.ts
CHANGED
|
@@ -102,7 +102,7 @@ export default class BulkAiFlowPlugin extends AdminForthPlugin {
|
|
|
102
102
|
Image URLs:`;
|
|
103
103
|
|
|
104
104
|
//send prompt to OpenAI and get response
|
|
105
|
-
const chatResponse = await this.options.
|
|
105
|
+
const chatResponse = await this.options.visionAdapter.generate({ prompt, inputFileUrls: attachmentFiles });
|
|
106
106
|
|
|
107
107
|
const resp: any = (chatResponse as any).response;
|
|
108
108
|
const topLevelError = (chatResponse as any).error;
|
package/package.json
CHANGED
package/types.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { ImageVisionAdapter, AdminUser, IAdminForth, StorageAdapter } from "admi
|
|
|
3
3
|
|
|
4
4
|
export interface PluginOptions {
|
|
5
5
|
actionName: string,
|
|
6
|
-
|
|
6
|
+
visionAdapter: ImageVisionAdapter,
|
|
7
7
|
outputFields: Record<string, string>[],
|
|
8
8
|
attachFiles?: ({ record }: {
|
|
9
9
|
record: any,
|