xiaolv commited on
Commit
439916b
1 Parent(s): c3fcf5e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -105,7 +105,7 @@ def upload_attachment(cookie ,organization_id,file_path):
105
  }
106
  print(files)
107
  response = requests.post(url, headers=headers, files=files)
108
- print(f"response:{response}")
109
  if response.status_code == 200:
110
  return response.json()
111
  else:
@@ -132,7 +132,7 @@ def request_to_v2(message, cookie, user_id,attachment=None,context=[]):
132
  attachments = [attachment_response]
133
  print(f"attachment_response:{attachment_response}")
134
  else:
135
- bots = str(attachment_response.json) + "\nError: Invalid file format. Please try again."
136
  print(bots)
137
  context += [bots]
138
  responses = [(u, b) for u, b in zip(context[::2], context[1::2])]
 
105
  }
106
  print(files)
107
  response = requests.post(url, headers=headers, files=files)
108
+ print(f"response:{response.json}")
109
  if response.status_code == 200:
110
  return response.json()
111
  else:
 
132
  attachments = [attachment_response]
133
  print(f"attachment_response:{attachment_response}")
134
  else:
135
+ bots = "\nError: Invalid file format. Please try again."
136
  print(bots)
137
  context += [bots]
138
  responses = [(u, b) for u, b in zip(context[::2], context[1::2])]