@xuda.io/ai_module 1.1.5266 → 1.1.5268

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 -7
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -11135,7 +11135,7 @@ export const get_chat_suggestions = async function (req) {
11135
11135
  // 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.
11136
11136
 
11137
11137
  // 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).
11138
-
11138
+ // Input: ${conversation_item_doc.prompt || conversation_doc.prompt}
11139
11139
  // Contextual Relevance: Balance the selection with the ## User Info and ## Prompt Category to ensure the agents match the user's industry and intent.
11140
11140
  debugger;
11141
11141
  const prompt = `
@@ -11155,9 +11155,7 @@ export const get_chat_suggestions = async function (req) {
11155
11155
  Input Context:
11156
11156
 
11157
11157
  User Profile: ${JSON.stringify(account_doc.account_info)}
11158
- Prompt Category: ${conversation_doc?.category_info?.category}
11159
- Input: ${conversation_item_doc.prompt || conversation_doc.prompt}
11160
-
11158
+ Prompt Category: ${conversation_doc?.category_info?.category}
11161
11159
 
11162
11160
  Agent Source: ${JSON.stringify(agents_docs)}
11163
11161
 
@@ -11169,15 +11167,21 @@ export const get_chat_suggestions = async function (req) {
11169
11167
 
11170
11168
  `;
11171
11169
 
11172
- const chat_ret = await submit_chat_gpt_prompt({
11170
+ let opt = {
11173
11171
  uid,
11174
11172
  prompt,
11175
11173
  model: ai_model,
11176
11174
  response_format: AgentResponseSchema,
11177
11175
  metadata: { conversation_item_id, func: 'get_chat_suggestions' },
11178
11176
  account_profile_info,
11179
- response_id: conversation_item_doc.conversation_item_reference_id,
11180
- });
11177
+
11178
+ };
11179
+
11180
+ if(!context && conversation_item_doc?.conversation_item_reference_id){
11181
+ opt.response_id= conversation_item_doc.conversation_item_reference_id,
11182
+ }
11183
+
11184
+ const chat_ret = await submit_chat_gpt_prompt(opt);
11181
11185
  try {
11182
11186
  const ret = JSON5.parse(chat_ret.data);
11183
11187
  return ret.agents;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.5266",
3
+ "version": "1.1.5268",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",