new(whatsapp.gblib): New provider.
This commit is contained in:
parent
49056e9f76
commit
78107274d0
2 changed files with 9 additions and 7 deletions
|
@ -735,12 +735,15 @@ export class KBService implements IGBKBService {
|
||||||
await CollectionUtil.asyncForEach(questions, async question => {
|
await CollectionUtil.asyncForEach(questions, async question => {
|
||||||
const text = question.content;
|
const text = question.content;
|
||||||
|
|
||||||
let category = /.*\((.*)\).*/gi.exec(text)[1];
|
const categoryReg = /.*\((.*)\).*/gi.exec(text);
|
||||||
let name =/(\w+)\(.*\).*/gi.exec(text)[1];
|
const nameReg = /(\w+)\(.*\).*/gi.exec(text);
|
||||||
|
|
||||||
|
if (categoryReg && nameReg) {
|
||||||
|
let category = [1];
|
||||||
|
let name = [1];
|
||||||
min["nerEngine"].addNamedEntityText(category, name,
|
min["nerEngine"].addNamedEntityText(category, name,
|
||||||
[contentLocale], [name]);
|
[contentLocale], [name]);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -133,7 +133,6 @@ export class WhatsappDirectLine extends GBService {
|
||||||
let productId = this.whatsappServiceNumber.split(';')[1]
|
let productId = this.whatsappServiceNumber.split(';')[1]
|
||||||
|
|
||||||
let url = `${this.INSTANCE_URL}/${productId}/setWebhook`;
|
let url = `${this.INSTANCE_URL}/${productId}/setWebhook`;
|
||||||
let webhook = `${GBServer.globals.publicAddress}/webhooks/whatsapp`;
|
|
||||||
WhatsappDirectLine.phones[phoneId] = this.botId;
|
WhatsappDirectLine.phones[phoneId] = this.botId;
|
||||||
|
|
||||||
options = {
|
options = {
|
||||||
|
|
Loading…
Add table
Reference in a new issue