mirror of
https://github.com/hexastack/hexabot
synced 2025-06-26 18:27:28 +00:00
fix: improve variable naming for NLU penalty factor
This commit is contained in:
parent
28ef0ca65b
commit
b8b961c94d
@ -117,14 +117,15 @@ export class BlockService extends BaseService<
|
||||
*/
|
||||
private async getPenaltyFactor(): Promise<number> {
|
||||
const settings = await this.settingService.getSettings();
|
||||
const configured = settings.chatbot_settings?.default_nlu_penalty_factor;
|
||||
const NluPenaltyFactor =
|
||||
settings.chatbot_settings?.default_nlu_penalty_factor;
|
||||
|
||||
if (configured == null) {
|
||||
if (NluPenaltyFactor == null) {
|
||||
this.logger.warn(
|
||||
`The NLU penalty factor has reverted to its default fallback value of: ${FALLBACK_DEFAULT_NLU_PENALTY_FACTOR}%s`,
|
||||
`The NLU penalty factor has reverted to its default fallback value of: ${FALLBACK_DEFAULT_NLU_PENALTY_FACTOR}`,
|
||||
);
|
||||
}
|
||||
return configured ?? FALLBACK_DEFAULT_NLU_PENALTY_FACTOR;
|
||||
return NluPenaltyFactor ?? FALLBACK_DEFAULT_NLU_PENALTY_FACTOR;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user