diff options
Diffstat (limited to 'g4f/Provider/Providers/ChatgptAi.py')
-rw-r--r-- | g4f/Provider/Providers/ChatgptAi.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/g4f/Provider/Providers/ChatgptAi.py b/g4f/Provider/Providers/ChatgptAi.py index 00d4cf6f..1f9ead0e 100644 --- a/g4f/Provider/Providers/ChatgptAi.py +++ b/g4f/Provider/Providers/ChatgptAi.py @@ -6,6 +6,8 @@ url = 'https://chatgpt.ai/gpt-4/' model = ['gpt-4'] supports_stream = False needs_auth = False +working = True + def _create_completion(model: str, messages: list, stream: bool, **kwargs): chat = '' @@ -13,8 +15,7 @@ def _create_completion(model: str, messages: list, stream: bool, **kwargs): chat += '%s: %s\n' % (message['role'], message['content']) chat += 'assistant: ' - response = requests.get('https://chatgpt.ai/gpt-4/') - + response = requests.get('https://chatgpt.ai/') nonce, post_id, _, bot_id = re.findall(r'data-nonce="(.*)"\n data-post-id="(.*)"\n data-url="(.*)"\n data-bot-id="(.*)"\n data-width', response.text)[0] headers = { |