@xuda.io/ai_module 1.1.4280 → 1.1.4282
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 +6 -5
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -4218,13 +4218,14 @@ export const create_conversation = async function (req, job_id, headers) {
|
|
|
4218
4218
|
|
|
4219
4219
|
setTimeout(async () => {
|
|
4220
4220
|
// Ask GPT for title
|
|
4221
|
-
|
|
4221
|
+
if (conversation_type !== 'email') {
|
|
4222
|
+
const title = await submit_chat_gpt_prompt({ uid, prompt: `create title for the prompt return 5 words result maximum text only without options : ${prompt}`, model: 'gpt-5-nano', metadata: { conversation_id: conversation_doc._id, func: 'create_conversation' }, account_profile_info });
|
|
4222
4223
|
|
|
4223
|
-
|
|
4224
|
-
|
|
4225
|
-
|
|
4226
|
-
await db_module.save_app_couch_doc_native(account_profile_info.app_id, conversation_doc);
|
|
4224
|
+
conversation_doc = await db_module.get_app_couch_doc_native(account_profile_info.app_id, conversation_obj.id);
|
|
4225
|
+
conversation_doc.title = title.data;
|
|
4227
4226
|
|
|
4227
|
+
await db_module.save_app_couch_doc_native(account_profile_info.app_id, conversation_doc);
|
|
4228
|
+
}
|
|
4228
4229
|
await update_thumbnail('conversation', conversation_doc, account_profile_info.app_id, uid, job_id, headers, null, null, account_profile_info);
|
|
4229
4230
|
|
|
4230
4231
|
if (conversation_doc.reference_type === 'contacts') {
|