xiaolv commited on
Commit
b932635
1 Parent(s): d9f99cc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -6,17 +6,17 @@ def request_to_v2(message, cookie, user_id, channel_id,context=[]):
6
  times = 3
7
  context = [message]
8
  headers = {
9
- # ':Authority': 'claude.ai',
10
- # ':Method': 'POST',
11
- # ':Path': '/api/append_message',
12
- # ':Scheme': 'https',
13
  'Content-Type': 'application/json',
14
  'Origin': 'https://claude.ai',
15
  'Referer': f'https://claude.ai/chat/{channel_id}',
16
  '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',
17
  'Cookie': cookie,
18
  'Accept-Language': 'zh-CN,zh;q=0.9,en;q=0.8',
19
- # 'Accept-Encoding': 'gzip, deflate, br',
20
  'Accept': 'text/event-stream, text/event-stream',
21
  'Sec-Ch-Ua': '"Not.A/Brand";v="8", "Chromium";v="114", "Google Chrome";v="114"',
22
  'Sec-Ch-Ua-Mobile': '?0',
 
6
  times = 3
7
  context = [message]
8
  headers = {
9
+ ':Authority': 'claude.ai',
10
+ ':Method': 'POST',
11
+ ':Path': '/api/append_message',
12
+ ':Scheme': 'https',
13
  'Content-Type': 'application/json',
14
  'Origin': 'https://claude.ai',
15
  'Referer': f'https://claude.ai/chat/{channel_id}',
16
  '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',
17
  'Cookie': cookie,
18
  'Accept-Language': 'zh-CN,zh;q=0.9,en;q=0.8',
19
+ 'Accept-Encoding': 'gzip, deflate, br',
20
  'Accept': 'text/event-stream, text/event-stream',
21
  'Sec-Ch-Ua': '"Not.A/Brand";v="8", "Chromium";v="114", "Google Chrome";v="114"',
22
  'Sec-Ch-Ua-Mobile': '?0',