From 6a61cf811655fa87dbcb196025cc0b6040502293 Mon Sep 17 00:00:00 2001 From: Heiner Lohaus Date: Wed, 4 Oct 2023 07:20:51 +0200 Subject: [PATCH] Sort providers in new dirs --- g4f/Provider/AItianhu.py | 2 ++ g4f/Provider/AItianhuSpace.py | 2 ++ g4f/Provider/DeepAi.py | 4 +++- g4f/Provider/__init__.py | 22 ++----------------- g4f/Provider/{ => deprecated}/AiService.py | 4 ++-- g4f/Provider/{ => deprecated}/CodeLinkAva.py | 6 ++--- g4f/Provider/{ => deprecated}/DfeHub.py | 4 ++-- g4f/Provider/{ => deprecated}/EasyChat.py | 4 ++-- g4f/Provider/{ => deprecated}/Equing.py | 4 ++-- g4f/Provider/{ => deprecated}/FastGpt.py | 5 +++-- g4f/Provider/{ => deprecated}/Forefront.py | 4 ++-- g4f/Provider/{ => deprecated}/GetGpt.py | 4 ++-- g4f/Provider/{ => deprecated}/Lockchat.py | 4 ++-- g4f/Provider/{ => deprecated}/Opchatgpts.py | 2 +- g4f/Provider/{ => deprecated}/PerplexityAi.py | 2 +- g4f/Provider/{ => deprecated}/V50.py | 4 ++-- g4f/Provider/{ => deprecated}/Wewordle.py | 2 +- g4f/Provider/{ => deprecated}/Wuguokai.py | 4 ++-- g4f/Provider/deprecated/__init__.py | 14 ++++++++++++ g4f/Provider/{ => needs_auth}/Bard.py | 2 +- g4f/Provider/{ => needs_auth}/HuggingChat.py | 4 ++-- .../{ => needs_auth}/OpenAssistant.py | 6 ++--- g4f/Provider/{ => needs_auth}/OpenaiChat.py | 8 +++---- g4f/Provider/{ => needs_auth}/Raycast.py | 4 ++-- g4f/Provider/{ => needs_auth}/Theb.py | 4 ++-- g4f/Provider/needs_auth/__init__.py | 6 +++++ g4f/models.py | 4 +--- testing/test_providers.py | 20 ++++------------- 28 files changed, 75 insertions(+), 80 deletions(-) rename g4f/Provider/{ => deprecated}/AiService.py (92%) rename g4f/Provider/{ => deprecated}/CodeLinkAva.py (94%) rename g4f/Provider/{ => deprecated}/DfeHub.py (97%) rename g4f/Provider/{ => deprecated}/EasyChat.py (98%) rename g4f/Provider/{ => deprecated}/Equing.py (97%) rename g4f/Provider/{ => deprecated}/FastGpt.py (96%) rename g4f/Provider/{ => deprecated}/Forefront.py (93%) rename g4f/Provider/{ => deprecated}/GetGpt.py (97%) rename g4f/Provider/{ => deprecated}/Lockchat.py (96%) rename g4f/Provider/{ => deprecated}/Opchatgpts.py (76%) rename g4f/Provider/{ => deprecated}/PerplexityAi.py (97%) rename g4f/Provider/{ => deprecated}/V50.py (96%) rename g4f/Provider/{ => deprecated}/Wewordle.py (98%) rename g4f/Provider/{ => deprecated}/Wuguokai.py (95%) create mode 100644 g4f/Provider/deprecated/__init__.py rename g4f/Provider/{ => needs_auth}/Bard.py (97%) rename g4f/Provider/{ => needs_auth}/HuggingChat.py (95%) rename g4f/Provider/{ => needs_auth}/OpenAssistant.py (96%) rename g4f/Provider/{ => needs_auth}/OpenaiChat.py (96%) rename g4f/Provider/{ => needs_auth}/Raycast.py (96%) rename g4f/Provider/{ => needs_auth}/Theb.py (97%) create mode 100644 g4f/Provider/needs_auth/__init__.py diff --git a/g4f/Provider/AItianhu.py b/g4f/Provider/AItianhu.py index 42631d7e..1d8653b7 100644 --- a/g4f/Provider/AItianhu.py +++ b/g4f/Provider/AItianhu.py @@ -38,6 +38,8 @@ class AItianhu(AsyncGeneratorProvider): async with session.post(f"{cls.url}/api/chat-process", json=data) as response: response.raise_for_status() async for line in response.iter_lines(): + if line == b"