@xuda.io/ai_module 1.1.5140 → 1.1.5142

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 +12 -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,13 @@ 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
+ };
4646
+
4647
+ debugger;
4641
4648
  // try {
4642
4649
  const runner = new Runner();
4643
4650
  let _agent = [];
@@ -4656,6 +4663,7 @@ const ai_chat_conversation = async function (req, job_id, headers) {
4656
4663
  }
4657
4664
 
4658
4665
  if (prompt_suggestions.length) {
4666
+ await render_suggestions();
4659
4667
  }
4660
4668
  ///////////
4661
4669
 
@@ -4669,7 +4677,7 @@ const ai_chat_conversation = async function (req, job_id, headers) {
4669
4677
  name: 'Triage Agent',
4670
4678
  instructions: get_agent_instructions(),
4671
4679
  // inputGuardrails: [contactGuardrail],
4672
- outputGuardrails: [contactGuardrail],
4680
+ // outputGuardrails: [contactGuardrail],
4673
4681
  model,
4674
4682
  handoffs: agents, // this lets triageAgent forward to other agents
4675
4683
  });
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.5142",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",