mirror of
https://github.com/xtekky/gpt4free.git
synced 2024-09-12 08:29:30 -04:00
Ails throw the contents of an error response
This commit is contained in:
parent
6a4463889e
commit
1ed448e584
@ -72,6 +72,8 @@ class Ails(BaseProvider):
|
||||
if b"content" in token:
|
||||
completion_chunk = json.loads(token.decode().replace("data: ", ""))
|
||||
token = completion_chunk["choices"][0]["delta"].get("content")
|
||||
if "ai.ls".lower() in token.lower():
|
||||
raise Exception("Response Error: " + token)
|
||||
if token != None:
|
||||
yield token
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user