Niansuh commited on
Commit
2577b35
·
verified ·
1 Parent(s): c2431bf

Update api/utils.py

Browse files
Files changed (1) hide show
  1. api/utils.py +1 -1
api/utils.py CHANGED
@@ -129,7 +129,7 @@ async def process_streaming_response(request: ChatRequest):
129
 
130
  # Append markdown separator and advertisement as a separate chunk
131
  if ADVERTISEMENT_TEXT and not advertisement_added:
132
- advertisement_with_line_break = "\n---\n" + ADVERTISEMENT_TEXT # Add the markdown horizontal rule
133
  yield f"data: {json.dumps(create_chat_completion_data(advertisement_with_line_break, request.model, timestamp))}\n\n"
134
  advertisement_added = True
135
 
 
129
 
130
  # Append markdown separator and advertisement as a separate chunk
131
  if ADVERTISEMENT_TEXT and not advertisement_added:
132
+ advertisement_with_line_break = "\n\n---\n" + ADVERTISEMENT_TEXT # Add space before the markdown horizontal rule
133
  yield f"data: {json.dumps(create_chat_completion_data(advertisement_with_line_break, request.model, timestamp))}\n\n"
134
  advertisement_added = True
135