summaryrefslogtreecommitdiffstats
path: root/g4f/Provider/ChatgptFree.py
diff options
context:
space:
mode:
Diffstat (limited to 'g4f/Provider/ChatgptFree.py')
-rw-r--r--g4f/Provider/ChatgptFree.py10
1 files changed, 1 insertions, 9 deletions
diff --git a/g4f/Provider/ChatgptFree.py b/g4f/Provider/ChatgptFree.py
index b9b25447..b345b48a 100644
--- a/g4f/Provider/ChatgptFree.py
+++ b/g4f/Provider/ChatgptFree.py
@@ -5,8 +5,7 @@ import re
from ..requests import StreamSession
from ..typing import Messages
from .base_provider import AsyncProvider
-from .helper import format_prompt, get_cookies
-
+from .helper import format_prompt
class ChatgptFree(AsyncProvider):
url = "https://chatgptfree.ai"
@@ -25,12 +24,6 @@ class ChatgptFree(AsyncProvider):
cookies: dict = None,
**kwargs
) -> str:
-
- if not cookies:
- cookies = get_cookies('chatgptfree.ai')
- if not cookies:
- raise RuntimeError(f"g4f.provider.{cls.__name__} requires cookies [refresh https://chatgptfree.ai on chrome]")
-
headers = {
'authority': 'chatgptfree.ai',
'accept': '*/*',
@@ -82,6 +75,5 @@ class ChatgptFree(AsyncProvider):
"bot_id": "0"
}
async with session.post(f"{cls.url}/wp-admin/admin-ajax.php", data=data, cookies=cookies) as response:
-
response.raise_for_status()
return (await response.json())["data"] \ No newline at end of file