@xuda.io/ai_module 1.1.4807 → 1.1.4809

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 +4 -1
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -34,6 +34,8 @@ const _defaultAppConfig = {
34
34
  };
35
35
  admin.initializeApp(_defaultAppConfig);
36
36
 
37
+ var open_ai_status = {};
38
+
37
39
  const module_path = path.join(process.env.XUDA_HOME, 'cpi') + (!_conf.is_debug ? '/node_modules/@xuda.io' : '');
38
40
  const runtime_modules_path = path.join(process.env.XUDA_HOME, 'dist', 'runtime', 'js', 'modules');
39
41
 
@@ -3005,8 +3007,8 @@ const get_drive_file_stream = async function (drive_type, app_id, uid, file_path
3005
3007
  };
3006
3008
 
3007
3009
  const transcribe = async function (uid, stream, metadata, account_profile_info) {
3010
+ const model = 'whisper-1';
3008
3011
  try {
3009
- const model = 'whisper-1';
3010
3012
  const resp = await client.audio.transcriptions.create({
3011
3013
  model, // or "gpt-4o-transcribe", "whisper-1"
3012
3014
  file: stream, //fs.createReadStream(filePath),
@@ -3019,6 +3021,7 @@ const transcribe = async function (uid, stream, metadata, account_profile_info)
3019
3021
  // console.log(resp); // or resp for JSON formats
3020
3022
  return resp;
3021
3023
  } catch (error) {
3024
+ open_ai_status[model] = { error };
3022
3025
  debugger;
3023
3026
  }
3024
3027
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.4807",
3
+ "version": "1.1.4809",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",