Spaces:
Running
Running
Update app.py
Browse files
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}, 首字用时:
|
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:
|