mirror of
https://github.com/hexastack/hexabot
synced 2025-06-26 18:27:28 +00:00
fix: retailor log messages
This commit is contained in:
parent
4c9f7b470f
commit
384e777fa4
@ -491,7 +491,12 @@ export class BlockService extends BaseService<
|
||||
*/
|
||||
async getDefaultNluPenaltyFactor(): Promise<number> {
|
||||
const settings: Settings = await this.settingService.getSettings();
|
||||
return settings.chatbot_settings.default_nlu_penalty_factor;
|
||||
const nluPenaltyFactor =
|
||||
settings.chatbot_settings.default_nlu_penalty_factor;
|
||||
if (nluPenaltyFactor < 0 || nluPenaltyFactor > 1) {
|
||||
this.logger.error('NLU Penalty Factor must be between 0 and 1');
|
||||
}
|
||||
return nluPenaltyFactor;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -52,7 +52,7 @@ const removeDefaultNluPenaltyFactor = async ({ logger }: MigrationServices) => {
|
||||
});
|
||||
logger.log('Successfuly removed the default NLU penalty factor setting');
|
||||
} catch (err) {
|
||||
logger.error('Unable to remove the default local storage helper setting');
|
||||
logger.error('Unable to remove the default NLU penalty factor setting');
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user