mirror of
https://github.com/hexastack/hexabot
synced 2025-01-23 02:47:56 +00:00
fix: nlu helper init
This commit is contained in:
parent
d089506579
commit
54d84f684e
@ -6,7 +6,7 @@
|
||||
* 2. All derivative works must include clear attribution to the original creator and software, Hexastack and Hexabot, in a prominent location (e.g., in the software's "About" section, documentation, and README file).
|
||||
*/
|
||||
|
||||
import { Injectable } from '@nestjs/common';
|
||||
import { Injectable, OnApplicationBootstrap } from '@nestjs/common';
|
||||
import { OnEvent } from '@nestjs/event-emitter';
|
||||
|
||||
import { LoggerService } from '@/logger/logger.service';
|
||||
@ -20,7 +20,7 @@ import { NlpEntity } from '../schemas/nlp-entity.schema';
|
||||
import { NlpValue } from '../schemas/nlp-value.schema';
|
||||
|
||||
@Injectable()
|
||||
export class NlpService {
|
||||
export class NlpService implements OnApplicationBootstrap {
|
||||
private registry: Map<string, BaseNlpHelper> = new Map();
|
||||
|
||||
private nlp: BaseNlpHelper;
|
||||
@ -31,7 +31,9 @@ export class NlpService {
|
||||
protected readonly nlpSampleService: NlpSampleService,
|
||||
protected readonly nlpEntityService: NlpEntityService,
|
||||
protected readonly nlpValueService: NlpValueService,
|
||||
) {
|
||||
) {}
|
||||
|
||||
onApplicationBootstrap() {
|
||||
this.initNLP();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user