@adminforth/bulk-ai-flow 1.23.3 → 1.23.5
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/build.log +2 -2
- package/custom/VisionAction.vue +1 -1
- package/dist/custom/VisionAction.vue +1 -1
- package/dist/index.js +4 -4
- package/index.ts +3 -4
- package/package.json +1 -1
package/build.log
CHANGED
|
@@ -13,5 +13,5 @@ custom/package-lock.json
|
|
|
13
13
|
custom/package.json
|
|
14
14
|
custom/tsconfig.json
|
|
15
15
|
|
|
16
|
-
sent 103,
|
|
17
|
-
total size is 103,
|
|
16
|
+
sent 103,769 bytes received 172 bytes 207,882.00 bytes/sec
|
|
17
|
+
total size is 103,133 speedup is 0.99
|
package/custom/VisionAction.vue
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
ref="confirmDialog"
|
|
10
10
|
header="Bulk AI Generation"
|
|
11
11
|
class="[scrollbar-gutter:stable] !max-w-full w-fit h-fit"
|
|
12
|
-
:class="popupMode === 'generation' ? 'lg:w-
|
|
12
|
+
:class="popupMode === 'generation' ? 'lg:w-auto !lg:max-w-[1600px]'
|
|
13
13
|
: popupMode === 'settings' ? 'lg:w-[1000px] !lg:max-w-[1000px]'
|
|
14
14
|
: 'lg:w-[500px] !lg:max-w-[500px]'"
|
|
15
15
|
:beforeCloseFunction="closeDialog"
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
ref="confirmDialog"
|
|
10
10
|
header="Bulk AI Generation"
|
|
11
11
|
class="[scrollbar-gutter:stable] !max-w-full w-fit h-fit"
|
|
12
|
-
:class="popupMode === 'generation' ? 'lg:w-
|
|
12
|
+
:class="popupMode === 'generation' ? 'lg:w-auto !lg:max-w-[1600px]'
|
|
13
13
|
: popupMode === 'settings' ? 'lg:w-[1000px] !lg:max-w-[1000px]'
|
|
14
14
|
: 'lg:w-[500px] !lg:max-w-[500px]'"
|
|
15
15
|
:beforeCloseFunction="closeDialog"
|
package/dist/index.js
CHANGED
|
@@ -107,7 +107,7 @@ export default class BulkAiFlowPlugin extends AdminForthPlugin {
|
|
|
107
107
|
}
|
|
108
108
|
analyze_image(jobId_1, recordId_1, adminUser_1, headers_1, customPrompt_1) {
|
|
109
109
|
return __awaiter(this, arguments, void 0, function* (jobId, recordId, adminUser, headers, customPrompt, filterFilledFields = true) {
|
|
110
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
110
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
|
|
111
111
|
const selectedId = recordId;
|
|
112
112
|
let isError = false;
|
|
113
113
|
// Fetch the record using the provided ID
|
|
@@ -164,7 +164,7 @@ export default class BulkAiFlowPlugin extends AdminForthPlugin {
|
|
|
164
164
|
jobs.set(jobId, { status: 'failed', error: `ERROR: ${JSON.stringify(topLevelError.message || (resp === null || resp === void 0 ? void 0 : resp.error.message))}` });
|
|
165
165
|
return { ok: false, error: `ERROR: ${JSON.stringify(topLevelError.message || (resp === null || resp === void 0 ? void 0 : resp.error.message))}` };
|
|
166
166
|
}
|
|
167
|
-
const textOutput = (
|
|
167
|
+
const textOutput = (_q = (_l = (_k = (_e = (_d = (_c = (_b = (_a = resp === null || resp === void 0 ? void 0 : resp.output) === null || _a === void 0 ? void 0 : _a[1]) === null || _b === void 0 ? void 0 : _b.content) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.text) !== null && _e !== void 0 ? _e : (_j = (_h = (_g = (_f = resp === null || resp === void 0 ? void 0 : resp.output) === null || _f === void 0 ? void 0 : _f[0]) === null || _g === void 0 ? void 0 : _g.content) === null || _h === void 0 ? void 0 : _h[0]) === null || _j === void 0 ? void 0 : _j.text) !== null && _k !== void 0 ? _k : resp === null || resp === void 0 ? void 0 : resp.output_text) !== null && _l !== void 0 ? _l : (_p = (_o = (_m = resp === null || resp === void 0 ? void 0 : resp.choices) === null || _m === void 0 ? void 0 : _m[0]) === null || _o === void 0 ? void 0 : _o.message) === null || _p === void 0 ? void 0 : _p.content) !== null && _q !== void 0 ? _q : (_u = (_t = (_s = (_r = resp.output) === null || _r === void 0 ? void 0 : _r[0]) === null || _s === void 0 ? void 0 : _s.content) === null || _t === void 0 ? void 0 : _t[1]) === null || _u === void 0 ? void 0 : _u.text;
|
|
168
168
|
if (!textOutput || typeof textOutput !== 'string') {
|
|
169
169
|
jobs.set(jobId, { status: 'failed', error: 'Unexpected AI response format' });
|
|
170
170
|
}
|
|
@@ -229,8 +229,8 @@ export default class BulkAiFlowPlugin extends AdminForthPlugin {
|
|
|
229
229
|
}
|
|
230
230
|
catch (e) {
|
|
231
231
|
isError = true;
|
|
232
|
-
jobs.set(jobId, { status: 'failed', error:
|
|
233
|
-
return { ok: false, error:
|
|
232
|
+
jobs.set(jobId, { status: 'failed', error: `AI provider refused to fill fields: ${e}` });
|
|
233
|
+
return { ok: false, error: `AI provider refused to fill fields: ${e}` };
|
|
234
234
|
}
|
|
235
235
|
let resData;
|
|
236
236
|
try {
|
package/index.ts
CHANGED
|
@@ -164,8 +164,7 @@ export default class BulkAiFlowPlugin extends AdminForthPlugin {
|
|
|
164
164
|
jobs.set(jobId, { status: 'failed', error: `ERROR: ${JSON.stringify(topLevelError.message || resp?.error.message)}` });
|
|
165
165
|
return { ok: false, error: `ERROR: ${JSON.stringify(topLevelError.message || resp?.error.message)}` };
|
|
166
166
|
}
|
|
167
|
-
|
|
168
|
-
const textOutput = resp?.output?.[0]?.content?.[0]?.text ?? resp?.output_text ?? resp?.choices?.[0]?.message?.content;
|
|
167
|
+
const textOutput = resp?.output?.[1]?.content?.[0]?.text ?? resp?.output?.[0]?.content?.[0]?.text ?? resp?.output_text ?? resp?.choices?.[0]?.message?.content ?? resp.output?.[0]?.content?.[1]?.text;
|
|
169
168
|
if (!textOutput || typeof textOutput !== 'string') {
|
|
170
169
|
jobs.set(jobId, { status: 'failed', error: 'Unexpected AI response format' });
|
|
171
170
|
}
|
|
@@ -229,8 +228,8 @@ export default class BulkAiFlowPlugin extends AdminForthPlugin {
|
|
|
229
228
|
resp = chatResponse
|
|
230
229
|
} catch (e) {
|
|
231
230
|
isError = true;
|
|
232
|
-
jobs.set(jobId, { status: 'failed', error:
|
|
233
|
-
return { ok: false, error:
|
|
231
|
+
jobs.set(jobId, { status: 'failed', error: `AI provider refused to fill fields: ${e}` });
|
|
232
|
+
return { ok: false, error: `AI provider refused to fill fields: ${e}` };
|
|
234
233
|
}
|
|
235
234
|
let resData;
|
|
236
235
|
try {
|