mirror of
https://github.com/tiennm99/DocsGPT.git
synced 2026-10-14 00:16:20 +00:00
Update app.py
This commit is contained in:
1 parent
3b8039a580
commit
e6bccaaf4e
1 file changed
+2
-2
+2
-2
@@ -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"])
|
||||
|
||||
Reference in new issue
Block a user