@xuda.io/ai_module 1.1.3828 → 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.
Files changed (2) hide show
  1. package/index.mjs +2 -1
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -6246,13 +6246,14 @@ const create_ai_agent_image = async function (req, job_id, headers) {
6246
6246
 
6247
6247
  const record_chat_usage = async function (uid, input_tokens, output_tokens, source, prompt) {
6248
6248
  try {
6249
+ debugger;
6249
6250
  const app_id = await account_module.get_account_default_project_id(uid);
6250
6251
 
6251
6252
  const t = Date.now();
6252
6253
  let usage_doc = {
6253
6254
  _id: await _common.xuda_get_uuid('chat_usage'),
6254
6255
  docType: 'chat_usage',
6255
- prompt: prompt.substr(0, 40),
6256
+ prompt: typeof prompt === 'string' ? prompt.substr(0, 40) : '',
6256
6257
  date_created_ts: t,
6257
6258
  uid,
6258
6259
  source,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.3828",
3
+ "version": "1.1.3830",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",