@xuda.io/ai_module 1.1.4825 → 1.1.4826

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
@@ -67,8 +67,8 @@ const drive_module = await import(`${module_path}/drive_module/index.mjs`);
67
67
  const jobs_module = await import(`${module_path}/jobs_module/index.mjs`);
68
68
 
69
69
  var open_ai_status = {};
70
- const report_ai_status = function (model, error) {
71
- open_ai_status[model] = { stat: error ? 'error' : 'ok', date: new Date(), error };
70
+ const report_ai_status = function (model, err) {
71
+ open_ai_status[model] = { stat: err ? 'error' : 'ok', date: new Date(), err };
72
72
  };
73
73
 
74
74
  let client;
@@ -2499,9 +2499,9 @@ const upload_agent_files = async function (uid, agent_doc) {
2499
2499
  });
2500
2500
  tool.file.file_id = uploadedFile.id;
2501
2501
  report_ai_status('files');
2502
- } catch (error) {
2503
- report_ai_status('files', error);
2504
- throw error;
2502
+ } catch (err) {
2503
+ report_ai_status('files', err);
2504
+ throw err;
2505
2505
  }
2506
2506
 
2507
2507
  if (!tool.file.vector_file_id) {
@@ -2511,9 +2511,9 @@ const upload_agent_files = async function (uid, agent_doc) {
2511
2511
  });
2512
2512
  tool.file.vector_store_id = ret.vector_store_id;
2513
2513
  report_ai_status('vectorStores');
2514
- } catch (error) {
2515
- report_ai_status('vectorStores', error);
2516
- throw error;
2514
+ } catch (err) {
2515
+ report_ai_status('vectorStores', err);
2516
+ throw err;
2517
2517
  }
2518
2518
  }
2519
2519
  }
@@ -3053,8 +3053,8 @@ const transcribe = async function (uid, stream, metadata, account_profile_info)
3053
3053
  account_module.record_ai_usage(uid, 0, resp.length || 0, 'transcribe', '', model, metadata, account_profile_info);
3054
3054
  // console.log(resp); // or resp for JSON formats
3055
3055
  return resp;
3056
- } catch (error) {
3057
- report_ai_status(model, error);
3056
+ } catch (err) {
3057
+ report_ai_status(model, err);
3058
3058
  debugger;
3059
3059
  }
3060
3060
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.4825",
3
+ "version": "1.1.4826",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",