Moonfanz commited on
Commit
4bcba6e
·
verified ·
1 Parent(s): 8278da4

Upload 4 files

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -186,7 +186,7 @@ def handle_api_error(error, attempt, stream=False):
186
  return False, None
187
 
188
  elif isinstance(error, generation_types.StopCandidateException):
189
- logger.warning(f"输出截断")
190
  switch_api_key()
191
  return False, None
192
 
@@ -212,7 +212,7 @@ def chat_completions():
212
  gemini_history, user_message, error_response = func.process_messages_for_gemini(messages)
213
 
214
  if error_response:
215
- logger.error(f"Error in processing messages: {error_response}")
216
  return jsonify(error_response), 400
217
 
218
  def do_request(current_api_key, attempt):
 
186
  return False, None
187
 
188
  elif isinstance(error, generation_types.StopCandidateException):
189
+ logger.warning(f"输出被截断")
190
  switch_api_key()
191
  return False, None
192
 
 
212
  gemini_history, user_message, error_response = func.process_messages_for_gemini(messages)
213
 
214
  if error_response:
215
+ logger.error(f"处理消息时出错↙\n {error_response}")
216
  return jsonify(error_response), 400
217
 
218
  def do_request(current_api_key, attempt):