From b637c93e74d6bab05bfb0e2db50fab7aa4b9ae0d Mon Sep 17 00:00:00 2001 From: isafulf <51974293+isafulf@users.noreply.github.com> Date: Sun, 2 Apr 2023 17:33:25 -0700 Subject: [PATCH] Update answer_question.py --- .../nextjs-with-flask-server/server/answer_question.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/file-q-and-a/nextjs-with-flask-server/server/answer_question.py b/apps/file-q-and-a/nextjs-with-flask-server/server/answer_question.py index 031783c9..6d466ec7 100644 --- a/apps/file-q-and-a/nextjs-with-flask-server/server/answer_question.py +++ b/apps/file-q-and-a/nextjs-with-flask-server/server/answer_question.py @@ -42,6 +42,7 @@ def get_answer_from_files(question, session_id, pinecone_index): break files_string += file_string + # Note: this is not the proper way to use the ChatGPT conversational format, but it works for now messages = [ { "role": "system", @@ -69,7 +70,7 @@ def get_answer_from_files(question, session_id, pinecone_index): choices = response["choices"] # type: ignore answer = choices[0].message.content.strip() - + logging.info(f"[get_answer_from_files] answer: {answer}") return jsonify({"answer": answer})