@xuda.io/ai_module 1.1.5327 → 1.1.5329

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 -6
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -4180,7 +4180,7 @@ const ai_chat_conversation = async function (req, job_id, headers) {
4180
4180
 
4181
4181
  emitToDashboard('stream_start');
4182
4182
 
4183
- emitToDashboard('stream_phase', 'initiating conversation');
4183
+ emitToDashboard('stream_phase', 'Initiating conversation');
4184
4184
  let prompt_suggestions = [];
4185
4185
  let prompt_selected_suggestion;
4186
4186
 
@@ -4224,7 +4224,8 @@ const ai_chat_conversation = async function (req, job_id, headers) {
4224
4224
  conversation_doc.job_id = job_id;
4225
4225
  await db_module.save_app_couch_doc_native(account_profile_info.app_id, conversation_doc);
4226
4226
 
4227
- await update_job('analyzing request');
4227
+ // await update_job('analyzing request');
4228
+ emitToDashboard('stream_phase', 'Analyzing request');
4228
4229
 
4229
4230
  const init_agent_hooks = function (agent) {
4230
4231
  agent.on('agent_start', (context, agent) => {
@@ -4780,12 +4781,14 @@ const ai_chat_conversation = async function (req, job_id, headers) {
4780
4781
  const runner = new Runner();
4781
4782
  let _agent = [];
4782
4783
 
4783
- await update_job('preparing tools');
4784
+ // await update_job('preparing tools');
4785
+ emitToDashboard('stream_phase', 'Preparing tools');
4784
4786
  let agents = await get_agents();
4785
4787
 
4786
4788
  /////////////
4787
4789
  if (attachments?.length) {
4788
- await update_job('analyzing attachments');
4790
+ // await update_job('analyzing attachments');
4791
+ emitToDashboard('stream_phase', 'Analyzing attachments');
4789
4792
  await attachment_handler(uid, app_id, conversation_id, attachments, account_profile_info);
4790
4793
  }
4791
4794
  ////////////
@@ -4834,7 +4837,8 @@ const ai_chat_conversation = async function (req, job_id, headers) {
4834
4837
  stream,
4835
4838
  };
4836
4839
 
4837
- await update_job('submitting chat');
4840
+ // await update_job('submitting chat');
4841
+ emitToDashboard('stream_phase', 'Submitting chat');
4838
4842
  init_agent_hooks(_agent);
4839
4843
  // const output = await runner.run(_agent, prompt, opt);
4840
4844
  const output = await run_agent(_agent, prompt, opt);
@@ -4938,7 +4942,8 @@ const ai_chat_conversation = async function (req, job_id, headers) {
4938
4942
  if (!response_start) {
4939
4943
  response_start = true;
4940
4944
 
4941
- await update_job('streaming results');
4945
+ // await update_job('streaming results');
4946
+ emitToDashboard('stream_phase', 'Streaming results');
4942
4947
  emitToDashboard('response_start');
4943
4948
  }
4944
4949
  const text = chunk.toString();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.5327",
3
+ "version": "1.1.5329",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",