@xuda.io/ai_module 1.1.3829 → 1.1.3830
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 +1 -1
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -6253,7 +6253,7 @@ const record_chat_usage = async function (uid, input_tokens, output_tokens, sour
|
|
|
6253
6253
|
let usage_doc = {
|
|
6254
6254
|
_id: await _common.xuda_get_uuid('chat_usage'),
|
|
6255
6255
|
docType: 'chat_usage',
|
|
6256
|
-
prompt: prompt.substr(0, 40),
|
|
6256
|
+
prompt: typeof prompt === 'string' ? prompt.substr(0, 40) : '',
|
|
6257
6257
|
date_created_ts: t,
|
|
6258
6258
|
uid,
|
|
6259
6259
|
source,
|