@xuda.io/ai_module 1.1.4838 → 1.1.4840

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.
Files changed (2) hide show
  1. package/index.mjs +14 -6
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -5719,13 +5719,21 @@ const create_ai_agent_image = async function (req, job_id, headers) {
5719
5719
  - Light interaction Use advanced or reflective materials to convey intelligence and sophistication.
5720
5720
  The overall composition should symbolize the fusion of human creativity and machine intelligence.
5721
5721
  `;
5722
- const ai_avatar_response = await client.images.edit({
5723
- model,
5724
- image: image_blob_ret.image_blob,
5725
5722
 
5726
- prompt,
5727
- background: 'transparent',
5728
- });
5723
+ let ai_avatar_response;
5724
+ try {
5725
+ ai_avatar_response = await client.images.edit({
5726
+ model,
5727
+ image: image_blob_ret.image_blob,
5728
+
5729
+ prompt,
5730
+ background: 'transparent',
5731
+ });
5732
+ report_ai_status(model);
5733
+ } catch (err) {
5734
+ report_ai_status(model, err);
5735
+ throw err;
5736
+ }
5729
5737
  imageBase64 = ai_avatar_response.data[0].b64_json;
5730
5738
  account_module.record_ai_usage(uid, ai_avatar_response.usage.input_tokens, ai_avatar_response.usage.output_tokens, 'agent avatar', prompt, model, { ai_agent_id }, account_profile_info);
5731
5739
  console.log('Normalizing final avatar to 1024 with transparent padding...');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.4838",
3
+ "version": "1.1.4840",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",