From 4a9d7714adab375beda9db2a16bb34d139efef90 Mon Sep 17 00:00:00 2001 From: Heiner Lohaus Date: Sun, 8 Oct 2023 11:39:19 +0200 Subject: Add Cromicle to provider list --- g4f/Provider/Yqcloud.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'g4f/Provider/Yqcloud.py') 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() -- cgit v1.2.3