diff options
author | Heiner Lohaus <heiner@lohaus.eu> | 2023-09-26 00:52:29 +0200 |
---|---|---|
committer | Heiner Lohaus <heiner@lohaus.eu> | 2023-09-26 00:52:29 +0200 |
commit | 348670fe35369298af8e289af9d523beecfed4c3 (patch) | |
tree | f6b81b7d37db130e6de2ec42fb6119bbf224e425 /g4f/Provider/Aivvm.py | |
parent | Add Myshell Provider (diff) | |
download | gpt4free-348670fe35369298af8e289af9d523beecfed4c3.tar gpt4free-348670fe35369298af8e289af9d523beecfed4c3.tar.gz gpt4free-348670fe35369298af8e289af9d523beecfed4c3.tar.bz2 gpt4free-348670fe35369298af8e289af9d523beecfed4c3.tar.lz gpt4free-348670fe35369298af8e289af9d523beecfed4c3.tar.xz gpt4free-348670fe35369298af8e289af9d523beecfed4c3.tar.zst gpt4free-348670fe35369298af8e289af9d523beecfed4c3.zip |
Diffstat (limited to '')
-rw-r--r-- | g4f/Provider/Aivvm.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/g4f/Provider/Aivvm.py b/g4f/Provider/Aivvm.py index c38c4a74..7a3d57bd 100644 --- a/g4f/Provider/Aivvm.py +++ b/g4f/Provider/Aivvm.py @@ -60,9 +60,10 @@ class Aivvm(BaseProvider): response = requests.post( "https://chat.aivvm.com/api/chat", headers=headers, json=json_data, stream=True) + response.raise_for_status() - for line in response.iter_content(chunk_size=1048): - yield line.decode('utf-8') + for chunk in response.iter_content(chunk_size=None): + yield chunk.decode('utf-8') @classmethod @property |