summaryrefslogtreecommitdiffstats
path: root/g4f/Provider/H2o.py
diff options
context:
space:
mode:
authorBagus Indrayana <bagusindrayanaindo@gmail.com>2023-08-24 12:23:55 +0200
committerBagus Indrayana <bagusindrayanaindo@gmail.com>2023-08-24 12:23:55 +0200
commitc9d2f060906ceffe13cccbf9cf049fa614dc3707 (patch)
tree7c18afd174d8ca192a5b3042e0a381f01c0dba08 /g4f/Provider/H2o.py
parentadd provider (diff)
parent ~ | Merge pull request #829 (diff)
downloadgpt4free-c9d2f060906ceffe13cccbf9cf049fa614dc3707.tar
gpt4free-c9d2f060906ceffe13cccbf9cf049fa614dc3707.tar.gz
gpt4free-c9d2f060906ceffe13cccbf9cf049fa614dc3707.tar.bz2
gpt4free-c9d2f060906ceffe13cccbf9cf049fa614dc3707.tar.lz
gpt4free-c9d2f060906ceffe13cccbf9cf049fa614dc3707.tar.xz
gpt4free-c9d2f060906ceffe13cccbf9cf049fa614dc3707.tar.zst
gpt4free-c9d2f060906ceffe13cccbf9cf049fa614dc3707.zip
Diffstat (limited to 'g4f/Provider/H2o.py')
-rw-r--r--g4f/Provider/H2o.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/g4f/Provider/H2o.py b/g4f/Provider/H2o.py
index c2492e59..f9b799bb 100644
--- a/g4f/Provider/H2o.py
+++ b/g4f/Provider/H2o.py
@@ -75,6 +75,8 @@ class H2o(BaseProvider):
headers=headers,
json=data,
)
+ response.raise_for_status()
+ response.encoding = "utf-8"
generated_text = response.text.replace("\n", "").split("data:")
generated_text = json.loads(generated_text[-1])