@xuda.io/ai_module 1.1.5129 → 1.1.5131

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 +20 -8
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -2961,7 +2961,6 @@ export const update_thumbnail = async function (type, doc, app_id, uid, job_id,
2961
2961
 
2962
2962
  switch (type) {
2963
2963
  case 'ai_agent': {
2964
- debugger;
2965
2964
  const images_arr = await create_ai_agent_image({ app_id, uid, ai_agent_id: doc._id, tags }, job_id, headers);
2966
2965
  db_doc = await get_db_doc();
2967
2966
  db_doc.studio_meta.thumbnail_request_ts = Date.now();
@@ -4785,7 +4784,7 @@ setTimeout(async () => {
4785
4784
 
4786
4785
  // await init_studio_units();
4787
4786
  let ret;
4788
- // ret = await get_chat_suggestions(uid, [], 'coi_7b65b783af38b91c8ec4c499d3694bab');
4787
+ ret = await get_chat_suggestions(uid, [], 'coi_7b65b783af38b91c8ec4c499d3694bab');
4789
4788
  // ret = await get_active_account_profile_info(uid);
4790
4789
  // ret = await is_spam_email(uid, 'dsgr8-2994400420@gigs.craigslist.org', 'To: You, From: Us - 70% Off Stickers & Labels Today Only');
4791
4790
  // ret = await is_spam_email(uid, 'noreply@tm.openai.com', 'Please update your Plus payment method', account_profile_info);
@@ -10901,18 +10900,31 @@ export const get_chat_suggestions = async function (uid, ai_agents, conversation
10901
10900
  uid,
10902
10901
  prompt: `
10903
10902
 
10904
- Role: You are a routing assistant.
10903
+ Role: You are an expert Routing Assistant specialized in connecting users with the most relevant specialized AI agents.
10904
+
10905
+ Task: Select exactly 5 agents from the ## Agent List that are best suited to act upon or refine the current conversation state.
10906
+
10907
+ Selection Strategy:
10908
+
10909
+ Format Compatibility: Analyze the ## Prompt Response. If it contains code, data structures, or specific document types (like HTML), prioritize agents whose agent_instructions or agent_name involve processing, transforming, or styling that specific format.
10905
10910
 
10906
- Task: Analyze the provided user context and select the 5 most relevant agents from the ## Agent List.
10911
+ Workflow Continuity: Choose agents that represent a logical "next step" in a development or content creation pipeline (e.g., if code was generated, suggest an agent that deploys, converts, or styles it).
10907
10912
 
10908
- Selection Logic:
10909
- Base your selection on the alignment between the agent's purpose and the following context:
10913
+ Contextual Relevance: Balance the selection with the ## User Info and ## Prompt Category to ensure the agents match the user's industry and intent.
10914
+
10915
+ Input Context:
10910
10916
 
10911
10917
  User Profile: ${JSON.stringify(account_doc.account_info)}
10912
10918
 
10913
- Recent Interaction: The user asked ${conversation_item_doc.prompt || conversation_doc.prompt}, categorized as ${conversation_doc?.category_info?.category}, which resulted in the response: ${conversation_item_doc.text}.
10919
+ Prompt Category: ${conversation_doc?.category_info?.category}
10920
+
10921
+ Current State:
10922
+
10923
+ Input: ${conversation_item_doc.prompt || conversation_doc.prompt}
10924
+
10925
+ Output to Process: ${conversation_item_doc.text}
10914
10926
 
10915
- Data Source: > ${JSON.stringify(agents_docs)}
10927
+ Agent Source: ${JSON.stringify(agents_docs)}
10916
10928
 
10917
10929
  Output: > Return a JSON array of exactly 5 objects following this schema:
10918
10930
  [{ "agent_id": "string", "short_action": "string", "agent_description": "string" }]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.5129",
3
+ "version": "1.1.5131",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",