@xuda.io/ai_module 1.1.3819 → 1.1.3821
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 -1
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -6248,7 +6248,7 @@ const record_chat_usage = async function (uid, input_tokens, output_tokens, sour
|
|
|
6248
6248
|
|
|
6249
6249
|
const t = Date.now();
|
|
6250
6250
|
let usage_doc = {
|
|
6251
|
-
_id:
|
|
6251
|
+
_id: await _common.xuda_get_uuid('chat_usage'),
|
|
6252
6252
|
docType: 'chat_usage',
|
|
6253
6253
|
msg: msg.substr(0, 40),
|
|
6254
6254
|
date_created_ts: t,
|
|
@@ -6256,6 +6256,7 @@ const record_chat_usage = async function (uid, input_tokens, output_tokens, sour
|
|
|
6256
6256
|
source,
|
|
6257
6257
|
input_tokens,
|
|
6258
6258
|
output_tokens,
|
|
6259
|
+
stat: 3,
|
|
6259
6260
|
};
|
|
6260
6261
|
const save_ret = await db_module.save_app_couch_doc(app_id, usage_doc);
|
|
6261
6262
|
} catch (err) {
|