feat: add clear_quota_v2 method to clear API quota when it's used up

This commit is contained in:
lanvent
2023-04-21 13:41:21 +08:00
parent e44161bf42
commit c9131b333b
3 changed files with 17 additions and 12 deletions

View File

@@ -92,7 +92,6 @@ class WechatMPChannel(ChatChannel):
elif reply.type == ReplyType.IMAGE_URL: # 从网络下载图片
img_url = reply.content
pic_res = requests.get(img_url, stream=True)
print(pic_res.headers)
image_storage = io.BytesIO()
for block in pic_res.iter_content(1024):
image_storage.write(block)
@@ -159,7 +158,6 @@ class WechatMPChannel(ChatChannel):
elif reply.type == ReplyType.IMAGE_URL: # 从网络下载图片
img_url = reply.content
pic_res = requests.get(img_url, stream=True)
print(pic_res.headers)
image_storage = io.BytesIO()
for block in pic_res.iter_content(1024):
image_storage.write(block)