@xuda.io/ai_module 1.1.4816 → 1.1.4818

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 +11 -6
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -2516,13 +2516,17 @@ const upload_agent_files = async function (uid, agent_doc) {
2516
2516
  type: 'text/plain',
2517
2517
  });
2518
2518
  // const stream = textToStream(transcript);
2519
+ try {
2520
+ const uploadedFile = await client.files.create({
2521
+ file,
2522
+ purpose: 'assistants',
2523
+ });
2519
2524
 
2520
- const uploadedFile = await client.files.create({
2521
- file,
2522
- purpose: 'assistants',
2523
- });
2524
-
2525
- tool.youtube.file_id = uploadedFile.id;
2525
+ tool.youtube.file_id = uploadedFile.id;
2526
+ } catch (error) {
2527
+ report_ai_status('vectorStores', error);
2528
+ throw error;
2529
+ }
2526
2530
 
2527
2531
  if (!tool.youtube.vector_file_id) {
2528
2532
  try {
@@ -2533,6 +2537,7 @@ const upload_agent_files = async function (uid, agent_doc) {
2533
2537
  tool.youtube.vector_store_id = ret.vector_store_id;
2534
2538
  } catch (error) {
2535
2539
  report_ai_status('vectorStores', error);
2540
+ throw error;
2536
2541
  }
2537
2542
  }
2538
2543
  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.4816",
3
+ "version": "1.1.4818",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",