@xuda.io/ai_module 1.1.5234 → 1.1.5236

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 -3
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -11069,6 +11069,10 @@ export const get_chat_suggestions = async function (req) {
11069
11069
  ai_agent_doc = await db_module.get_app_couch_doc_native(account_profile_info.app_id, ai_agent_doc.studio_meta.share_item_id);
11070
11070
  ai_agent_doc.reference_doc = reference_doc;
11071
11071
  }
11072
+ let skip = false;
11073
+ for (const [key, val] of Object.entries(ai_agent_doc?.agentConfig?.agent_tools || [])) {
11074
+ }
11075
+
11072
11076
  list.push({ agent_id, agent_name: ai_agent_doc.properties.menuName, agent_category: ai_agent_doc.studio_meta.agent_category, agent_industry: ai_agent_doc.studio_meta.agent_industry, agent_instructions: ai_agent_doc?.agentConfig?.agent_instructions });
11073
11077
  } catch (err) {
11074
11078
  throw new Error(err.message);
@@ -11091,7 +11095,7 @@ export const get_chat_suggestions = async function (req) {
11091
11095
 
11092
11096
  // Define the response format as a fixed-length array of 5
11093
11097
  const AgentResponseSchema = z.object({
11094
- agents: z.array(AgentItemSchema).length(no_of_suggestions),
11098
+ agents: z.array(AgentSchema).max(no_of_suggestions),
11095
11099
  });
11096
11100
  //${conversation_item_doc.text}
11097
11101
  const chat_ret = await submit_chat_gpt_prompt({
@@ -11100,7 +11104,7 @@ export const get_chat_suggestions = async function (req) {
11100
11104
 
11101
11105
  Role: You are an expert Routing Assistant specialized in connecting users with the most relevant specialized AI agents.
11102
11106
 
11103
- Task: Select exactly ${no_of_suggestions} agents from the ## Agent List that are best suited to act upon or refine the current conversation state.
11107
+ Task: Select maximum ${no_of_suggestions} agents from the ## Agent List that are best suited to act upon or refine the current conversation state.
11104
11108
 
11105
11109
  Selection Strategy:
11106
11110
 
@@ -11124,7 +11128,7 @@ export const get_chat_suggestions = async function (req) {
11124
11128
 
11125
11129
  Agent Source: ${JSON.stringify(agents_docs)}
11126
11130
 
11127
- Output: > Return a JSON array of exactly ${no_of_suggestions} objects following this schema:
11131
+ Output: > Return a JSON array of maximum ${no_of_suggestions} objects following this schema:
11128
11132
  [{ "type":"string","agent_id": "string", "short_action": "string", "agent_description": "string" }]
11129
11133
 
11130
11134
  ## output example:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.5234",
3
+ "version": "1.1.5236",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",