@xuda.io/ai_module 1.1.5232 → 1.1.5234

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 +2 -1
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -11028,7 +11028,7 @@ export const open_ai_alive_check = async function () {};
11028
11028
  // };
11029
11029
 
11030
11030
  export const get_chat_suggestions = async function (req) {
11031
- const { uid, conversation_item_id, no_of_suggestions = 3, ai_model = _conf.default_ai_model, context } = req;
11031
+ const { uid, conversation_item_id, no_of_suggestions = 3, ai_model = _conf.default_ai_model, context, exclude_agents = [] } = req;
11032
11032
  let { ai_agents } = req;
11033
11033
 
11034
11034
  try {
@@ -11046,6 +11046,7 @@ export const get_chat_suggestions = async function (req) {
11046
11046
  const ai_agents_ret = await get_user_ai_agents(uid);
11047
11047
  for (const doc of ai_agents_ret.docs) {
11048
11048
  if (doc._id === conversation_item_doc.ai_agent_id) continue; //exclude the current agent from list
11049
+ if (exclude_agents.includes(doc._id)) continue;
11049
11050
  ai_agents.push(doc._id);
11050
11051
  }
11051
11052
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.5232",
3
+ "version": "1.1.5234",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",