Fix handling of embeddings_key in api_search() function

This commit is contained in:
Alex
2024-01-30 17:22:33 +00:00
parent c01e334487
commit 2be523cf77

View File

@@ -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: