Moonfanz commited on
Commit
136867d
·
verified ·
1 Parent(s): a0b275b

Upload 4 files

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -274,6 +274,7 @@ def chat_completions():
274
 
275
  def generate(response):
276
  try:
 
277
  for chunk in response:
278
  if chunk.text:
279
  data = {
@@ -300,7 +301,7 @@ def chat_completions():
300
  ],
301
  'object': 'chat.completion.chunk'
302
  }
303
-
304
  yield f"data: {json.dumps(data)}\n\n"
305
  logger.info(f"200!")
306
 
 
274
 
275
  def generate(response):
276
  try:
277
+ logger.info(f"流式开始...", end='')
278
  for chunk in response:
279
  if chunk.text:
280
  data = {
 
301
  ],
302
  'object': 'chat.completion.chunk'
303
  }
304
+ logger.info(f"流式结束")
305
  yield f"data: {json.dumps(data)}\n\n"
306
  logger.info(f"200!")
307