summaryrefslogtreecommitdiffstats
path: root/g4f/Provider/H2o.py
diff options
context:
space:
mode:
authorzengrr <47846202+zeng-rr@users.noreply.github.com>2023-08-22 08:59:58 +0200
committerzengrr <47846202+zeng-rr@users.noreply.github.com>2023-08-22 08:59:58 +0200
commit5c2809a22feb63efe72d6c8bc21657a030c1da37 (patch)
treef11e705e4dfca5aebf5f7a51b3b7092079326f69 /g4f/Provider/H2o.py
parent ~ | v.0.0.2.2 (diff)
downloadgpt4free-5c2809a22feb63efe72d6c8bc21657a030c1da37.tar
gpt4free-5c2809a22feb63efe72d6c8bc21657a030c1da37.tar.gz
gpt4free-5c2809a22feb63efe72d6c8bc21657a030c1da37.tar.bz2
gpt4free-5c2809a22feb63efe72d6c8bc21657a030c1da37.tar.lz
gpt4free-5c2809a22feb63efe72d6c8bc21657a030c1da37.tar.xz
gpt4free-5c2809a22feb63efe72d6c8bc21657a030c1da37.tar.zst
gpt4free-5c2809a22feb63efe72d6c8bc21657a030c1da37.zip
Diffstat (limited to '')
-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])