@xuda.io/ai_module 1.1.4817 → 1.1.4819

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,18 @@ 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
+ report_ai_status('files');
2527
+ } catch (error) {
2528
+ report_ai_status('files', error);
2529
+ throw error;
2530
+ }
2526
2531
 
2527
2532
  if (!tool.youtube.vector_file_id) {
2528
2533
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.4817",
3
+ "version": "1.1.4819",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",