diff options
author | H Lohaus <hlohaus@users.noreply.github.com> | 2024-01-27 16:09:21 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-27 16:09:21 +0100 |
commit | 0d83bdeef91001c7c00d69f79fccad5a78b4b94b (patch) | |
tree | 362ebeb245cc4e123914635b03f890a314a7a40d /g4f/Provider/Bestim.py | |
parent | Merge pull request #1512 from KennyPhan123/patch-1 (diff) | |
parent | Fix PerplexityLabs Provider, Improve bypass_cloudflare helper (diff) | |
download | gpt4free-0d83bdeef91001c7c00d69f79fccad5a78b4b94b.tar gpt4free-0d83bdeef91001c7c00d69f79fccad5a78b4b94b.tar.gz gpt4free-0d83bdeef91001c7c00d69f79fccad5a78b4b94b.tar.bz2 gpt4free-0d83bdeef91001c7c00d69f79fccad5a78b4b94b.tar.lz gpt4free-0d83bdeef91001c7c00d69f79fccad5a78b4b94b.tar.xz gpt4free-0d83bdeef91001c7c00d69f79fccad5a78b4b94b.tar.zst gpt4free-0d83bdeef91001c7c00d69f79fccad5a78b4b94b.zip |
Diffstat (limited to 'g4f/Provider/Bestim.py')
-rw-r--r-- | g4f/Provider/Bestim.py | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/g4f/Provider/Bestim.py b/g4f/Provider/Bestim.py index be95b48a..323bd713 100644 --- a/g4f/Provider/Bestim.py +++ b/g4f/Provider/Bestim.py @@ -4,7 +4,6 @@ from ..typing import Messages from .base_provider import BaseProvider, CreateResult
from ..requests import get_session_from_browser
from uuid import uuid4
-import requests
class Bestim(BaseProvider):
url = "https://chatgpt.bestim.org"
@@ -24,18 +23,7 @@ class Bestim(BaseProvider): ) -> CreateResult:
session = get_session_from_browser(cls.url, proxy=proxy)
headers = {
- 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:121.0) Gecko/20100101 Firefox/121.0',
'Accept': 'application/json, text/event-stream',
- 'Accept-Language': 'en-US,en;q=0.5',
- 'Accept-Encoding': 'gzip, deflate, br',
- 'Referer': 'https://chatgpt.bestim.org/chat/',
- 'Origin': 'https://chatgpt.bestim.org',
- 'Alt-Used': 'chatgpt.bestim.org',
- 'Connection': 'keep-alive',
- 'Sec-Fetch-Dest': 'empty',
- 'Sec-Fetch-Mode': 'cors',
- 'Sec-Fetch-Site': 'same-origin',
- 'TE': 'trailers'
}
data = {
"messagesHistory": [{
@@ -47,9 +35,8 @@ class Bestim(BaseProvider): }
response = session.post(
url="https://chatgpt.bestim.org/chat/send2/",
- headers=headers,
json=data,
- proxies={"https": proxy},
+ headers=headers,
stream=True
)
response.raise_for_status()
|