monra commited on
Commit
1ced9c4
1 Parent(s): d3375bf

Update Better Provider headers

Browse files
Files changed (1) hide show
  1. g4f/Provider/Providers/Better.py +20 -2
g4f/Provider/Providers/Better.py CHANGED
@@ -18,8 +18,26 @@ needs_auth = False
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
  }
 
18
 
19
  def _create_completion(model: str, messages: list, stream: bool, **kwargs):
20
  headers = {
21
+ 'authority': 'edgeservices.bing.com',
22
+ 'accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7',
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
  }