summaryrefslogtreecommitdiffstats
path: root/g4f/Provider/DeepAi.py
diff options
context:
space:
mode:
Diffstat (limited to 'g4f/Provider/DeepAi.py')
-rw-r--r--g4f/Provider/DeepAi.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/g4f/Provider/DeepAi.py b/g4f/Provider/DeepAi.py
index bac3e3fe..9a4f922c 100644
--- a/g4f/Provider/DeepAi.py
+++ b/g4f/Provider/DeepAi.py
@@ -65,7 +65,10 @@ f = function () {
response.raise_for_status()
async for stream in response.content.iter_any():
if stream:
- yield stream.decode()
+ try:
+ yield stream.decode("utf-8")
+ except UnicodeDecodeError:
+ yield stream.decode("unicode-escape")
def get_api_key(user_agent: str):