@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.
- package/index.mjs +11 -5
- 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
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
|
|
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 {
|