xiaolv commited on
Commit
eafcc29
1 Parent(s): 3406933

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -180,11 +180,11 @@ def request_to_v2(message, cookie, user_id,attachment=None,delst=True,context=[]
180
  'Content-Type': 'application/json',
181
  'Origin': 'https://claude.ai',
182
  'Referer': f'https://claude.ai/chat/{channel_id}',
183
- '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',
184
  'Cookie': cookie,
185
- 'Accept-Language': 'zh-CN,zh;q=0.9,en;q=0.8',
186
  'Accept': 'text/event-stream, text/event-stream',
187
- 'Sec-Ch-Ua': '"Not.A/Brand";v="8", "Chromium";v="114", "Google Chrome";v="114"',
188
  'Sec-Ch-Ua-Mobile': '?0',
189
  'Sec-Ch-Ua-Platform': '"Windows"',
190
  'Sec-Fetch-Dest': 'empty',
@@ -210,7 +210,7 @@ def request_to_v2(message, cookie, user_id,attachment=None,delst=True,context=[]
210
  post_msg_url = 'https://claude.ai/api/append_message'
211
  post_msg_data = {
212
  "completion":{
213
- "incremental":True,
214
  "prompt": message,
215
  "timezone":"Asia/Shanghai",
216
  "model":"claude-2"
 
180
  'Content-Type': 'application/json',
181
  'Origin': 'https://claude.ai',
182
  'Referer': f'https://claude.ai/chat/{channel_id}',
183
+ '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.82',
184
  'Cookie': cookie,
185
+ 'Accept-Language': 'zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6',
186
  'Accept': 'text/event-stream, text/event-stream',
187
+ 'Sec-Ch-Ua': '"Not.A/Brand";v="8", "Chromium";v="114", "Microsoft Edge";v="114"',
188
  'Sec-Ch-Ua-Mobile': '?0',
189
  'Sec-Ch-Ua-Platform': '"Windows"',
190
  'Sec-Fetch-Dest': 'empty',
 
210
  post_msg_url = 'https://claude.ai/api/append_message'
211
  post_msg_data = {
212
  "completion":{
213
+ # "incremental":True,
214
  "prompt": message,
215
  "timezone":"Asia/Shanghai",
216
  "model":"claude-2"