From b7cd7b3cd1c872f7a9b8126e47f7cc44c9cc5cd7 Mon Sep 17 00:00:00 2001 From: kqlio67 <166700875+kqlio67@users.noreply.github.com> Date: Mon, 8 Jul 2024 20:47:22 +0000 Subject: Delete g4f/Provider/ChatgptX.py --- g4f/Provider/ChatgptX.py | 106 ----------------------------------------------- 1 file changed, 106 deletions(-) delete mode 100644 g4f/Provider/ChatgptX.py (limited to 'g4f/Provider/ChatgptX.py') diff --git a/g4f/Provider/ChatgptX.py b/g4f/Provider/ChatgptX.py deleted file mode 100644 index 9be0d89b..00000000 --- a/g4f/Provider/ChatgptX.py +++ /dev/null @@ -1,106 +0,0 @@ -from __future__ import annotations - -import re -import json - -from aiohttp import ClientSession -from ..typing import AsyncResult, Messages -from .base_provider import AsyncGeneratorProvider -from .helper import format_prompt -from ..errors import RateLimitError - -class ChatgptX(AsyncGeneratorProvider): - url = "https://chatgptx.de" - supports_gpt_35_turbo = True - working = True - - @classmethod - async def create_async_generator( - cls, - model: str, - messages: Messages, - proxy: str = None, - **kwargs - ) -> AsyncResult: - headers = { - 'accept-language': 'de-DE,de;q=0.9,en-DE;q=0.8,en;q=0.7,en-US', - 'sec-ch-ua': '"Google Chrome";v="117", "Not;A=Brand";v="8", "Chromium";v="117"', - 'sec-ch-ua-mobile': '?0', - 'sec-ch-ua-platform': 'Linux', - 'sec-fetch-dest': 'empty', - 'sec-fetch-mode': 'cors', - 'sec-fetch-site': 'same-origin', - 'user-agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36', - } - async with ClientSession(headers=headers) as session: - async with session.get(f"{cls.url}/", proxy=proxy) as response: - response = await response.text() - - result = re.search( - r'