From 2be523cf77f87aac292d99e0d96b2f26022e485c Mon Sep 17 00:00:00 2001 From: Alex Date: Tue, 30 Jan 2024 17:22:33 +0000 Subject: [PATCH] Fix handling of embeddings_key in api_search() function --- application/api/answer/routes.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/application/api/answer/routes.py b/application/api/answer/routes.py index 8c661e0bd..4c3937148 100644 --- a/application/api/answer/routes.py +++ b/application/api/answer/routes.py @@ -349,7 +349,10 @@ def api_search(): question = data["question"] if not embeddings_key_set: - embeddings_key = data["embeddings_key"] + if "embeddings_key" in data: + embeddings_key = data["embeddings_key"] + else: + embeddings_key = settings.EMBEDDINGS_KEY else: embeddings_key = settings.EMBEDDINGS_KEY if "active_docs" in data: