From e6bccaaf4ece6eec171fbf632571555d6f08a8c9 Mon Sep 17 00:00:00 2001 From: Alex Date: Wed, 31 May 2023 22:20:47 +0100 Subject: [PATCH] Update app.py --- application/app.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/application/app.py b/application/app.py index fa92cb85..d0ecb3b9 100644 --- a/application/app.py +++ b/application/app.py @@ -150,7 +150,6 @@ def home(): embeddings_choice=settings.EMBEDDINGS_NAME) def complete_stream(question, docsearch, chat_history, api_key): - import sys openai.api_key = api_key docs = docsearch.similarity_search(question, k=2) # join all page_content together with a newline @@ -194,7 +193,8 @@ def stream(): #question = "Hi" - return Response(complete_stream(question, docsearch, chat_history= history, api_key=api_key), mimetype='text/event-stream') + return Response(complete_stream(question, docsearch, + chat_history= history, api_key=api_key), mimetype='text/event-stream') @app.route("/api/answer", methods=["POST"])