@xuda.io/ai_module 1.1.4823 → 1.1.4825

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 +10 -10
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -1469,10 +1469,10 @@ const create_image = async function (uid, prompt, model = 'gpt-image-1-mini', si
1469
1469
  size,
1470
1470
  n,
1471
1471
  });
1472
- report_ai_status('files');
1473
- } catch (error) {
1474
- report_ai_status('files', error);
1475
- throw error;
1472
+ report_ai_status(model);
1473
+ } catch (err) {
1474
+ report_ai_status(model, err);
1475
+ throw err;
1476
1476
  }
1477
1477
  // Try to extract base64 directly
1478
1478
  const imgObj = response.data?.[0];
@@ -2542,9 +2542,9 @@ const upload_agent_files = async function (uid, agent_doc) {
2542
2542
 
2543
2543
  tool.youtube.file_id = uploadedFile.id;
2544
2544
  report_ai_status('files');
2545
- } catch (error) {
2546
- report_ai_status('files', error);
2547
- throw error;
2545
+ } catch (err) {
2546
+ report_ai_status('files', err);
2547
+ throw err;
2548
2548
  }
2549
2549
 
2550
2550
  if (!tool.youtube.vector_file_id) {
@@ -2554,9 +2554,9 @@ const upload_agent_files = async function (uid, agent_doc) {
2554
2554
  });
2555
2555
  report_ai_status('vectorStores');
2556
2556
  tool.youtube.vector_store_id = ret.vector_store_id;
2557
- } catch (error) {
2558
- report_ai_status('vectorStores', error);
2559
- throw error;
2557
+ } catch (err) {
2558
+ report_ai_status('vectorStores', err);
2559
+ throw err;
2560
2560
  }
2561
2561
  }
2562
2562
  await save_agent_status(uid, agent_doc._id, 3, agentConfig);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.4823",
3
+ "version": "1.1.4825",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",