import base64 import os import re from typing import get_type_hints import requests url = "https://chatgptlogin.ac" model = ["gpt-3.5-turbo"] supports_stream = False needs_auth = False def _create_completion(model: str, messages: list, stream: bool, **kwargs): def get_nonce(): res = requests.get( "https://chatgptlogin.ac/use-chatgpt-free/", headers={ "Referer": "https://chatgptlogin.ac/use-chatgpt-free/", "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36", }, ) src = re.search( r'class="mwai-chat mwai-chatgpt">.*Send