From e31e904be1b345d68dfa16c5402b89987a22c42f Mon Sep 17 00:00:00 2001 From: Fahad Ali Shaikh Date: Wed, 18 Dec 2024 13:03:44 +0530 Subject: [PATCH] added exception to track complete error (#1662) --- kairon/events/definitions/model_testing.py | 2 +- kairon/nlu/classifiers/llm.py | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/kairon/events/definitions/model_testing.py b/kairon/events/definitions/model_testing.py index b4b7ccacd..ef19416d4 100644 --- a/kairon/events/definitions/model_testing.py +++ b/kairon/events/definitions/model_testing.py @@ -58,6 +58,6 @@ def execute(self, **kwargs): nlu_result=nlu_results, event_status=EVENT_STATUS.COMPLETED.value) except Exception as e: - logger.error(str(e)) + logger.exception(str(e)) ModelTestingLogProcessor.log_test_result(self.bot, self.user, exception=str(e), event_status=EVENT_STATUS.FAIL.value) diff --git a/kairon/nlu/classifiers/llm.py b/kairon/nlu/classifiers/llm.py index 8ad550db3..ef5f19206 100644 --- a/kairon/nlu/classifiers/llm.py +++ b/kairon/nlu/classifiers/llm.py @@ -31,7 +31,11 @@ pass @DefaultV1Recipe.register( - DefaultV1Recipe.ComponentType.INTENT_CLASSIFIER, is_trainable=True + [ + DefaultV1Recipe.ComponentType.INTENT_CLASSIFIER, + DefaultV1Recipe.ComponentType.ENTITY_EXTRACTOR, + ], + is_trainable=True ) class LLMClassifier(IntentClassifier, GraphComponent, EntityExtractorMixin, ABC): """Intent and Entity classifiers using the OpenAI Completion framework"""