diff options
Diffstat (limited to 'g4f/Provider/deprecated')
-rw-r--r-- | g4f/Provider/deprecated/AiService.py | 4 | ||||
-rw-r--r-- | g4f/Provider/deprecated/Aivvm.py | 9 | ||||
-rw-r--r-- | g4f/Provider/deprecated/DfeHub.py | 4 | ||||
-rw-r--r-- | g4f/Provider/deprecated/EasyChat.py | 5 | ||||
-rw-r--r-- | g4f/Provider/deprecated/Equing.py | 4 | ||||
-rw-r--r-- | g4f/Provider/deprecated/FastGpt.py | 7 | ||||
-rw-r--r-- | g4f/Provider/deprecated/Forefront.py | 4 | ||||
-rw-r--r-- | g4f/Provider/deprecated/GetGpt.py | 4 | ||||
-rw-r--r-- | g4f/Provider/deprecated/Lockchat.py | 4 | ||||
-rw-r--r-- | g4f/Provider/deprecated/V50.py | 4 | ||||
-rw-r--r-- | g4f/Provider/deprecated/VoiGpt.py | 8 | ||||
-rw-r--r-- | g4f/Provider/deprecated/Wuguokai.py | 4 |
12 files changed, 28 insertions, 33 deletions
diff --git a/g4f/Provider/deprecated/AiService.py b/g4f/Provider/deprecated/AiService.py index 325af670..acd7f5ea 100644 --- a/g4f/Provider/deprecated/AiService.py +++ b/g4f/Provider/deprecated/AiService.py @@ -3,10 +3,10 @@ from __future__ import annotations import requests from ...typing import Any, CreateResult, Messages -from ..base_provider import BaseProvider +from ..base_provider import AbstractProvider -class AiService(BaseProvider): +class AiService(AbstractProvider): url = "https://aiservice.vercel.app/" working = False supports_gpt_35_turbo = True diff --git a/g4f/Provider/deprecated/Aivvm.py b/g4f/Provider/deprecated/Aivvm.py index 8b5a9e05..c973adf8 100644 --- a/g4f/Provider/deprecated/Aivvm.py +++ b/g4f/Provider/deprecated/Aivvm.py @@ -1,9 +1,10 @@ from __future__ import annotations + import requests +import json -from ..base_provider import BaseProvider +from ..base_provider import AbstractProvider from ...typing import CreateResult, Messages -from json import dumps # to recreate this easily, send a post request to https://chat.aivvm.com/api/models models = { @@ -17,7 +18,7 @@ models = { 'gpt-4-32k-0613': {'id': 'gpt-4-32k-0613', 'name': 'GPT-4-32K-0613'}, } -class Aivvm(BaseProvider): +class Aivvm(AbstractProvider): url = 'https://chat.aivvm.com' supports_stream = True working = False @@ -44,7 +45,7 @@ class Aivvm(BaseProvider): "temperature" : kwargs.get("temperature", 0.7) } - data = dumps(json_data) + data = json.dumps(json_data) headers = { "accept" : "text/event-stream", diff --git a/g4f/Provider/deprecated/DfeHub.py b/g4f/Provider/deprecated/DfeHub.py index 4458bac6..e6d13444 100644 --- a/g4f/Provider/deprecated/DfeHub.py +++ b/g4f/Provider/deprecated/DfeHub.py @@ -7,10 +7,10 @@ import time import requests from ...typing import Any, CreateResult -from ..base_provider import BaseProvider +from ..base_provider import AbstractProvider -class DfeHub(BaseProvider): +class DfeHub(AbstractProvider): url = "https://chat.dfehub.com/" supports_stream = True supports_gpt_35_turbo = True diff --git a/g4f/Provider/deprecated/EasyChat.py b/g4f/Provider/deprecated/EasyChat.py index 3142f243..7a00f523 100644 --- a/g4f/Provider/deprecated/EasyChat.py +++ b/g4f/Provider/deprecated/EasyChat.py @@ -2,14 +2,13 @@ from __future__ import annotations import json import random - import requests from ...typing import Any, CreateResult -from ..base_provider import BaseProvider +from ..base_provider import AbstractProvider -class EasyChat(BaseProvider): +class EasyChat(AbstractProvider): url: str = "https://free.easychat.work" supports_stream = True supports_gpt_35_turbo = True diff --git a/g4f/Provider/deprecated/Equing.py b/g4f/Provider/deprecated/Equing.py index 9f510e50..5fd9797b 100644 --- a/g4f/Provider/deprecated/Equing.py +++ b/g4f/Provider/deprecated/Equing.py @@ -6,10 +6,10 @@ from abc import ABC, abstractmethod import requests from ...typing import Any, CreateResult -from ..base_provider import BaseProvider +from ..base_provider import AbstractProvider -class Equing(BaseProvider): +class Equing(AbstractProvider): url: str = 'https://next.eqing.tech/' working = False supports_stream = True diff --git a/g4f/Provider/deprecated/FastGpt.py b/g4f/Provider/deprecated/FastGpt.py index 3af8c213..6a79d9aa 100644 --- a/g4f/Provider/deprecated/FastGpt.py +++ b/g4f/Provider/deprecated/FastGpt.py @@ -2,15 +2,13 @@ from __future__ import annotations import json import random -from abc import ABC, abstractmethod - import requests from ...typing import Any, CreateResult -from ..base_provider import BaseProvider +from ..base_provider import AbstractProvider -class FastGpt(BaseProvider): +class FastGpt(AbstractProvider): url: str = 'https://chat9.fastgpt.me/' working = False needs_auth = False @@ -19,7 +17,6 @@ class FastGpt(BaseProvider): supports_gpt_4 = False @staticmethod - @abstractmethod def create_completion( model: str, messages: list[dict[str, str]], diff --git a/g4f/Provider/deprecated/Forefront.py b/g4f/Provider/deprecated/Forefront.py index 2f807e91..39654b2c 100644 --- a/g4f/Provider/deprecated/Forefront.py +++ b/g4f/Provider/deprecated/Forefront.py @@ -5,10 +5,10 @@ import json import requests from ...typing import Any, CreateResult -from ..base_provider import BaseProvider +from ..base_provider import AbstractProvider -class Forefront(BaseProvider): +class Forefront(AbstractProvider): url = "https://forefront.com" supports_stream = True supports_gpt_35_turbo = True diff --git a/g4f/Provider/deprecated/GetGpt.py b/g4f/Provider/deprecated/GetGpt.py index a7f4695c..69851ee5 100644 --- a/g4f/Provider/deprecated/GetGpt.py +++ b/g4f/Provider/deprecated/GetGpt.py @@ -11,10 +11,10 @@ except ImportError: from Cryptodome.Cipher import AES from ...typing import Any, CreateResult -from ..base_provider import BaseProvider +from ..base_provider import AbstractProvider -class GetGpt(BaseProvider): +class GetGpt(AbstractProvider): url = 'https://chat.getgpt.world/' supports_stream = True working = False diff --git a/g4f/Provider/deprecated/Lockchat.py b/g4f/Provider/deprecated/Lockchat.py index f885672d..edab0bd4 100644 --- a/g4f/Provider/deprecated/Lockchat.py +++ b/g4f/Provider/deprecated/Lockchat.py @@ -5,10 +5,10 @@ import json import requests from ...typing import Any, CreateResult -from ..base_provider import BaseProvider +from ..base_provider import AbstractProvider -class Lockchat(BaseProvider): +class Lockchat(AbstractProvider): url: str = "http://supertest.lockchat.app" supports_stream = True supports_gpt_35_turbo = True diff --git a/g4f/Provider/deprecated/V50.py b/g4f/Provider/deprecated/V50.py index e24ac2d4..456445f7 100644 --- a/g4f/Provider/deprecated/V50.py +++ b/g4f/Provider/deprecated/V50.py @@ -5,10 +5,10 @@ import uuid import requests from ...typing import Any, CreateResult -from ..base_provider import BaseProvider +from ..base_provider import AbstractProvider -class V50(BaseProvider): +class V50(AbstractProvider): url = 'https://p5.v50.ltd' supports_gpt_35_turbo = True supports_stream = False diff --git a/g4f/Provider/deprecated/VoiGpt.py b/g4f/Provider/deprecated/VoiGpt.py index b312709f..9b061e63 100644 --- a/g4f/Provider/deprecated/VoiGpt.py +++ b/g4f/Provider/deprecated/VoiGpt.py @@ -2,13 +2,11 @@ from __future__ import annotations import json import requests -from .base_provider import BaseProvider -from ..typing import Messages, CreateResult -from .helper import get_cookies +from ..base_provider import AbstractProvider +from ...typing import Messages, CreateResult - -class VoiGpt(BaseProvider): +class VoiGpt(AbstractProvider): """ VoiGpt - A provider for VoiGpt.com diff --git a/g4f/Provider/deprecated/Wuguokai.py b/g4f/Provider/deprecated/Wuguokai.py index 87877198..f12d1bfe 100644 --- a/g4f/Provider/deprecated/Wuguokai.py +++ b/g4f/Provider/deprecated/Wuguokai.py @@ -5,10 +5,10 @@ import random import requests from ...typing import Any, CreateResult -from ..base_provider import BaseProvider, format_prompt +from ..base_provider import AbstractProvider, format_prompt -class Wuguokai(BaseProvider): +class Wuguokai(AbstractProvider): url = 'https://chat.wuguokai.xyz' supports_gpt_35_turbo = True working = False |