@xuda.io/ai_module 1.1.4819 → 1.1.4820

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 +9 -4
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -2493,10 +2493,15 @@ const upload_agent_files = async function (uid, agent_doc) {
2493
2493
  tool.file.file_id = uploadedFile.id;
2494
2494
 
2495
2495
  if (!tool.file.vector_file_id) {
2496
- const ret = await client.vectorStores.files.create(_conf.OPENAI_VECTOR_STORE_ID, {
2497
- file_id: tool.file.file_id,
2498
- });
2499
- tool.file.vector_store_id = ret.vector_store_id;
2496
+ try {
2497
+ const ret = await client.vectorStores.files.create(_conf.OPENAI_VECTOR_STORE_ID, {
2498
+ file_id: tool.file.file_id,
2499
+ });
2500
+ tool.file.vector_store_id = ret.vector_store_id;
2501
+ } catch (error) {
2502
+ report_ai_status('vectorStores', error);
2503
+ throw error;
2504
+ }
2500
2505
  }
2501
2506
  }
2502
2507
  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.4819",
3
+ "version": "1.1.4820",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",