Skip to content

Commit 2be523c

Browse files
committed
Fix handling of embeddings_key in api_search() function
1 parent c01e334 commit 2be523c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

application/api/answer/routes.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,10 @@ def api_search():
349349
question = data["question"]
350350

351351
if not embeddings_key_set:
352-
embeddings_key = data["embeddings_key"]
352+
if "embeddings_key" in data:
353+
embeddings_key = data["embeddings_key"]
354+
else:
355+
embeddings_key = settings.EMBEDDINGS_KEY
353356
else:
354357
embeddings_key = settings.EMBEDDINGS_KEY
355358
if "active_docs" in data:

0 commit comments

Comments
 (0)