yangtb24 commited on
Commit
d91f35e
·
verified ·
1 Parent(s): ea85d99

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -389,7 +389,7 @@ def handsome_chat_completions():
389
  user_content = user_content.strip()
390
 
391
  logging.info(
392
- f"使用的key: {api_key}, 提示token: {prompt_tokens}, 输出token: {completion_tokens}, 首字用时: {first_token_time:.4f}秒, 总共用时: {total_time:.4f}秒, 使用的模型: {model_name}, 用户的内容: {user_content.replace(chr(10), '\\n').replace(chr(13), '\\n')}, 输出的内容: {response_content.replace(chr(10), '\\n').replace(chr(13), '\\n')}"
393
  )
394
  return Response(stream_with_context(generate()), content_type=response.headers['Content-Type'])
395
  else:
 
389
  user_content = user_content.strip()
390
 
391
  logging.info(
392
+ f"使用的key: {api_key}, 提示token: {prompt_tokens}, 输出token: {completion_tokens}, 首字用时: 0, 总共用时: {total_time:.4f}秒, 使用的模型: {model_name}, 用户的内容: {user_content.replace(chr(10), r'\\n').replace(chr(13), r'\\n')}, 输出的内容: {response_content.replace(chr(10), r'\\n').replace(chr(13), r'\\n')}"
393
  )
394
  return Response(stream_with_context(generate()), content_type=response.headers['Content-Type'])
395
  else: