From 115c8a4f90996590801f486724e01db13ce5cb80 Mon Sep 17 00:00:00 2001 From: Rodrigo Rodriguez Date: Thu, 8 Oct 2020 11:51:02 -0300 Subject: [PATCH] new(azuredeployer.gbapp): NLP automation for entities. --- .../services/AzureDeployerService.ts | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/packages/azuredeployer.gbapp/services/AzureDeployerService.ts b/packages/azuredeployer.gbapp/services/AzureDeployerService.ts index cf1db6dc..1ef55c22 100644 --- a/packages/azuredeployer.gbapp/services/AzureDeployerService.ts +++ b/packages/azuredeployer.gbapp/services/AzureDeployerService.ts @@ -690,6 +690,25 @@ export class AzureDeployerService implements IGBInstallationDeployer { return await httpClient.sendRequest(req); } + private async refreshEntityList( + location: string, + nlpAppId: string, + clEntityId: string, + data: any, + ) { + + const req = new WebResource(); + req.method = 'PUT'; + req.url = `https://${location}.api.cognitive.microsoft.com/luis/api/v2.0/${nlpAppId}/closedlists/${clEntityId}`; + req.headers.set('Content-Type', 'application/json'); + req.headers.set('accept-language', '*'); + req.headers.set('Ocp-Apim-Subscription-Key', authoringKey); + req.body = data; + const httpClient = new ServiceClient(); + + return await httpClient.sendRequest(req); + } + private async createSearch(group, name, location) { const params = { sku: { name: 'free' },