@xuda.io/ai_module 1.1.5255 → 1.1.5256

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 +11 -18
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -11032,7 +11032,8 @@ export const open_ai_alive_check = async function () {};
11032
11032
  // };
11033
11033
 
11034
11034
  export const get_chat_suggestions = async function (req) {
11035
- const { type = 'chat prompt', uid, conversation_item_id, no_of_suggestions = 3, ai_model = _conf.default_ai_model, context, exclude_agents = [] } = req;
11035
+ //type = 'chat prompt'
11036
+ const { type = 'chat response', uid, conversation_item_id, no_of_suggestions = 3, ai_model = _conf.default_ai_model, context, exclude_agents = [] } = req;
11036
11037
  let { ai_agents = [] } = req;
11037
11038
 
11038
11039
  try {
@@ -11120,41 +11121,33 @@ export const get_chat_suggestions = async function (req) {
11120
11121
  //${conversation_item_doc.text}
11121
11122
  // Prompt Category: ${conversation_doc?.category_info?.category}
11122
11123
  // Input: ${conversation_item_doc.prompt || conversation_doc.prompt}
11124
+ // 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 or agent instructions involve processing, transforming, or styling that specific format.
11125
+
11126
+ // 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).
11127
+
11128
+ // Contextual Relevance: Balance the selection with the ## User Info and ## Prompt Category to ensure the agents match the user's industry and intent.
11123
11129
 
11124
11130
  const prompt = `
11125
11131
 
11126
11132
  Role: You are an expert Routing Assistant specialized in connecting users with the most relevant specialized AI agents.
11127
-
11128
11133
  Task: Select maximum ${no_of_suggestions} agents from the ## Agent List that are best suited to act upon or refine the current conversation state.
11129
11134
 
11130
-
11131
11135
  Selection Strategy:
11132
- 1. Format Compatibility: Analyze the ## Output to Process. If it contains structured JSON, component definitions, or raw HTML, prioritize agents capable of transforming these formats (e.g., converting HTML/JSON to functional apps).
11136
+ 1. Format Compatibility: Analyze the ## ${type} to Process. If it contains structured JSON, component definitions, or raw HTML, prioritize agents capable of transforming these formats (e.g., converting HTML/JSON to functional apps).
11133
11137
  2. Workflow Continuity: Focus on the "Lifecycle" of the project. If a UI or content has been drafted, the logical next step is conversion to a production-ready format, styling, or deployment.
11134
11138
  3. Explicit Intent: If the user’s original input was "make me a website" and the current state is a document definition, prioritize the agent that performs the final "Conversion" or "Building" step.
11135
11139
  4. Contextual Relevance: Match the user's business profile (Digital Marketing & Web Development) with technical agents that automate development tasks.
11136
11140
 
11137
11141
 
11138
-
11139
-
11140
- 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 or agent instructions involve processing, transforming, or styling that specific format.
11141
-
11142
- 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).
11143
-
11144
- Contextual Relevance: Balance the selection with the ## User Info and ## Prompt Category to ensure the agents match the user's industry and intent.
11145
-
11142
+ ## ${type}: ${context ? context : 'Use the previous response output as the content to analyze for next agents.'}
11143
+
11146
11144
  Input Context:
11147
11145
 
11148
11146
  User Profile: ${JSON.stringify(account_doc.account_info)}
11149
11147
  Prompt Category: ${conversation_doc?.category_info?.category}
11150
11148
  Input: ${conversation_item_doc.prompt || conversation_doc.prompt}
11151
11149
 
11152
- Current State:
11153
-
11154
-
11155
-
11156
- Output to Process: ${context ? context : 'Use the previous response output as the content to analyze for next agents.'}
11157
-
11150
+
11158
11151
  Agent Source: ${JSON.stringify(agents_docs)}
11159
11152
 
11160
11153
  Output: > Return a JSON array of maximum ${no_of_suggestions} objects following this schema:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.5255",
3
+ "version": "1.1.5256",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",