@xuda.io/ai_module 1.1.5140 → 1.1.5141

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 +10 -4
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -4092,9 +4092,9 @@ const ai_chat_conversation = async function (req, job_id, headers) {
4092
4092
  });
4093
4093
  };
4094
4094
 
4095
- const generate_XU_markdown = async function (type, data) {
4096
- return `XU>${job_id}{type:"${type}",data:${JSON.stringify(data)}}${job_id}<XU`;
4097
- };
4095
+ // const generate_XU_markdown = async function (type, data) {
4096
+ // return `XU>${job_id}{type:"${type}",data:${JSON.stringify(data)}}${job_id}<XU`;
4097
+ // };
4098
4098
 
4099
4099
  const contactGuardrail = {
4100
4100
  name: 'Contact Guardrail',
@@ -4638,6 +4638,11 @@ const ai_chat_conversation = async function (req, job_id, headers) {
4638
4638
  } catch (err) {}
4639
4639
  };
4640
4640
 
4641
+ const render_suggestions = async function () {
4642
+ for (const suggestion of prompt_suggestions) {
4643
+ emitToDashboard('stream_delta', `${suggestion.short_action}`);
4644
+ }
4645
+ };
4641
4646
  // try {
4642
4647
  const runner = new Runner();
4643
4648
  let _agent = [];
@@ -4656,6 +4661,7 @@ const ai_chat_conversation = async function (req, job_id, headers) {
4656
4661
  }
4657
4662
 
4658
4663
  if (prompt_suggestions.length) {
4664
+ await render_suggestions();
4659
4665
  }
4660
4666
  ///////////
4661
4667
 
@@ -4669,7 +4675,7 @@ const ai_chat_conversation = async function (req, job_id, headers) {
4669
4675
  name: 'Triage Agent',
4670
4676
  instructions: get_agent_instructions(),
4671
4677
  // inputGuardrails: [contactGuardrail],
4672
- outputGuardrails: [contactGuardrail],
4678
+ // outputGuardrails: [contactGuardrail],
4673
4679
  model,
4674
4680
  handoffs: agents, // this lets triageAgent forward to other agents
4675
4681
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.5140",
3
+ "version": "1.1.5141",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",