@xuda.io/ai_module 1.1.5396 → 1.1.5398
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 +9 -0
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -4520,6 +4520,7 @@ const ai_chat_conversation = async function (req, job_id, headers) {
|
|
|
4520
4520
|
async execute(e, RunContext) {
|
|
4521
4521
|
debugger;
|
|
4522
4522
|
const { prompt, numGenerations } = e;
|
|
4523
|
+
emitToDashboard('stream_phase', 'Starting image tool');
|
|
4523
4524
|
try {
|
|
4524
4525
|
let imgTags = '';
|
|
4525
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);
|
|
@@ -4705,6 +4706,14 @@ const ai_chat_conversation = async function (req, job_id, headers) {
|
|
|
4705
4706
|
},
|
|
4706
4707
|
tool_resources,
|
|
4707
4708
|
modelSettings,
|
|
4709
|
+
hooks: {
|
|
4710
|
+
onToolStart(context, tool, details) {
|
|
4711
|
+
emitToDashboard('agent_tool_start', tool.name);
|
|
4712
|
+
},
|
|
4713
|
+
onToolEnd(context, tool, result, details) {
|
|
4714
|
+
emitToDashboard('agent_tool_end', tool.name);
|
|
4715
|
+
},
|
|
4716
|
+
},
|
|
4708
4717
|
});
|
|
4709
4718
|
|
|
4710
4719
|
if (eligible_agent) {
|