Skip to content

Commit 65b443f

Browse files
author
MohamedAliBouhaouala
committed
fix: restore old files
1 parent 2ce1795 commit 65b443f

File tree

2 files changed

+8
-10
lines changed

2 files changed

+8
-10
lines changed

api/src/chat/services/block.service.ts

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -200,16 +200,15 @@ export class BlockService extends BaseService<
200200
// This ensures that only blocks with valid matches are kept, and blocks with no matches are excluded,
201201
// all while iterating through the list only once.
202202

203-
const matchesWithPatterns = filteredBlocks.reduce<
204-
NlpPatternMatchResult[]
205-
>((acc, b) => {
206-
const matchedPattern = this.matchNLP(nlp, b);
203+
const matchesWithPatterns: NlpPatternMatchResult[] =
204+
filteredBlocks.reduce<NlpPatternMatchResult[]>((acc, b) => {
205+
const matchedPattern = this.matchNLP(nlp, b);
207206

208-
if (matchedPattern && matchedPattern.length > 0) {
209-
acc.push({ block: b, matchedPattern });
210-
}
211-
return acc;
212-
}, []);
207+
if (matchedPattern && matchedPattern.length > 0) {
208+
acc.push({ block: b, matchedPattern });
209+
}
210+
return acc;
211+
}, []);
213212

214213
// Log the matched patterns
215214
this.logger.debug(

api/src/nlp/nlp.module.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ import { NlpSampleService } from './services/nlp-sample.service';
3131
import { NlpValueService } from './services/nlp-value.service';
3232
import { NlpService } from './services/nlp.service';
3333

34-
// @Global()
3534
@Module({
3635
imports: [
3736
MongooseModule.forFeature([

0 commit comments

Comments
 (0)