Skip to content

Commit

Permalink
Fix handling of embeddings_key in api_search() function
Browse files Browse the repository at this point in the history
  • Loading branch information
dartpain committed Jan 30, 2024
1 parent c01e334 commit 2be523c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion application/api/answer/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 2be523c

Please sign in to comment.