From 3f88b04c4a644d278d28408b0c4cde6042cc9635 Mon Sep 17 00:00:00 2001 From: Alex Date: Wed, 31 May 2023 23:49:41 +0100 Subject: [PATCH] Update app.py --- application/app.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/application/app.py b/application/app.py index 8441febd..baf62003 100644 --- a/application/app.py +++ b/application/app.py @@ -169,7 +169,8 @@ def complete_stream(question, docsearch, chat_history, api_key): messages_combine.append({"role": "user", "content": i["prompt"]}) messages_combine.append({"role": "system", "content": i["response"]}) messages_combine.append({"role": "user", "content": question}) - completion = openai.ChatCompletion.create(model="gpt-3.5-turbo", messages=messages_combine, stream=True, max_tokens=1000, temperature=0) + completion = openai.ChatCompletion.create(model="gpt-3.5-turbo", + messages=messages_combine, stream=True, max_tokens=1000, temperature=0) for line in completion: if 'content' in line['choices'][0]['delta']: