mirror of
https://github.com/snailyp/gemini-balance.git
synced 2026-05-19 19:59:30 +08:00
fix: 修复异步请求读取错误内容的方法
This commit is contained in:
@@ -335,7 +335,7 @@ class ChatService:
|
||||
"POST", stream_url, json=payload
|
||||
) as async_response:
|
||||
if async_response.status_code != 200:
|
||||
error_content = await async_response.read()
|
||||
error_content = await async_response.aread()
|
||||
error_msg = error_content.decode("utf-8")
|
||||
logger.error(
|
||||
f"API error: {async_response.status_code}, {error_msg}"
|
||||
|
||||
Reference in New Issue
Block a user