@xuda.io/ai_module 1.1.4708 → 1.1.4710

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 +5 -5
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -1999,12 +1999,12 @@ export const delete_ai_chat = async function (req) {
1999
1999
  const app_id = await account_module.get_account_default_project_id(uid);
2000
2000
  let conversation_doc = await db_module.get_app_couch_doc_native(account_profile_info.app_id, conversation_id);
2001
2001
 
2002
- if (conversation_doc.stat !== 5) {
2003
- throw new Error('A document can only be deleted after it has been archived');
2004
- }
2005
-
2006
2002
  let save_ret;
2007
2003
  try {
2004
+ if (conversation_doc.stat !== 5) {
2005
+ throw new Error('A document can only be deleted after it has been archived');
2006
+ }
2007
+
2008
2008
  if (conversation_doc.shared_from_uid) {
2009
2009
  // delete the share , the doc will delete by the remove_team_member
2010
2010
  const team_module = await import(`${module_path}/team_module/index.mjs`);
@@ -4720,7 +4720,7 @@ const chat_email = async function (req, job_id, headers) {
4720
4720
  {
4721
4721
  type: 'message',
4722
4722
  role: 'user',
4723
- content: [{ type: 'input_text', text: body }],
4723
+ content: [{ type: 'input_text', text: body || '' }],
4724
4724
  },
4725
4725
  ],
4726
4726
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.4708",
3
+ "version": "1.1.4710",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",