@xuda.io/ai_module 1.1.3865 → 1.1.3867
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 +3 -3
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -4059,7 +4059,7 @@ export const create_conversation = async function (req, job_id, headers) {
|
|
|
4059
4059
|
|
|
4060
4060
|
setTimeout(async () => {
|
|
4061
4061
|
// Ask GPT for title
|
|
4062
|
-
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 } });
|
|
4062
|
+
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' } });
|
|
4063
4063
|
|
|
4064
4064
|
conversation_doc = await db_module.get_app_couch_doc_native(app_id, conversation_obj.id);
|
|
4065
4065
|
conversation_doc.title = title.data;
|
|
@@ -4158,7 +4158,7 @@ const update_conversation_mood_level = async function (conversation_id, prompt,
|
|
|
4158
4158
|
response_format: z.object({
|
|
4159
4159
|
mood_level: z.number().describe('mood level of interaction: -2: very negative,-1: negative 0:natural 1:positive 2: very positive'),
|
|
4160
4160
|
}),
|
|
4161
|
-
metadata: { conversation_id },
|
|
4161
|
+
metadata: { conversation_id, func: 'update_conversation_mood_level' },
|
|
4162
4162
|
});
|
|
4163
4163
|
|
|
4164
4164
|
const mood_level_obj = JSON5.parse(mood_level.data);
|
|
@@ -4923,7 +4923,7 @@ const ai_chat_conversation = async function (req, job_id, headers) {
|
|
|
4923
4923
|
],
|
|
4924
4924
|
},
|
|
4925
4925
|
],
|
|
4926
|
-
metadata: { conversation_id },
|
|
4926
|
+
metadata: { conversation_id, func: 'attachment_handler' },
|
|
4927
4927
|
});
|
|
4928
4928
|
if (ret.code < 0) {
|
|
4929
4929
|
throw new Error('something went wrong try again later');
|