@xuda.io/ai_module 1.1.3616 → 1.1.3618
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 -3
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -5758,7 +5758,10 @@ export const create_ai_agent_image = async function (req, job_id, headers) {
|
|
|
5758
5758
|
return { is_transparent, image_blob: new Blob([buffer], { type: 'image/png' }) };
|
|
5759
5759
|
}
|
|
5760
5760
|
|
|
5761
|
-
const { url, uid, account_obj, prompt } = req;
|
|
5761
|
+
const { url, app_id, uid, account_obj, ai_agent_id, prompt } = req;
|
|
5762
|
+
|
|
5763
|
+
const ai_agent_doc = await db_module.get_app_couch_doc_native(app_id, ai_agent_id);
|
|
5764
|
+
const account_doc = await db_module.get_couch_doc_native('xuda_accounts', uid);
|
|
5762
5765
|
|
|
5763
5766
|
try {
|
|
5764
5767
|
if (!url) {
|
|
@@ -5820,7 +5823,6 @@ export const create_ai_agent_image = async function (req, job_id, headers) {
|
|
|
5820
5823
|
background: 'transparent',
|
|
5821
5824
|
});
|
|
5822
5825
|
imageBase64 = ai_avatar_response.data[0].b64_json;
|
|
5823
|
-
avatar_source = 'ai profile';
|
|
5824
5826
|
};
|
|
5825
5827
|
|
|
5826
5828
|
await create_avatar_from_pic();
|
|
@@ -5843,7 +5845,7 @@ export const create_ai_agent_image = async function (req, job_id, headers) {
|
|
|
5843
5845
|
mimetype: `image/${ext}`,
|
|
5844
5846
|
};
|
|
5845
5847
|
|
|
5846
|
-
const drive_ret = await drive_module.
|
|
5848
|
+
const drive_ret = await drive_module.upload_drive_file_studio({ uid, path: '/Progs Thumbnails' }, job_id, headers, file_obj);
|
|
5847
5849
|
|
|
5848
5850
|
if (drive_ret.code > 0) {
|
|
5849
5851
|
let db_doc = await db_module.get_couch_doc_native('xuda_accounts', account_obj._id);
|