优化日志记录,添加请求详细信息输出

This commit is contained in:
yinpeng
2024-12-15 14:24:24 +08:00
parent 626ccef729
commit 16c9bb2411

View File

@@ -42,6 +42,7 @@ async def chat_completion(
token: str = Depends(security_service.verify_authorization),
):
logger.info(f"Handling chat completion request for model: {request.model}")
logger.info(f"Request: \n{request.model_dump_json(indent=2)}")
api_key = await key_manager.get_next_working_key()
logger.info(f"Using API key: {api_key}")
retries = 0