@xuda.io/ai_module 1.1.5398 → 1.1.5400

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 +9 -3
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -4524,8 +4524,12 @@ const ai_chat_conversation = async function (req, job_id, headers) {
4524
4524
  try {
4525
4525
  let imgTags = '';
4526
4526
  const images_arr = await create_and_upload_image_to_drive('workspace', 'Chat Images', agent_id, prompt, numGenerations, uid, account_profile_info.app_id, job_id, headers, null, null, account_profile_info);
4527
+ // for (const img_obj of images_arr) {
4528
+ // imgTags += `<img src="${img_obj.file_url}" alt="${prompt}" style="max-width: 100%; border-radius: 8px;" />`;
4529
+ // }
4530
+
4527
4531
  for (const img_obj of images_arr) {
4528
- imgTags += `<img src="${img_obj.file_url}" alt="${prompt}" style="max-width: 100%; border-radius: 8px;" />`;
4532
+ imgTags += `![${prompt}](${img_obj.file_url})\n\n`;
4529
4533
  }
4530
4534
 
4531
4535
  return imgTags;
@@ -4708,10 +4712,12 @@ const ai_chat_conversation = async function (req, job_id, headers) {
4708
4712
  modelSettings,
4709
4713
  hooks: {
4710
4714
  onToolStart(context, tool, details) {
4711
- emitToDashboard('agent_tool_start', tool.name);
4715
+ console.log('onToolStart', context, tool, details);
4716
+ // emitToDashboard('agent_tool_start', tool.name);
4712
4717
  },
4713
4718
  onToolEnd(context, tool, result, details) {
4714
- emitToDashboard('agent_tool_end', tool.name);
4719
+ console.log('onToolEnd', context, tool, details);
4720
+ // emitToDashboard('agent_tool_end', tool.name);
4715
4721
  },
4716
4722
  },
4717
4723
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.5398",
3
+ "version": "1.1.5400",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",