Hansimov commited on
Commit
8b09459
1 Parent(s): f1218fc

:recycle: [Refactor] Move networks constants to headers

Browse files
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",
constants/models.py CHANGED
@@ -4,7 +4,7 @@ MODEL_MAP = {
4
  "mistral-7b": "mistralai/Mistral-7B-Instruct-v0.2",
5
  # "openchat-3.5": "openchat/openchat-3.5-0106",
6
  "gemma-7b": "google/gemma-1.1-7b-it",
7
- # "command-r-plus": "CohereForAI/c4ai-command-r-plus",
8
  "default": "mistralai/Mixtral-8x7B-Instruct-v0.1",
9
  }
10
 
 
4
  "mistral-7b": "mistralai/Mistral-7B-Instruct-v0.2",
5
  # "openchat-3.5": "openchat/openchat-3.5-0106",
6
  "gemma-7b": "google/gemma-1.1-7b-it",
7
+ "command-r-plus": "CohereForAI/c4ai-command-r-plus",
8
  "default": "mistralai/Mixtral-8x7B-Instruct-v0.1",
9
  }
10
 
constants/networks.py DELETED
@@ -1,3 +0,0 @@
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
- }