new(azuredeployer.gbapp): NLP automation for entities.

This commit is contained in:
Rodrigo Rodriguez 2020-10-08 11:51:02 -03:00
parent c01430f0f3
commit 115c8a4f90

View file

@ -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' },