@xuda.io/ai_module 1.1.5131 → 1.1.5132

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 +3 -3
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -10834,7 +10834,7 @@ export const open_ai_alive_check = async function () {};
10834
10834
  // return account_profile_info;
10835
10835
  // };
10836
10836
 
10837
- export const get_chat_suggestions = async function (uid, ai_agents, conversation_item_id, ai_model = _conf.default_ai_model) {
10837
+ export const get_chat_suggestions = async function (uid, ai_agents, conversation_item_id, no_of_suggesstions = 3, ai_model = _conf.default_ai_model) {
10838
10838
  try {
10839
10839
  const account_profile_info = await get_active_account_profile_info(uid);
10840
10840
  const account_doc = await db_module.get_couch_doc_native('xuda_accounts', uid);
@@ -10893,7 +10893,7 @@ export const get_chat_suggestions = async function (uid, ai_agents, conversation
10893
10893
 
10894
10894
  // Define the response format as a fixed-length array of 5
10895
10895
  const AgentResponseSchema = z.object({
10896
- agents: z.array(AgentItemSchema).length(5),
10896
+ agents: z.array(AgentItemSchema).length(no_of_suggesstions),
10897
10897
  });
10898
10898
 
10899
10899
  const chat_ret = await submit_chat_gpt_prompt({
@@ -10902,7 +10902,7 @@ export const get_chat_suggestions = async function (uid, ai_agents, conversation
10902
10902
 
10903
10903
  Role: You are an expert Routing Assistant specialized in connecting users with the most relevant specialized AI agents.
10904
10904
 
10905
- Task: Select exactly 5 agents from the ## Agent List that are best suited to act upon or refine the current conversation state.
10905
+ Task: Select exactly ${no_of_suggesstions} agents from the ## Agent List that are best suited to act upon or refine the current conversation state.
10906
10906
 
10907
10907
  Selection Strategy:
10908
10908
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.5131",
3
+ "version": "1.1.5132",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",