@xuda.io/ai_module 1.1.4660 → 1.1.4662
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 +4 -3
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -4313,8 +4313,8 @@ const process_conversation = async function (uid, conversation_id, account_profi
|
|
|
4313
4313
|
}
|
|
4314
4314
|
}
|
|
4315
4315
|
/// categorize prompt
|
|
4316
|
-
let category_info = {
|
|
4317
|
-
if (prompt?.length > 5)
|
|
4316
|
+
let category_info = {};
|
|
4317
|
+
if (prompt?.length > 5) {
|
|
4318
4318
|
switch (conversation_type) {
|
|
4319
4319
|
case 'ai': {
|
|
4320
4320
|
category_info = await categorize_ai_prompt(uid, prompt, account_profile_info);
|
|
@@ -4337,9 +4337,10 @@ const process_conversation = async function (uid, conversation_id, account_profi
|
|
|
4337
4337
|
}
|
|
4338
4338
|
|
|
4339
4339
|
default:
|
|
4340
|
+
category_info = { category: 'unknown' };
|
|
4340
4341
|
break;
|
|
4341
4342
|
}
|
|
4342
|
-
|
|
4343
|
+
}
|
|
4343
4344
|
conversation_doc = await db_module.get_app_couch_doc_native(account_profile_info.app_id, conversation_doc._id);
|
|
4344
4345
|
contact_doc.category_info = category_info;
|
|
4345
4346
|
await db_module.save_app_couch_doc_native(account_profile_info.app_id, conversation_doc);
|