summaryrefslogtreecommitdiffstats
path: root/g4f/Provider/Yqcloud.py
diff options
context:
space:
mode:
authorHeiner Lohaus <heiner@lohaus.eu>2023-10-08 11:39:19 +0200
committerHeiner Lohaus <heiner@lohaus.eu>2023-10-08 11:39:19 +0200
commit4a9d7714adab375beda9db2a16bb34d139efef90 (patch)
tree9d353a6e530627b63ccc682c7a97d2cffe1f9e42 /g4f/Provider/Yqcloud.py
parent~ | `v-0.1.5.5` (diff)
downloadgpt4free-4a9d7714adab375beda9db2a16bb34d139efef90.tar
gpt4free-4a9d7714adab375beda9db2a16bb34d139efef90.tar.gz
gpt4free-4a9d7714adab375beda9db2a16bb34d139efef90.tar.bz2
gpt4free-4a9d7714adab375beda9db2a16bb34d139efef90.tar.lz
gpt4free-4a9d7714adab375beda9db2a16bb34d139efef90.tar.xz
gpt4free-4a9d7714adab375beda9db2a16bb34d139efef90.tar.zst
gpt4free-4a9d7714adab375beda9db2a16bb34d139efef90.zip
Diffstat (limited to 'g4f/Provider/Yqcloud.py')
-rw-r--r--g4f/Provider/Yqcloud.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/g4f/Provider/Yqcloud.py b/g4f/Provider/Yqcloud.py
index ac93315c..74c998e2 100644
--- a/g4f/Provider/Yqcloud.py
+++ b/g4f/Provider/Yqcloud.py
@@ -26,6 +26,9 @@ class Yqcloud(AsyncGeneratorProvider):
response.raise_for_status()
async for stream in response.content.iter_any():
if stream:
+ stream = stream.decode()
+ if "sorry, 您的ip已由于触发防滥用检测而被封禁" in stream:
+ raise RuntimeError("IP address is blocked by abuse detection.")
yield stream.decode()