Spaces:
Running
Running
Husnain
commited on
Commit
•
2dce68d
1
Parent(s):
3eb0fee
💎 [Feature] Enable gpt-3.5 in chat_api
Browse files- constants/headers.py +35 -0
constants/headers.py
ADDED
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
OPENAI_GET_HEADERS = {
|
2 |
+
# "Accept": "*/*",
|
3 |
+
"Accept-Encoding": "gzip, deflate, br, zstd",
|
4 |
+
"Accept-Language": "en-US,en;q=0.9",
|
5 |
+
"Cache-Control": "no-cache",
|
6 |
+
"Content-Type": "application/json",
|
7 |
+
# "Oai-Device-Id": self.uuid,
|
8 |
+
"Oai-Language": "en-US",
|
9 |
+
"Pragma": "no-cache",
|
10 |
+
"Referer": "https://chat.openai.com/",
|
11 |
+
"Sec-Ch-Ua": 'Google Chrome";v="123", "Not:A-Brand";v="8", "Chromium";v="123"',
|
12 |
+
"Sec-Ch-Ua-Mobile": "?0",
|
13 |
+
"Sec-Ch-Ua-Platform": '"Windows"',
|
14 |
+
"Sec-Fetch-Dest": "empty",
|
15 |
+
"Sec-Fetch-Mode": "cors",
|
16 |
+
"Sec-Fetch-Site": "same-origin",
|
17 |
+
"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",
|
18 |
+
}
|
19 |
+
|
20 |
+
|
21 |
+
OPENAI_POST_DATA = {
|
22 |
+
"action": "next",
|
23 |
+
# "messages": self.transform_messages(messages),
|
24 |
+
"parent_message_id": "",
|
25 |
+
"model": "text-davinci-002-render-sha",
|
26 |
+
"timezone_offset_min": -480,
|
27 |
+
"suggestions": [],
|
28 |
+
"history_and_training_disabled": False,
|
29 |
+
"conversation_mode": {"kind": "primary_assistant"},
|
30 |
+
"force_paragen": False,
|
31 |
+
"force_paragen_model_slug": "",
|
32 |
+
"force_nulligen": False,
|
33 |
+
"force_rate_limit": False,
|
34 |
+
# "websocket_request_id": str(uuid.uuid4()),
|
35 |
+
}
|