mkw18 commited on
Commit
ce34c84
β€’
1 Parent(s): 0e6a086

rm timeout

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -53,7 +53,7 @@ def parse_text(text):
53
 
54
  def SubmitKey(chatbot, key):
55
  data = {'AgentStart': True, 'key': key}
56
- response=requests.post(os.environ.get("URL"), data=json.dumps(data, ensure_ascii=False).encode('utf-8'), timeout=500)
57
  msg = str(response.content, encoding="utf-8")
58
  if not response.status_code == 200:
59
  chatbot = [(None, parse_text(msg))]
@@ -64,25 +64,25 @@ def SubmitKey(chatbot, key):
64
 
65
  def CheckTrue(chatbot, key):
66
  data = {'AgentCheck': True, 'key': key}
67
- response=requests.post(os.environ.get("URL"), data=json.dumps(data, ensure_ascii=False).encode('utf-8'), timeout=500)
68
  chatbot.append((parse_text("ζ˜―γ€‚"), parse_text(str(response.content, encoding="utf-8"))))
69
  return chatbot
70
 
71
  def CheckFalse(chatbot, key):
72
  data = {'AgentCheck': False, 'key': key}
73
- response=requests.post(os.environ.get("URL"), data=json.dumps(data, ensure_ascii=False).encode('utf-8'), timeout=500)
74
  chatbot.append((parse_text("否。"), parse_text(str(response.content, encoding="utf-8"))))
75
  return chatbot
76
 
77
  def CheckIrrelevant(chatbot, key):
78
  data = {'AgentCheck': 'Irrelevant', 'key': key}
79
- response=requests.post(os.environ.get("URL"), data=json.dumps(data, ensure_ascii=False).encode('utf-8'), timeout=500)
80
  chatbot.append((parse_text("无关。"), parse_text(str(response.content, encoding="utf-8"))))
81
  return chatbot
82
 
83
  def CheckTerm(chatbot, key):
84
  data = {'AgentFinish': True, 'key': key}
85
- response=requests.post(os.environ.get("URL"), data=json.dumps(data, ensure_ascii=False).encode('utf-8'), timeout=500)
86
  msg = str(response.content, encoding="utf-8")
87
  if not response.status_code == 200:
88
  chatbot = [(None, parse_text(msg))]
 
53
 
54
  def SubmitKey(chatbot, key):
55
  data = {'AgentStart': True, 'key': key}
56
+ response=requests.post(os.environ.get("URL"), data=json.dumps(data, ensure_ascii=False).encode('utf-8'))
57
  msg = str(response.content, encoding="utf-8")
58
  if not response.status_code == 200:
59
  chatbot = [(None, parse_text(msg))]
 
64
 
65
  def CheckTrue(chatbot, key):
66
  data = {'AgentCheck': True, 'key': key}
67
+ response=requests.post(os.environ.get("URL"), data=json.dumps(data, ensure_ascii=False).encode('utf-8'))
68
  chatbot.append((parse_text("ζ˜―γ€‚"), parse_text(str(response.content, encoding="utf-8"))))
69
  return chatbot
70
 
71
  def CheckFalse(chatbot, key):
72
  data = {'AgentCheck': False, 'key': key}
73
+ response=requests.post(os.environ.get("URL"), data=json.dumps(data, ensure_ascii=False).encode('utf-8'))
74
  chatbot.append((parse_text("否。"), parse_text(str(response.content, encoding="utf-8"))))
75
  return chatbot
76
 
77
  def CheckIrrelevant(chatbot, key):
78
  data = {'AgentCheck': 'Irrelevant', 'key': key}
79
+ response=requests.post(os.environ.get("URL"), data=json.dumps(data, ensure_ascii=False).encode('utf-8'))
80
  chatbot.append((parse_text("无关。"), parse_text(str(response.content, encoding="utf-8"))))
81
  return chatbot
82
 
83
  def CheckTerm(chatbot, key):
84
  data = {'AgentFinish': True, 'key': key}
85
+ response=requests.post(os.environ.get("URL"), data=json.dumps(data, ensure_ascii=False).encode('utf-8'))
86
  msg = str(response.content, encoding="utf-8")
87
  if not response.status_code == 200:
88
  chatbot = [(None, parse_text(msg))]