diff --git a/app.py b/app.py index 3a005b416e..f989604aa5 100644 --- a/app.py +++ b/app.py @@ -518,8 +518,8 @@ def conversation_with_data(request_body): return Response(stream_with_data(body, headers, endpoint, history_metadata), mimetype='text/event-stream') def stream_without_data(response, history_metadata={}): - responseText = "" for line in response: + responseText = "" if line["choices"]: deltaText = line["choices"][0]["delta"].get('content') else: