mirror of
https://github.com/hexastack/hexabot
synced 2025-06-26 18:27:28 +00:00
fix(api): add support to llm-nlu helper
This commit is contained in:
parent
78c0b05021
commit
26166e05e4
@ -38,6 +38,7 @@ export class AttachmentModule implements OnApplicationBootstrap {
|
||||
if (!AppInstance.isReady()) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Ensure the directories exists
|
||||
if (!existsSync(config.parameters.uploadDir)) {
|
||||
mkdirSync(config.parameters.uploadDir, { recursive: true });
|
||||
|
@ -28,6 +28,7 @@ export class ExtensionModule implements OnApplicationBootstrap {
|
||||
if (!AppInstance.isReady()) {
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
await this.cleanupService.pruneExtensionSettings();
|
||||
} catch (error) {
|
||||
|
@ -10,6 +10,7 @@ import { Injectable, OnApplicationBootstrap } from '@nestjs/common';
|
||||
import { OnEvent } from '@nestjs/event-emitter';
|
||||
import Handlebars from 'handlebars';
|
||||
|
||||
import { AppInstance } from '@/app.instance';
|
||||
import { HelperService } from '@/helper/helper.service';
|
||||
import BaseNlpHelper from '@/helper/lib/base-nlp-helper';
|
||||
import { HelperType, LLM, NLU } from '@/helper/types';
|
||||
@ -89,6 +90,10 @@ export default class LlmNluHelper
|
||||
}
|
||||
|
||||
async onApplicationBootstrap() {
|
||||
if (!AppInstance.isReady()) {
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
this.logger.log('Initializing LLM NLU helper, building prompts...');
|
||||
// Build prompts for language and trait classifiers
|
||||
|
Loading…
Reference in New Issue
Block a user