@xuda.io/ai_module 1.1.5400 → 1.1.5402
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.
- package/index.mjs +7 -8
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -4246,11 +4246,14 @@ const ai_chat_conversation = async function (req, job_id, headers) {
|
|
|
4246
4246
|
});
|
|
4247
4247
|
|
|
4248
4248
|
agent.on('agent_tool_start', (context, tool, details) => {
|
|
4249
|
-
|
|
4249
|
+
debugger;
|
|
4250
|
+
// emitToDashboard('agent_tool_start', tool.name);
|
|
4251
|
+
emitToDashboard('stream_phase', `Starting ${tool.name} tool`);
|
|
4250
4252
|
});
|
|
4251
4253
|
|
|
4252
4254
|
agent.on('agent_tool_end', (context, tool, result, details) => {
|
|
4253
|
-
|
|
4255
|
+
// debugger;
|
|
4256
|
+
// emitToDashboard('agent_tool_end', tool.name);
|
|
4254
4257
|
});
|
|
4255
4258
|
};
|
|
4256
4259
|
const get_agent_instructions = function (is_agent) {
|
|
@@ -4520,16 +4523,12 @@ const ai_chat_conversation = async function (req, job_id, headers) {
|
|
|
4520
4523
|
async execute(e, RunContext) {
|
|
4521
4524
|
debugger;
|
|
4522
4525
|
const { prompt, numGenerations } = e;
|
|
4523
|
-
|
|
4526
|
+
|
|
4524
4527
|
try {
|
|
4525
4528
|
let imgTags = '';
|
|
4526
4529
|
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
|
-
|
|
4531
4530
|
for (const img_obj of images_arr) {
|
|
4532
|
-
imgTags +=
|
|
4531
|
+
imgTags += `<img src="${img_obj.file_url}" alt="${prompt}" style="max-width: 100%; border-radius: 8px;" />`;
|
|
4533
4532
|
}
|
|
4534
4533
|
|
|
4535
4534
|
return imgTags;
|