From efeb75410a5cee17de10d40c6d50f8606c56d36c Mon Sep 17 00:00:00 2001 From: "me@rodrigorodriguez.com" Date: Thu, 17 Oct 2024 09:07:41 -0300 Subject: [PATCH] new(core.gbapp): LLM alerts for data. --- packages/core.gbapp/services/GBMinService.ts | 21 ++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/packages/core.gbapp/services/GBMinService.ts b/packages/core.gbapp/services/GBMinService.ts index e8a242eb..8f345f51 100644 --- a/packages/core.gbapp/services/GBMinService.ts +++ b/packages/core.gbapp/services/GBMinService.ts @@ -205,16 +205,23 @@ export class GBMinService { GBLogEx.info(min, `Starting auto test with '${process.env.TEST_MESSAGE}'.`); const client = await GBUtil.getDirectLineClient(min); + const sec = new SecService(); + const user = await sec.ensureUser(min, 'testuser', 'testuser', '', 'test', 'testuser', null); + const pid = GBVMService.createProcessInfo(user, min, 'api', null); - const response = await client.apis.Conversations.Conversations_StartConversation(); + const response = await client.apis.Conversations.Conversations_StartConversation( + { + userSystemId: user.userSystemId, + userName: user.userName, + pid: pid + } + + ); const conversationId = response.obj.conversationId; GBServer.globals.debugConversationId = conversationId; const steps = process.env.TEST_MESSAGE.split(';'); - const sec = new SecService(); - const user = await sec.ensureUser(min, 'testuser', 'testuser', '', 'test', 'testuser', null); - const pid = GBVMService.createProcessInfo(user, min, 'api', null); await CollectionUtil.asyncForEach(steps, async step => { client.apis.Conversations.Conversations_PostActivity({ conversationId: conversationId, @@ -225,8 +232,10 @@ export class GBMinService { type: 'message', from: { id: 'test', - name: 'test' - } + name: 'test', + channelIdEx: 'web', + pid: pid + }, } });