@xuda.io/ai_module 1.1.3957 → 1.1.3959
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 +2 -2
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -3461,7 +3461,7 @@ const transcribe = async function (uid, stream, metadata) {
|
|
|
3461
3461
|
language: 'en', // hint language (ISO 639-1), e.g. "he" for Hebrew
|
|
3462
3462
|
// temperature: 0 // lower = more literal
|
|
3463
3463
|
});
|
|
3464
|
-
record_chat_usage(uid, 0, resp.length || 0, 'transcribe',
|
|
3464
|
+
record_chat_usage(uid, 0, resp.length || 0, 'transcribe', '', model, metadata);
|
|
3465
3465
|
console.log(resp); // or resp for JSON formats
|
|
3466
3466
|
return resp;
|
|
3467
3467
|
} catch (error) {
|
|
@@ -5006,7 +5006,7 @@ const ai_chat_conversation = async function (req, job_id, headers) {
|
|
|
5006
5006
|
switch (validation_ret.category) {
|
|
5007
5007
|
case 'audio':
|
|
5008
5008
|
case 'video': {
|
|
5009
|
-
transcript = await transcribe(fileStream);
|
|
5009
|
+
transcript = await transcribe(uid, fileStream, { conversation_id, func: validation_ret.category });
|
|
5010
5010
|
|
|
5011
5011
|
break;
|
|
5012
5012
|
}
|