|
@@ -13,7 +13,7 @@ def wrap_response(code, msg=None, data=None):
|
|
|
|
|
|
def quit_human_intervention(user_id, staff_id) -> bool:
|
|
|
url = f"http://ai-wechat-hook-internal.piaoquantv.com/manage/insertEvent?sender={user_id}&receiver={staff_id}&type=103&content=SYSTEM"
|
|
|
- response = requests.post(url, timeout=20)
|
|
|
+ response = requests.post(url, timeout=20, headers={"Content-Type": "application/json"})
|
|
|
if response.status_code == 200 and response.json().get("code") == 0:
|
|
|
return True
|
|
|
else:
|
|
@@ -21,7 +21,7 @@ def quit_human_intervention(user_id, staff_id) -> bool:
|
|
|
|
|
|
def enter_human_intervention(user_id, staff_id) -> bool:
|
|
|
url = f"http://ai-wechat-hook-internal.piaoquantv.com/manage/insertEvent?sender={user_id}&receiver={staff_id}&type=104&content=SYSTEM"
|
|
|
- response = requests.post(url, timeout=20)
|
|
|
+ response = requests.post(url, timeout=20, headers={"Content-Type": "application/json"})
|
|
|
if response.status_code == 200 and response.json().get("code") == 0:
|
|
|
return True
|
|
|
else:
|