@xuda.io/ai_module 1.1.5335 → 1.1.5336

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 -2
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -5965,6 +5965,8 @@ export const conversation_actions = async function (req, job_id, headers) {
5965
5965
  throw new Error('item_id is missing or invalid:' + item_id);
5966
5966
  }
5967
5967
 
5968
+ let conversation_item = await db_module.get_app_couch_doc_native(account_profile_info.app_id, item_id);
5969
+
5968
5970
  const item = await client.conversations.items.retrieve(item_id, { conversation_id });
5969
5971
  let pdf;
5970
5972
  let originalname = `${item_id}.pdf`;
@@ -5979,7 +5981,8 @@ export const conversation_actions = async function (req, job_id, headers) {
5979
5981
  if (action === 'save_to_drive') {
5980
5982
  opt.dest = outputPath;
5981
5983
  }
5982
- pdf = await mdToPdf({ content: item?.content?.[0]?.text || '' }, opt);
5984
+ // pdf = await mdToPdf({ content: item?.content?.[0]?.text || '' }, opt);
5985
+ pdf = await mdToPdf({ content: conversation_item?.text || '' }, opt);
5983
5986
  // }
5984
5987
 
5985
5988
  switch (action) {
@@ -6017,7 +6020,7 @@ export const conversation_actions = async function (req, job_id, headers) {
6017
6020
  throw new Error('invalid action: ' + action);
6018
6021
  }
6019
6022
 
6020
- return item;
6023
+ // return item;
6021
6024
  } catch (err) {
6022
6025
  return { code: -111, data: err.message };
6023
6026
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.5335",
3
+ "version": "1.1.5336",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",