@xuda.io/ai_module 1.1.5199 → 1.1.5201

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 +7 -1
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -4182,6 +4182,12 @@ const ai_chat_conversation = async function (req, job_id, headers) {
4182
4182
  await update_job('initiating conversation');
4183
4183
  let prompt_suggestions = [];
4184
4184
 
4185
+ const get_prompt_suggestions = function () {
4186
+ return new Promise(async (resolve, reject) => {
4187
+ const ret = await get_chat_suggestions({ uid, ai_agents, conversation_item_id: out_conversation_item_save_ret.data.id, context: prompt });
4188
+ });
4189
+ };
4190
+
4185
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);
4186
4192
 
4187
4193
  conversation_doc.stat = 2;
@@ -11030,7 +11036,7 @@ export const get_chat_suggestions = async function (req) {
11030
11036
 
11031
11037
  Agent Source: ${JSON.stringify(agents_docs)}
11032
11038
 
11033
- Output: > Return a JSON array of exactly 5 objects following this schema:
11039
+ Output: > Return a JSON array of exactly ${no_of_suggestions} objects following this schema:
11034
11040
  [{ "type":"string","agent_id": "string", "short_action": "string", "agent_description": "string" }]
11035
11041
 
11036
11042
  ## output example:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.5199",
3
+ "version": "1.1.5201",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",