fix: restore matchNLP function previous code

This commit is contained in:
MohamedAliBouhaouala 2025-04-23 18:15:16 +01:00
parent 07a2b9c4d1
commit 35505294fa

View File

@ -355,7 +355,7 @@ export class BlockService extends BaseService<
return undefined;
}
// Find NLP pattern match based on best guessed entities
const pattern = nlpPatterns.find((entities: NlpPattern[]) => {
return nlpPatterns.find((entities: NlpPattern[]) => {
return entities.every((ev: NlpPattern) => {
if (ev.match === 'value') {
return nlp.entities.find((e) => {
@ -371,7 +371,6 @@ export class BlockService extends BaseService<
}
});
});
return pattern;
}
/**