From f5092744352076cd3e9ef2fb88f0a0811e043443 Mon Sep 17 00:00:00 2001 From: Jamie Broomall Date: Tue, 24 Oct 2023 13:41:52 -0700 Subject: [PATCH] Add nltk.download of punkt to the response_hallucination init --- langkit/response_hallucination.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/langkit/response_hallucination.py b/langkit/response_hallucination.py index 4d949f07..b67ed7c2 100644 --- a/langkit/response_hallucination.py +++ b/langkit/response_hallucination.py @@ -243,6 +243,9 @@ def consistency_check( def init(llm: LLMInvocationParams, num_samples=1): global checker + import nltk + + nltk.download("punkt") diagnostic_logger.info( "Info: the response_hallucination metric module performs additionall LLM calls to check the consistency of the response." )