@xuda.io/ai_module 1.1.4671 → 1.1.4673
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/index.mjs +5 -2
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -3439,7 +3439,7 @@ export const update_thumbnail = async function (type, doc, app_id, uid, job_id,
|
|
|
3439
3439
|
break;
|
|
3440
3440
|
}
|
|
3441
3441
|
|
|
3442
|
-
case '
|
|
3442
|
+
case 'conversation_title': {
|
|
3443
3443
|
prompt = `create image: ${doc.title}`;
|
|
3444
3444
|
let images_arr;
|
|
3445
3445
|
const cache = await get_chat_picture_cache(uid, 'chat_thumbnail', doc.title);
|
|
@@ -3458,7 +3458,10 @@ export const update_thumbnail = async function (type, doc, app_id, uid, job_id,
|
|
|
3458
3458
|
case 'conversation_category': {
|
|
3459
3459
|
prompt = `create image: ${doc.category_info.category}`;
|
|
3460
3460
|
let images_arr;
|
|
3461
|
-
|
|
3461
|
+
let cache = await get_chat_picture_cache(uid, 'chat_thumbnail', doc.title);
|
|
3462
|
+
if (!cache) {
|
|
3463
|
+
cache = await get_chat_picture_cache(uid, 'chat_thumbnail', doc.category_info.category);
|
|
3464
|
+
}
|
|
3462
3465
|
images_arr = [cache];
|
|
3463
3466
|
if (!cache) {
|
|
3464
3467
|
images_arr = await create_and_upload_image_to_drive('user', 'Chat Thumbnails', doc._id, prompt, 1, uid, app_id, job_id, headers, true, tags, account_profile_info);
|