Spaces:
Running
Running
Merge pull request #40 from ramonvc/dev-testing
Browse files
g4f/Provider/Providers/Better.py
CHANGED
@@ -18,28 +18,11 @@ needs_auth = False
|
|
18 |
|
19 |
def _create_completion(model: str, messages: list, stream: bool, **kwargs):
|
20 |
headers = {
|
21 |
-
'
|
22 |
-
'
|
23 |
-
'accept-language': 'en-US,en;q=0.9',
|
24 |
-
'cache-control': 'max-age=0',
|
25 |
-
'sec-ch-ua': '"Chromium";v="110", "Not A(Brand";v="24", "Microsoft Edge";v="110"',
|
26 |
-
'sec-ch-ua-arch': '"x86"',
|
27 |
-
'sec-ch-ua-bitness': '"64"',
|
28 |
-
'sec-ch-ua-full-version': '"110.0.1587.69"',
|
29 |
-
'sec-ch-ua-full-version-list': '"Chromium";v="110.0.5481.192", "Not A(Brand";v="24.0.0.0", "Microsoft Edge";v="110.0.1587.69"',
|
30 |
-
'sec-ch-ua-mobile': '?0',
|
31 |
-
'sec-ch-ua-model': '""',
|
32 |
-
'sec-ch-ua-platform': '"Windows"',
|
33 |
-
'sec-ch-ua-platform-version': '"15.0.0"',
|
34 |
-
'sec-fetch-dest': 'document',
|
35 |
-
'sec-fetch-mode': 'navigate',
|
36 |
-
'sec-fetch-site': 'none',
|
37 |
-
'sec-fetch-user': '?1',
|
38 |
-
'upgrade-insecure-requests': '1',
|
39 |
-
'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36 Edg/110.0.1587.69',
|
40 |
-
'x-edge-shopping-flag': '1',
|
41 |
'Referer': 'https://chat.ylokh.xyz/',
|
42 |
'Origin': 'https://chat.ylokh.xyz',
|
|
|
43 |
}
|
44 |
|
45 |
json_data = {
|
|
|
18 |
|
19 |
def _create_completion(model: str, messages: list, stream: bool, **kwargs):
|
20 |
headers = {
|
21 |
+
'Content-Type': 'application/json',
|
22 |
+
'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 Edg/114.0.1823.58',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
'Referer': 'https://chat.ylokh.xyz/',
|
24 |
'Origin': 'https://chat.ylokh.xyz',
|
25 |
+
'Connection': 'keep-alive',
|
26 |
}
|
27 |
|
28 |
json_data = {
|