mirror of
https://github.com/hexastack/hexabot
synced 2025-06-26 18:27:28 +00:00
fix: restore old files
This commit is contained in:
parent
68835bd306
commit
808f33b5a1
@ -200,16 +200,15 @@ export class BlockService extends BaseService<
|
||||
// This ensures that only blocks with valid matches are kept, and blocks with no matches are excluded,
|
||||
// all while iterating through the list only once.
|
||||
|
||||
const matchesWithPatterns = filteredBlocks.reduce<
|
||||
NlpPatternMatchResult[]
|
||||
>((acc, b) => {
|
||||
const matchedPattern = this.matchNLP(nlp, b);
|
||||
const matchesWithPatterns: NlpPatternMatchResult[] =
|
||||
filteredBlocks.reduce<NlpPatternMatchResult[]>((acc, b) => {
|
||||
const matchedPattern = this.matchNLP(nlp, b);
|
||||
|
||||
if (matchedPattern && matchedPattern.length > 0) {
|
||||
acc.push({ block: b, matchedPattern });
|
||||
}
|
||||
return acc;
|
||||
}, []);
|
||||
if (matchedPattern && matchedPattern.length > 0) {
|
||||
acc.push({ block: b, matchedPattern });
|
||||
}
|
||||
return acc;
|
||||
}, []);
|
||||
|
||||
// Log the matched patterns
|
||||
this.logger.debug(
|
||||
|
@ -31,7 +31,6 @@ import { NlpSampleService } from './services/nlp-sample.service';
|
||||
import { NlpValueService } from './services/nlp-value.service';
|
||||
import { NlpService } from './services/nlp.service';
|
||||
|
||||
// @Global()
|
||||
@Module({
|
||||
imports: [
|
||||
MongooseModule.forFeature([
|
||||
|
Loading…
Reference in New Issue
Block a user