summaryrefslogtreecommitdiffstats
path: root/g4f/Provider/AItianhuSpace.py
diff options
context:
space:
mode:
authorTekky <98614666+xtekky@users.noreply.github.com>2023-10-04 10:40:18 +0200
committerGitHub <noreply@github.com>2023-10-04 10:40:18 +0200
commit6eb3fa3e5fa5675363dc09209cf77fba0542a506 (patch)
tree0ca69953cbf4820667500a195c8f97c5da75c88e /g4f/Provider/AItianhuSpace.py
parent ~ | g4f v-0.1.4.6 `pip install -U g4f` (diff)
parentSort providers in new dirs (diff)
downloadgpt4free-6eb3fa3e5fa5675363dc09209cf77fba0542a506.tar
gpt4free-6eb3fa3e5fa5675363dc09209cf77fba0542a506.tar.gz
gpt4free-6eb3fa3e5fa5675363dc09209cf77fba0542a506.tar.bz2
gpt4free-6eb3fa3e5fa5675363dc09209cf77fba0542a506.tar.lz
gpt4free-6eb3fa3e5fa5675363dc09209cf77fba0542a506.tar.xz
gpt4free-6eb3fa3e5fa5675363dc09209cf77fba0542a506.tar.zst
gpt4free-6eb3fa3e5fa5675363dc09209cf77fba0542a506.zip
Diffstat (limited to 'g4f/Provider/AItianhuSpace.py')
-rw-r--r--g4f/Provider/AItianhuSpace.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/g4f/Provider/AItianhuSpace.py b/g4f/Provider/AItianhuSpace.py
index a6bf9a58..27f2b1fa 100644
--- a/g4f/Provider/AItianhuSpace.py
+++ b/g4f/Provider/AItianhuSpace.py
@@ -52,6 +52,8 @@ class AItianhuSpace(AsyncGeneratorProvider):
async with session.post(f"{url}/api/chat-process", json=data, headers=headers) as response:
response.raise_for_status()
async for line in response.iter_lines():
+ if line == b"<script>":
+ raise RuntimeError("Solve Challenge")
if b"platform's risk control" in line:
raise RuntimeError("Platform's Risk Control")
line = json.loads(line)