From fadf28858edef991d609384a4df039c24cb3f1ce Mon Sep 17 00:00:00 2001 From: Spyros Date: Thu, 28 Sep 2023 13:39:38 +0100 Subject: [PATCH] fix the threshold env to float conversion (#401) --- application/prompt_client/prompt_client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/prompt_client/prompt_client.py b/application/prompt_client/prompt_client.py index 355dcbb2e..f5a912ab2 100644 --- a/application/prompt_client/prompt_client.py +++ b/application/prompt_client/prompt_client.py @@ -20,7 +20,7 @@ logger = logging.getLogger(__name__) logger.setLevel(logging.INFO) -SIMILARITY_THRESHOLD = os.environ.get("CHATBOT_SIMILARITY_THRESHOLD", None) or 0.7 +SIMILARITY_THRESHOLD = float(os.environ.get("CHATBOT_SIMILARITY_THRESHOLD", "0.7")) def is_valid_url(url):