Husnain commited on
Commit
74e9995
1 Parent(s): 0f39aaa

♻️ [Refactor] Move networks constants to headers

Browse files
Files changed (1) hide show
  1. constants/headers.py +32 -0
constants/headers.py CHANGED
@@ -1,3 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  OPENAI_GET_HEADERS = {
2
  # "Accept": "*/*",
3
  "Accept-Encoding": "gzip, deflate, br, zstd",
 
1
+ REQUESTS_HEADERS = {
2
+ "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36"
3
+ }
4
+
5
+ HUGGINGCHAT_POST_HEADERS = {
6
+ "Accept-Encoding": "gzip, deflate, br, zstd",
7
+ "Accept-Language": "en-US,en;q=0.9",
8
+ "Cache-Control": "no-cache",
9
+ "Content-Type": "application/json",
10
+ "Origin": "https://huggingface.co",
11
+ "Pragma": "no-cache",
12
+ "Referer": "https://huggingface.co/chat/",
13
+ "Sec-Ch-Ua": 'Google Chrome";v="123", "Not:A-Brand";v="8", "Chromium";v="123"',
14
+ "Sec-Ch-Ua-Mobile": "?0",
15
+ "Sec-Ch-Ua-Platform": '"Windows"',
16
+ "Sec-Fetch-Dest": "empty",
17
+ "Sec-Fetch-Mode": "cors",
18
+ "Sec-Fetch-Site": "same-origin",
19
+ "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36",
20
+ }
21
+
22
+ HUGGINGCHAT_SETTINGS_POST_DATA = {
23
+ "assistants": [],
24
+ "customPrompts": {},
25
+ "ethicsModalAccepted": True,
26
+ "ethicsModalAcceptedAt": None,
27
+ "hideEmojiOnSidebar": False,
28
+ "recentlySaved": False,
29
+ "searchEnabled": True,
30
+ "shareConversationsWithModelAuthors": True,
31
+ }
32
+
33
  OPENAI_GET_HEADERS = {
34
  # "Accept": "*/*",
35
  "Accept-Encoding": "gzip, deflate, br, zstd",