mirror of
https://github.com/hexastack/hexabot
synced 2025-06-26 18:27:28 +00:00
Merge 6e97b7d4e3
into 17e3b53b9b
This commit is contained in:
commit
e015a06661
@ -118,15 +118,15 @@ export class BlockService extends BaseService<
|
|||||||
*/
|
*/
|
||||||
private async getPenaltyFactor(): Promise<number> {
|
private async getPenaltyFactor(): Promise<number> {
|
||||||
const settings = await this.settingService.getSettings();
|
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(
|
this.logger.warn(
|
||||||
'Using fallback NLU penalty factor value: %s',
|
`The NLU penalty factor has reverted to its default fallback value of: ${FALLBACK_DEFAULT_NLU_PENALTY_FACTOR}`,
|
||||||
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