From b8b961c94daabc5c46758157d33894b910e8bb76 Mon Sep 17 00:00:00 2001 From: medchedli Date: Fri, 13 Jun 2025 10:18:14 +0100 Subject: [PATCH] fix: improve variable naming for NLU penalty factor --- api/src/chat/services/block.service.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/api/src/chat/services/block.service.ts b/api/src/chat/services/block.service.ts index 44d3c135..f1e86c4b 100644 --- a/api/src/chat/services/block.service.ts +++ b/api/src/chat/services/block.service.ts @@ -117,14 +117,15 @@ export class BlockService extends BaseService< */ private async getPenaltyFactor(): Promise { 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; } /**