@xuda.io/ai_module 1.1.5201 → 1.1.5203

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 +3 -2
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -4185,10 +4185,11 @@ const ai_chat_conversation = async function (req, job_id, headers) {
4185
4185
  const get_prompt_suggestions = function () {
4186
4186
  return new Promise(async (resolve, reject) => {
4187
4187
  const ret = await get_chat_suggestions({ uid, ai_agents, conversation_item_id: out_conversation_item_save_ret.data.id, context: prompt });
4188
+ resolve(ret);
4188
4189
  });
4189
4190
  };
4190
4191
 
4191
- const suggestionsPromise = activate_prompt_suggestions ? get_chat_suggestions({ uid, ai_agents, conversation_item_id: out_conversation_item_save_ret.data.id, context: prompt }) : Promise.resolve(null);
4192
+ // const suggestionsPromise = activate_prompt_suggestions ? get_chat_suggestions({ uid, ai_agents, conversation_item_id: out_conversation_item_save_ret.data.id, context: prompt }) : Promise.resolve(null);
4192
4193
 
4193
4194
  conversation_doc.stat = 2;
4194
4195
  conversation_doc.ts = Date.now();
@@ -4717,7 +4718,7 @@ const ai_chat_conversation = async function (req, job_id, headers) {
4717
4718
 
4718
4719
  if (activate_prompt_suggestions) {
4719
4720
  // 2. Now wait for it specifically
4720
- const prompt_suggestions_ret = await suggestionsPromise;
4721
+ const prompt_suggestions_ret = await get_prompt_suggestions(); // suggestionsPromise;
4721
4722
 
4722
4723
  if (prompt_suggestions_ret && prompt_suggestions_ret.code > -1) {
4723
4724
  prompt_suggestions = prompt_suggestions_ret.data;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.5201",
3
+ "version": "1.1.5203",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",