Ails Supplementary Identification of Unusual Response Content

This commit is contained in:
zengrr 2023-08-25 10:07:48 +08:00
parent 1ed448e584
commit 38abb0a0b0

View File

@ -72,7 +72,7 @@ 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():
if "ai.ls" in token.lower() or "ai.ci" in token.lower():
raise Exception("Response Error: " + token)
if token != None:
yield token