@xuda.io/ai_module 1.1.4821 → 1.1.4822

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 -5
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -2486,11 +2486,17 @@ const upload_agent_files = async function (uid, agent_doc) {
2486
2486
  break;
2487
2487
  }
2488
2488
  if (file) {
2489
- const uploadedFile = await client.files.create({
2490
- file,
2491
- purpose: 'assistants',
2492
- });
2493
- tool.file.file_id = uploadedFile.id;
2489
+ try {
2490
+ const uploadedFile = await client.files.create({
2491
+ file,
2492
+ purpose: 'assistants',
2493
+ });
2494
+ tool.file.file_id = uploadedFile.id;
2495
+ report_ai_status('files');
2496
+ } catch (error) {
2497
+ report_ai_status('files', error);
2498
+ throw error;
2499
+ }
2494
2500
 
2495
2501
  if (!tool.file.vector_file_id) {
2496
2502
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.4821",
3
+ "version": "1.1.4822",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",