@xuda.io/ai_module 1.1.3956 → 1.1.3958

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