@xuda.io/ai_module 1.1.3955 → 1.1.3956

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 +2 -2
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -3450,7 +3450,7 @@ const get_drive_file_stream = async function (drive_type, app_id, uid, file_path
3450
3450
  }
3451
3451
  };
3452
3452
 
3453
- const transcribe = async function (stream) {
3453
+ const transcribe = async function (uid, stream, metadata) {
3454
3454
  try {
3455
3455
  const resp = await client.audio.transcriptions.create({
3456
3456
  model: 'whisper-1', // or "gpt-4o-transcribe", "whisper-1"
@@ -3460,7 +3460,7 @@ const transcribe = async function (stream) {
3460
3460
  language: 'en', // hint language (ISO 639-1), e.g. "he" for Hebrew
3461
3461
  // temperature: 0 // lower = more literal
3462
3462
  });
3463
-
3463
+ record_chat_usage(uid, 0, resp.length || 0, 'transcribe', prompt, model, metadata);
3464
3464
  console.log(resp); // or resp for JSON formats
3465
3465
  return resp;
3466
3466
  } catch (error) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.3955",
3
+ "version": "1.1.3956",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",