Tuchuanhuhuhu commited on
Commit
29cce21
·
1 Parent(s): bb7a76a

修复Proxy Error中的一个问题,fix #156

Browse files
Files changed (1) hide show
  1. utils.py +2 -1
utils.py CHANGED
@@ -201,10 +201,11 @@ def predict_all(openai_api_key, system_prompt, history, inputs, chatbot, all_tok
201
  try:
202
  response = get_response(openai_api_key, system_prompt, history, temperature, top_p, False, selected_model)
203
  except requests.exceptions.ConnectTimeout:
204
- status_text = standard_error_msg + error_retrieve_prompt
205
  return chatbot, history, status_text, all_token_counts
206
  except requests.exceptions.ProxyError:
207
  status_text = standard_error_msg + proxy_error_prompt + error_retrieve_prompt
 
208
  except requests.exceptions.SSLError:
209
  status_text = standard_error_msg + ssl_error_prompt + error_retrieve_prompt
210
  return chatbot, history, status_text, all_token_counts
 
201
  try:
202
  response = get_response(openai_api_key, system_prompt, history, temperature, top_p, False, selected_model)
203
  except requests.exceptions.ConnectTimeout:
204
+ status_text = standard_error_msg + connection_timeout_prompt + error_retrieve_prompt
205
  return chatbot, history, status_text, all_token_counts
206
  except requests.exceptions.ProxyError:
207
  status_text = standard_error_msg + proxy_error_prompt + error_retrieve_prompt
208
+ return chatbot, history, status_text, all_token_counts
209
  except requests.exceptions.SSLError:
210
  status_text = standard_error_msg + ssl_error_prompt + error_retrieve_prompt
211
  return chatbot, history, status_text, all_token_counts