From 8964d15dc36338e994285552e2b49435428ca50b Mon Sep 17 00:00:00 2001 From: abc <98614666+xtekky@users.noreply.github.com> Date: Tue, 10 Oct 2023 15:48:56 +0100 Subject: ~ | g4f `v-0.1.5.8` --- README.md | 2 +- g4f/Provider/Aivvm.py | 2 +- g4f/__init__.py | 2 +- g4f/gui/client/js/chat.v2.js | 11 +---------- g4f/gui/server/backend.py | 5 +++-- setup.py | 2 +- 6 files changed, 8 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 571c3ef3..9bb89d88 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ By using this repository or any code related to it, you agree to the [legal notice](./LEGAL_NOTICE.md). The author is not responsible for any copies, forks, reuploads made by other users, or anything else related to gpt4free. This is the author's only account and repository. To prevent impersonation or irresponsible actions, please comply with the GNU GPL license this Repository uses. -- latest pypi version: [`0.1.5.7`](https://pypi.org/project/g4f/0.1.5.7): +- latest pypi version: [`0.1.5.8`](https://pypi.org/project/g4f/0.1.5.8): ```sh pip install -U g4f ``` diff --git a/g4f/Provider/Aivvm.py b/g4f/Provider/Aivvm.py index 05f12320..a9eede67 100644 --- a/g4f/Provider/Aivvm.py +++ b/g4f/Provider/Aivvm.py @@ -65,7 +65,7 @@ class Aivvm(BaseProvider): response = requests.post("https://chat.aivvm.com/api/chat", headers=headers, data=data, stream=True) response.raise_for_status() - for chunk in response.iter_content(): + for chunk in response.iter_content(chunk_size=4096): try: yield chunk.decode("utf-8") except UnicodeDecodeError: diff --git a/g4f/__init__.py b/g4f/__init__.py index fa20f6eb..dc248fde 100644 --- a/g4f/__init__.py +++ b/g4f/__init__.py @@ -5,7 +5,7 @@ from .Provider import BaseProvider from .typing import Messages, CreateResult, Union from .debug import logging -version = '0.1.5.7' +version = '0.1.5.8' version_check = True def check_pypi_version() -> None: diff --git a/g4f/gui/client/js/chat.v2.js b/g4f/gui/client/js/chat.v2.js index 24f2e45b..f052b7e6 100644 --- a/g4f/gui/client/js/chat.v2.js +++ b/g4f/gui/client/js/chat.v2.js @@ -144,10 +144,6 @@ const ask_gpt = async (message) => { chunk = new TextDecoder().decode(value); - if (chunk.includes('