Skip to content

Commit

Permalink
new(core.gbapp): LLM alerts for data.
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigorodriguez committed Oct 17, 2024
1 parent c41d6bf commit efeb754
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions packages/core.gbapp/services/GBMinService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
{
userSystemId: user.userSystemId,
userName: user.userName,
pid: pid
}

const response = await client.apis.Conversations.Conversations_StartConversation();
);
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,
Expand All @@ -225,8 +232,10 @@ export class GBMinService {
type: 'message',
from: {
id: 'test',
name: 'test'
}
name: 'test',
channelIdEx: 'web',
pid: pid
},
}
});

Expand Down

0 comments on commit efeb754

Please sign in to comment.